@jdlinker/system
Version:
jdLinker 系统模块
72 lines (68 loc) • 1.25 kB
text/typescript
import { BasicColumn, FormSchema } from '@jdlinker/ui';
export const columns: BasicColumn[] = [
{
title: '分类名称',
dataIndex: 'name',
width: 350,
align: 'left'
},
{
title: '分类编码',
dataIndex: 'code'
}
];
export const searchFormSchema: FormSchema[] = [
{
label: '分类名称',
field: 'name',
component: 'Input',
colProps: { span: 6 }
},
{
label: '分类编码',
field: 'code',
component: 'Input',
colProps: { span: 6 }
}
];
export const formSchema: any[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false
},
{
label: '父级节点',
field: 'pid',
component: 'TreeSelect',
componentProps: {
fieldNames: {
value: 'key'
},
dropdownStyle: {
maxHeight: '50vh'
},
getPopupContainer: () => document.body
},
// @ts-ignore
show: ({ values }) => {
return values.pid !== '0';
},
// @ts-ignore
dynamicDisabled: ({ values }) => {
return !!values.id;
}
},
{
label: '分类名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '分类编码',
field: 'code',
component: 'Input'
}
];