config.ts
1.96 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
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
export enum FormFieldsEnum {
NAME = 'name',
LABEL = 'label',
ROUTINGKEY = 'routingKey',
SECRET = 'secret',
TYPE = 'type',
DESCRIPTION = 'description',
TEXTSEARCH = 'textSearch',
}
const { t } = useI18n();
export const formSchema: FormSchema[] = [
{
field: FormFieldsEnum.NAME,
label: t('edge.instance.search.instanceName'),
component: 'Input',
required: true,
componentProps: {
maxLength: 255,
placeholder: t('edge.instance.search.instanceNamePlaceholder'),
},
},
{
field: FormFieldsEnum.TYPE,
label: t('edge.instance.search.instanceType'),
component: 'Input',
required: true,
defaultValue: 'default',
componentProps: {
disabled: true,
placeholder: t('edge.instance.search.instanceTypePlaceholder'),
},
},
{
field: FormFieldsEnum.ROUTINGKEY,
label: t('edge.instance.search.edgeKey'),
slot: 'routingKey',
required: true,
component: 'Input',
},
{
field: FormFieldsEnum.SECRET,
label: t('edge.instance.search.edgeSecret'),
slot: 'secret',
required: true,
component: 'Input',
},
{
field: FormFieldsEnum.LABEL,
label: t('edge.instance.search.label'),
component: 'Input',
componentProps: {
maxLength: 255,
placeholder: t('edge.instance.search.labelPlaceholder'),
},
},
{
field: FormFieldsEnum.DESCRIPTION,
label: t('edge.instance.search.desc'),
component: 'InputTextArea',
componentProps: {
maxLength: 255,
placeholder: t('edge.instance.search.descPlaceholder'),
},
},
];
export const searchFormSchema: FormSchema[] = [
{
field: FormFieldsEnum.TEXTSEARCH,
label: t('edge.instance.search.instanceName'),
component: 'Input',
colProps: { span: 6 },
componentProps: {
maxLength: 255,
placeholder: t('edge.instance.search.instanceNamePlaceholder'),
},
},
];