Skip to content

Commit

Permalink
fix: 修复超级表头合并问题 (#4378)
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCole21 committed May 19, 2022
1 parent 19f983e commit 5b588ae
Show file tree
Hide file tree
Showing 3 changed files with 953 additions and 55 deletions.
71 changes: 71 additions & 0 deletions __tests__/renderers/Table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,77 @@ test('Renderer:table groupName-middleNoGroupName', () => {
expect(container).toMatchSnapshot();
});

// 超级表头,但是 开头列未配置表头
test('Renderer:table groupName-startNoGroupName', () => {
const {container} = render(
amisRender(
{
type: 'page',
data: {
groups: [
{
group: '分组1'
},
{
group: '分组1'
}
]
},
body: {
type: 'service',
data: {
rows
},
body: [
{
type: 'table',
source: '$rows',
className: 'm-b-none',
columns: [
{
name: 'engine',
label: 'Engine'
// groupName: '分组1' // 这里没配置groupName
},
{
name: 'grade',
label: 'Grade'
// groupName: '分组1' // 这里没配置groupName
},
{
name: 'version',
label: 'Version'
// groupName: '分组2' // 这里没配置groupName
},
{
name: 'browser',
label: 'Browser',
groupName: '分组2'
},
{
name: 'id',
label: 'ID',
toggled: false,
groupName: '分组2'
},
{
name: 'platform',
label: 'Platform',
groupName: '分组2'
}
]
}
]
}
},
{},
makeEnv({})
)
);

expect(container).toMatchSnapshot();
});

test('Renderer:table column head style', () => {
const {container} = render(
amisRender(
Expand Down
Loading

0 comments on commit 5b588ae

Please sign in to comment.