AiApp.data.ts
1.5 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
import { FormSchema } from '@/components/Form';
/**
* 表单
*/
export const formSchema: FormSchema[] = [
{
label: 'id',
field: 'id',
component: 'Input',
show: false,
},
{
label: '应用名称',
field: 'name',
required: true,
componentProps: {
//是否展示字数
showCount: true,
maxlength: 64,
},
component: 'Input',
},
{
label: '应用描述',
field: 'descr',
component: 'InputTextArea',
componentProps: {
placeholder: '描述该应用的应用场景及用途',
rows: 4,
//是否展示字数
showCount: true,
maxlength: 256,
},
},
{
label: '应用图标',
field: 'icon',
component: 'JImageUpload',
},
{
label: '选择应用类型',
field: 'type',
component: 'Input',
ifShow: ({ values }) => {
return !values.id;
},
slot: 'typeSlot',
},
];
/**
* 快捷指令表单
*/
export const quickCommandFormSchema: FormSchema[] = [
{
label: 'key',
field: 'key',
component: 'Input',
show: false,
},
{
label: '按钮名称',
field: 'name',
required: true,
component: 'Input',
componentProps: {
showCount: true,
maxLength: 10,
},
},
{
label: '按钮图标',
field: 'icon',
component: 'IconPicker',
},
{
label: '指令内容',
field: 'descr',
required: true,
component: 'InputTextArea',
componentProps: {
autosize: { minRows: 4, maxRows: 4 },
showCount: true,
maxLength: 100,
},
},
];