options
动态函数
loading
ts
{
id: '',
componentName: 'Select',
componentType: 'form',
formItemAttrs: {
field: '',
label: '选择器',
},
attrs: {
options: (params) =>
new Promise((res) => {
setTimeout(() => {
const list=[
{
label: "1",
value: "1",
},
{
label: "2",
value: "2",
},
]
res([ list, ["activity.name"]]);
}, 1000);
}),
},
}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
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
远程请求
ts
{
id: '',
componentName: 'Select',
componentType: 'form',
formItemAttrs: {
field: '',
label: '选择器',
},
attrs: {
options: {
url: '请求地址',
method: 'GET',
map: (res) => res.data ? [res.data, null] : [[], null]
},
},
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
