4 changed files with 276 additions and 174 deletions
@ -1,82 +1,107 @@ |
|||||||
import {BasicColumn} from '/@/components/Table'; |
/** |
||||||
import {FormSchema} from '/@/components/Table'; |
* @program: kicc-ui |
||||||
|
* @description: 字典数据模块动态渲染配置 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/5/8 |
||||||
|
*/ |
||||||
|
|
||||||
|
import { BasicColumn } from '/@/components/Table'; |
||||||
|
import { FormSchema } from '/@/components/Table'; |
||||||
|
|
||||||
|
/** 表格列配置 */ |
||||||
export const columns: BasicColumn[] = [ |
export const columns: BasicColumn[] = [ |
||||||
{ |
{ |
||||||
title: '字典ID', |
title: '字典数据类型', |
||||||
dataIndex: 'id', |
dataIndex: 'dictType' |
||||||
width: 100, |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '字典类型', |
|
||||||
dataIndex: 'dictType', |
|
||||||
width: 100, |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '字典标签', |
title: '字典数据标签', |
||||||
dataIndex: 'label', |
dataIndex: 'label' |
||||||
width: 130, |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '字典键值', |
title: '字典数据键值', |
||||||
dataIndex: 'value', |
dataIndex: 'value' |
||||||
width: 90, |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '字典排序', |
title: '字典数据排序', |
||||||
dataIndex: 'sort', |
dataIndex: 'sort' |
||||||
width: 90, |
|
||||||
} |
} |
||||||
|
|
||||||
]; |
]; |
||||||
|
|
||||||
|
/** 搜索表单配置 */ |
||||||
export const searchFormSchema: FormSchema[] = [ |
export const searchFormSchema: FormSchema[] = [ |
||||||
{ |
{ |
||||||
field: 'dataType', |
field: 'dataType', |
||||||
label: '字典参数类型', |
label: '字典类型', |
||||||
component: 'Input', |
component: 'Input', |
||||||
componentProps: { |
componentProps: { |
||||||
placeholder: '请输入字典参数类型', |
placeholder: '请输入字典类型' |
||||||
}, |
}, |
||||||
colProps: {span: 16}, |
colProps: { span: 12 } |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'dataType', |
||||||
|
label: '字典数据标签', |
||||||
|
component: 'Input', |
||||||
|
componentProps: { |
||||||
|
placeholder: '请输入字典数据标签' |
||||||
|
}, |
||||||
|
colProps: { span: 12 } |
||||||
} |
} |
||||||
]; |
]; |
||||||
|
|
||||||
|
/** 表单配置 */ |
||||||
export const formSchema: FormSchema[] = [ |
export const formSchema: FormSchema[] = [ |
||||||
{ |
{ |
||||||
field: 'id', |
field: 'id', |
||||||
label: 'ID', |
label: 'ID', |
||||||
component: 'Input', |
component: 'Input', |
||||||
show: false, |
show: false |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
field: 'dictType', |
field: 'dictType', |
||||||
label: '字典类型', |
label: '字典类型', |
||||||
component: 'Input', |
component: 'Input', |
||||||
required: true, |
required: true, |
||||||
componentProps: {disabled: true} |
componentProps: { disabled: true }, |
||||||
|
colProps:{ span: 12 } |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
field: 'label', |
field: 'label', |
||||||
label: '字典标签', |
label: '字典标签', |
||||||
component: 'Input', |
component: 'Input', |
||||||
required: true |
required: true, |
||||||
|
colProps:{ span: 12 } |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
field: 'value', |
field: 'value', |
||||||
label: '字典键值', |
label: '字典键值', |
||||||
component: 'Input', |
component: 'Input', |
||||||
required: true |
required: true, |
||||||
|
colProps:{ span: 12 } |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
field: 'sort', |
field: 'sort', |
||||||
label: '排序', |
label: '排序', |
||||||
component: 'InputNumber', |
component: 'InputNumber', |
||||||
|
componentProps: { |
||||||
|
style: { width:'100%' }, |
||||||
|
min: 0 |
||||||
|
}, |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
field: 'remark', |
field: 'remark', |
||||||
label: '备注', |
label: '备注', |
||||||
component: 'InputTextArea', |
component: 'InputTextArea', |
||||||
|
componentProps: { |
||||||
|
rows: 6 |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 24 |
||||||
|
} |
||||||
} |
} |
||||||
]; |
]; |
Loading…
Reference in new issue