category.data.ts
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
{
title: '分类名称',
dataIndex: 'name',
width: 350,
align: 'left',
},
{
title: '分类编码',
dataIndex: 'code',
},
];
export const searchFormSchema: FormSchema[] = [
{
label: '名称',
field: 'name',
component: 'JInput',
colProps: { span: 6 },
},
{
label: '编码',
field: 'code',
component: 'JInput',
colProps: { span: 6 },
},
];
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '父级节点',
field: 'pid',
component: 'TreeSelect',
componentProps: {
//update-begin---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------
fieldNames: {
//update-end---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------
value: 'key',
},
dropdownStyle: {
maxHeight: '50vh',
},
getPopupContainer: () => document.body,
},
show: ({ values }) => {
return values.pid !== '0';
},
dynamicDisabled: ({ values }) => {
return !!values.id;
},
},
{
label: '分类名称',
field: 'name',
required: true,
component: 'Input',
},
];