config.ts
1.85 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { FormSchema } from '/@/components/Form';
export enum FormFieldsEnum {
NAME = 'name',
LABEL = 'label',
ROUTINGKEY = 'routingKey',
SECRET = 'secret',
TYPE = 'type',
DESCRIPTION = 'description',
TEXTSEARCH = 'textSearch',
}
enum FormFieldsNameEnum {
NAME = '名称',
LABEL = '标签',
ROUTINGKEY = '边缘Key',
SECRET = '边缘密钥',
TYPE = '边缘类型',
DESCRIPTION = '描述',
TEXTSEARCH = '实例名称',
}
export const formSchema: FormSchema[] = [
{
field: FormFieldsEnum.NAME,
label: FormFieldsNameEnum.NAME,
component: 'Input',
required: true,
componentProps: {
maxLength: 255,
placeholder: '请输入实例名称',
},
},
{
field: FormFieldsEnum.TYPE,
label: FormFieldsNameEnum.TYPE,
component: 'Input',
required: true,
defaultValue: 'default',
componentProps: {
disabled: true,
},
},
{
field: FormFieldsEnum.ROUTINGKEY,
label: FormFieldsNameEnum.ROUTINGKEY,
slot: 'routingKey',
required: true,
component: 'Input',
},
{
field: FormFieldsEnum.SECRET,
label: FormFieldsNameEnum.SECRET,
slot: 'secret',
required: true,
component: 'Input',
},
{
field: FormFieldsEnum.LABEL,
label: FormFieldsNameEnum.LABEL,
component: 'Input',
componentProps: {
maxLength: 255,
placeholder: '请输入标签',
},
},
{
field: FormFieldsEnum.DESCRIPTION,
label: FormFieldsNameEnum.DESCRIPTION,
component: 'Input',
componentProps: {
maxLength: 255,
placeholder: '请输入描述',
},
},
];
export const searchFormSchema: FormSchema[] = [
{
field: FormFieldsEnum.TEXTSEARCH,
label: FormFieldsNameEnum.TEXTSEARCH,
component: 'Input',
colProps: { span: 6 },
componentProps: {
maxLength: 255,
placeholder: '请输入实例名称',
},
},
];