Skip to content

Commit

Permalink
feat(playground): add tableLayout for ArrayTable (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwyx778 authored Apr 25, 2022
1 parent f34ba4b commit 3e961de
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions formily/antd/src/locales/ArrayTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const ArrayTable = {
fixed: { title: '固定列', dataSource: ['左', '右', '无'] },
width: '宽度',
defaultValue: '默认值',
tableLayout: {
title: '表格布局',
dataSource: ['自动', '固定'],
},
},
},
},
Expand All @@ -38,6 +42,10 @@ export const ArrayTable = {
fixed: { title: 'Fixed', dataSource: ['Left', 'Right', 'None'] },
width: 'Width',
defaultValue: 'Default Value',
tableLayout: {
title: 'Table Layout',
dataSource: ['Auto', 'Fixed'],
},
},
},
},
Expand Down
10 changes: 10 additions & 0 deletions formily/antd/src/schemas/ArrayTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export const ArrayTable: ISchema & { Addition?: ISchema; Column?: ISchema } = {
defaultValue: 'small',
},
},
tableLayout: {
type: 'string',
enum: ['auto', 'fixed'],
'x-decorator': 'FormItem',
'x-component': 'Radio.Group',
'x-component-props': {
defaultValue: 'auto',
optionType: 'button',
},
},
},
}

Expand Down

0 comments on commit 3e961de

Please sign in to comment.