@cloudbase/weda-ui 3.11.10 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/components/wd-form-arr.d.ts +4 -1
- package/dist/configs/components/wd-form-arr.js +11 -140
- package/dist/configs/components/wd-form-obj.d.ts +2 -0
- package/dist/configs/components/wd-form-obj.js +13 -1
- package/dist/configs/components/wd-select-multiple.js +1 -1
- package/dist/configs/index.d.ts +8 -2
- package/dist/configs/type-utils/type-form.d.ts +2 -0
- package/dist/configs/type-utils/type-form.js +31 -3
- package/dist/configs/utils/field.d.ts +4 -0
- package/dist/configs/utils/field.js +508 -0
- package/dist/style/index.css +41 -3
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +1 -1
- package/dist/web/components/form/uploader/uploader.pc.d.ts +3 -1
- package/dist/web/components/form/uploader/uploader.pc.js +18 -14
- package/dist/web/components/wd-form-item/wd-form-item.js +3 -3
- package/dist/web/components/wd-form-obj/base-form-obj.js +4 -1
- package/dist/web/components/wd-image/ImagePreview.d.ts +1 -0
- package/dist/web/components/wd-image/ImagePreview.js +127 -0
- package/dist/web/components/wd-image/image.js +45 -155
- package/dist/web/components/wd-image/index.js +4 -0
- package/dist/web/components/wd-menu-list/CommonMenuList.js +12 -1
- package/dist/web/components/wd-rich-text/wd-rich-text.js +1 -1
- package/dist/web/components/wd-table/components/FieldRender/ImagePreview.js +8 -1
- package/dist/web/components/wd-table/components/FieldRender/index.js +2 -2
- package/dist/web/components/wd-table/hooks/useChooseList.js +2 -2
- package/dist/web/components/wd-upload-file/wd-upload-file.js +1 -1
- package/dist/web/components/wd-upload-image/wd-upload-image.js +1 -1
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import { Static } from '../type-utils';
|
|
|
2
2
|
import type { Simplify } from 'type-fest';
|
|
3
3
|
declare const data: import("@sinclair/typebox").TObject<{
|
|
4
4
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
5
|
+
dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
6
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
|
|
6
7
|
title: string;
|
|
7
8
|
}>;
|
|
@@ -27,6 +28,7 @@ declare const config: {
|
|
|
27
28
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
28
29
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
29
30
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
31
|
+
dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
32
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
|
|
31
33
|
title: string;
|
|
32
34
|
}>;
|
|
@@ -178,11 +180,12 @@ declare const config: {
|
|
|
178
180
|
readonly __k: "init-name-with-id";
|
|
179
181
|
}, {
|
|
180
182
|
readonly when: "$attached";
|
|
181
|
-
readonly body:
|
|
183
|
+
readonly body: string;
|
|
182
184
|
}, {
|
|
183
185
|
readonly when: "mode";
|
|
184
186
|
readonly to: "$children";
|
|
185
187
|
readonly body: string;
|
|
188
|
+
readonly remainToTemplateContainer: "WdFormObj *";
|
|
186
189
|
}];
|
|
187
190
|
};
|
|
188
191
|
};
|
|
@@ -2,146 +2,7 @@ import { defineConfig, Type } from '../type-utils';
|
|
|
2
2
|
import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, } from '../type-utils/type-form';
|
|
3
3
|
import { getClasses } from '../type-utils/classes';
|
|
4
4
|
import { templateInitNameWithId } from './common/init-name-with-id';
|
|
5
|
-
|
|
6
|
-
[attributes]
|
|
7
|
-
value = [{}]
|
|
8
|
-
":addDefaultValue"="{}"
|
|
9
|
-
[[template]]
|
|
10
|
-
component = "Repeater"
|
|
11
|
-
[template.attributes]
|
|
12
|
-
":data" = "($w.{{$self.id}}.value || [])"
|
|
13
|
-
suffix = '{{$self.id}}'
|
|
14
|
-
forItem = 'item_{{$self.id}}'
|
|
15
|
-
forIndex = 'index_{{$self.id}}'
|
|
16
|
-
[[template.items]]
|
|
17
|
-
component = "Container"
|
|
18
|
-
scopedStyle = ":scope {\n position: relative;\n width: 100%;\n}"
|
|
19
|
-
[[template.items.items]]
|
|
20
|
-
component = 'WdFormObj'
|
|
21
|
-
[template.items.items.attributes]
|
|
22
|
-
":label" = "\`\${$w.{{$self.id}}.label}[\${$w.index_{{$self.id}} + 1}]\`"
|
|
23
|
-
":name" = "$w.index_{{$self.id}}"
|
|
24
|
-
isRoot = false
|
|
25
|
-
value = {}
|
|
26
|
-
[[template.items.items]]
|
|
27
|
-
component = 'WdIcon'
|
|
28
|
-
scopedStyle = ":scope {\n position: absolute;\n right: var(--wd-card-heder-pd-bordered);\n top: var(--wd-card-heder-pd-bordered);\n color: var(--wd-color-brand);\n}\n\n:scope.wd-mp-icon {\n top: var(--wd-card-heder-pd-bordered);\n}"
|
|
29
|
-
[template.items.items.attributes]
|
|
30
|
-
name = "td:delete"
|
|
31
|
-
size = "sm"
|
|
32
|
-
[[template.items.items.listeners]]
|
|
33
|
-
eventName = "tap"
|
|
34
|
-
type = "platform"
|
|
35
|
-
[template.items.items.listeners.handler]
|
|
36
|
-
module = "platform"
|
|
37
|
-
name = "invoke"
|
|
38
|
-
[template.items.items.listeners.handler.params]
|
|
39
|
-
component = "{{$self.id}}"
|
|
40
|
-
method = "remove"
|
|
41
|
-
[template.items.items.listeners.handler.params.params]
|
|
42
|
-
":index" = "$w.index_{{$self.id}}"
|
|
43
|
-
|
|
44
|
-
[[template]]
|
|
45
|
-
component = 'Grid'
|
|
46
|
-
scopedStyle = ":scope {\n margin-top: 10px;\n width: 100%;\n}"
|
|
47
|
-
[[template.listeners]]
|
|
48
|
-
eventName = "tap"
|
|
49
|
-
type = "platform"
|
|
50
|
-
[template.listeners.handler]
|
|
51
|
-
module = "platform"
|
|
52
|
-
name = "invoke"
|
|
53
|
-
[template.listeners.handler.params]
|
|
54
|
-
component = "{{$self.id}}"
|
|
55
|
-
method = "add"
|
|
56
|
-
[[template.items]]
|
|
57
|
-
component = 'Row'
|
|
58
|
-
[template.items.attributes]
|
|
59
|
-
alignItems = "center"
|
|
60
|
-
[[template.items.items]]
|
|
61
|
-
component = 'Col'
|
|
62
|
-
scopedStyle = ":scope {\n flex: 0;\n}"
|
|
63
|
-
[template.items.items.attributes]
|
|
64
|
-
lgWidthType = "fit-content"
|
|
65
|
-
widthType = "fit-content"
|
|
66
|
-
[[template.items.items.items]]
|
|
67
|
-
component = 'WdIcon'
|
|
68
|
-
scopedStyle = ":scope {\n color: var(--wd-color-brand);\n}"
|
|
69
|
-
[template.items.items.items.attributes]
|
|
70
|
-
name = "td:add-circle"
|
|
71
|
-
|
|
72
|
-
[[template.items.items]]
|
|
73
|
-
component = 'Col'
|
|
74
|
-
scopedStyle = ":scope {\n flex: 0;\n}"
|
|
75
|
-
[template.items.items.attributes]
|
|
76
|
-
lgWidthType = "fit-content"
|
|
77
|
-
widthType = "fit-content"
|
|
78
|
-
[[template.items.items.items]]
|
|
79
|
-
component = 'WdText'
|
|
80
|
-
scopedStyle = ":scope {\n color: var(--wd-color-brand);\n white-space: nowrap;\n}"
|
|
81
|
-
[template.items.items.items.attributes]
|
|
82
|
-
text = "新增"
|
|
83
|
-
`;
|
|
84
|
-
const $field_template = `
|
|
85
|
-
[attributes]
|
|
86
|
-
value = ['']
|
|
87
|
-
":addDefaultValue"="undefined"
|
|
88
|
-
[[template]]
|
|
89
|
-
component = "Repeater"
|
|
90
|
-
[template.attributes]
|
|
91
|
-
":data" = "($w.{{$self.id}}.value || [])"
|
|
92
|
-
suffix = '{{$self.id}}'
|
|
93
|
-
forItem = 'item_{{$self.id}}'
|
|
94
|
-
forIndex = 'index_{{$self.id}}'
|
|
95
|
-
[[template.items]]
|
|
96
|
-
component = "Container"
|
|
97
|
-
scopedStyle = ":scope {\n display: flex;\n align-items: center;\n width: 100%;\n}"
|
|
98
|
-
[[template.items.items]]
|
|
99
|
-
component = 'WdInput'
|
|
100
|
-
[template.items.items.attributes]
|
|
101
|
-
":name" = "$w.index_{{$self.id}}"
|
|
102
|
-
labelVisible = false
|
|
103
|
-
value = {}
|
|
104
|
-
[[template.items.items]]
|
|
105
|
-
component = 'WdIcon'
|
|
106
|
-
scopedStyle = ":scope {\n color: var(--wd-color-brand);\n margin-left: 10px;\n}"
|
|
107
|
-
[template.items.items.attributes]
|
|
108
|
-
name = "td:delete"
|
|
109
|
-
size = "sm"
|
|
110
|
-
[[template.items.items.listeners]]
|
|
111
|
-
eventName = "tap"
|
|
112
|
-
type = "platform"
|
|
113
|
-
[template.items.items.listeners.handler]
|
|
114
|
-
module = "platform"
|
|
115
|
-
name = "invoke"
|
|
116
|
-
[template.items.items.listeners.handler.params]
|
|
117
|
-
component = "{{$self.id}}"
|
|
118
|
-
method = "remove"
|
|
119
|
-
[template.items.items.listeners.handler.params.params]
|
|
120
|
-
":index" = "$w.index_{{$self.id}}"
|
|
121
|
-
|
|
122
|
-
[[template]]
|
|
123
|
-
component = 'Container'
|
|
124
|
-
scopedStyle = ":scope {\n display: flex;\n align-items: center;\n width: 100%;\n color: var(--wd-color-brand);\n margin-top: 5px;\n}"
|
|
125
|
-
[[template.listeners]]
|
|
126
|
-
eventName = "tap"
|
|
127
|
-
type = "platform"
|
|
128
|
-
[template.listeners.handler]
|
|
129
|
-
module = "platform"
|
|
130
|
-
name = "invoke"
|
|
131
|
-
[template.listeners.handler.params]
|
|
132
|
-
component = "{{$self.id}}"
|
|
133
|
-
method = "add"
|
|
134
|
-
[[template.items]]
|
|
135
|
-
component = 'WdIcon'
|
|
136
|
-
scopedStyle = ":scope{\n margin-right: 5px;\n}"
|
|
137
|
-
[template.items.attributes]
|
|
138
|
-
name = "td:add-circle"
|
|
139
|
-
[[template.items]]
|
|
140
|
-
component = 'WdText'
|
|
141
|
-
scopedStyle = ":scope{\n color: var(--wd-color-brand);\n}"
|
|
142
|
-
[template.items.attributes]
|
|
143
|
-
text = "新增"
|
|
144
|
-
`;
|
|
5
|
+
import { $attached_template, $custom_template, $table_template, $field_template, } from '../utils/field';
|
|
145
6
|
const $mode_template = `
|
|
146
7
|
{{#with $self as |$self|}}
|
|
147
8
|
{{#if (helper_utils '===' $self.attributes.mode 'obj')}}
|
|
@@ -149,6 +10,14 @@ ${$attached_template}
|
|
|
149
10
|
{{else if (helper_utils '===' $self.attributes.mode 'field')}}
|
|
150
11
|
|
|
151
12
|
${$field_template}
|
|
13
|
+
|
|
14
|
+
{{else if (helper_utils '===' $self.attributes.mode 'table')}}
|
|
15
|
+
|
|
16
|
+
${$table_template}
|
|
17
|
+
|
|
18
|
+
{{else if (helper_utils '===' $self.attributes.mode 'custom')}}
|
|
19
|
+
|
|
20
|
+
${$custom_template}
|
|
152
21
|
{{/if}}
|
|
153
22
|
{{/with}}
|
|
154
23
|
`;
|
|
@@ -176,6 +45,7 @@ const data = Type.Partial(Type.Object({
|
|
|
176
45
|
},
|
|
177
46
|
// 状态校验
|
|
178
47
|
status: FORM_ITEM_DATA.status,
|
|
48
|
+
dataSourceName: FORM_ITEM_DATA.dataSourceName,
|
|
179
49
|
}));
|
|
180
50
|
const properties = Type.Composite([
|
|
181
51
|
Type.Pick(data, ['name', 'label', 'value']),
|
|
@@ -264,6 +134,7 @@ const config = defineConfig({
|
|
|
264
134
|
when: 'mode',
|
|
265
135
|
to: '$children',
|
|
266
136
|
body: $mode_template,
|
|
137
|
+
remainToTemplateContainer: 'WdFormObj *',
|
|
267
138
|
},
|
|
268
139
|
],
|
|
269
140
|
},
|
|
@@ -20,6 +20,7 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
20
20
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
21
21
|
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
22
22
|
isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
23
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
23
24
|
}>;
|
|
24
25
|
export type DataType = Simplify<Static<typeof data>>;
|
|
25
26
|
declare const config: {
|
|
@@ -44,6 +45,7 @@ declare const config: {
|
|
|
44
45
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
45
46
|
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
46
47
|
isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
48
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
47
49
|
}>;
|
|
48
50
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
49
51
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineConfig, Type } from '../type-utils';
|
|
2
|
-
import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, } from '../type-utils/type-form';
|
|
2
|
+
import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, X_CATEGORY, } from '../type-utils/type-form';
|
|
3
3
|
import { getClasses } from '../type-utils/classes';
|
|
4
4
|
import { templateInitNameWithId } from './common/init-name-with-id';
|
|
5
5
|
// 属性类型定义
|
|
@@ -16,6 +16,18 @@ const data = Type.Partial(Type.Object({
|
|
|
16
16
|
value: FORM_ITEM_DATA._valueInFormObj,
|
|
17
17
|
size: FORM_ITEM_DATA.size,
|
|
18
18
|
isRoot: FORM_ITEM_DATA.isRoot,
|
|
19
|
+
mode: Type.StringEnum({
|
|
20
|
+
title: '模板',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: 'obj',
|
|
23
|
+
enum: [
|
|
24
|
+
{ label: '卡片', value: 'obj' },
|
|
25
|
+
{ label: '自定义', value: 'custom' },
|
|
26
|
+
],
|
|
27
|
+
'x-category': X_CATEGORY.COMMON,
|
|
28
|
+
'x-component': 'string',
|
|
29
|
+
'x-index': 21,
|
|
30
|
+
}),
|
|
19
31
|
// 标题
|
|
20
32
|
...{
|
|
21
33
|
...FORM_ITEM_DATA_TITLE,
|
|
@@ -54,7 +54,7 @@ const data = Type.Partial(Type.Object({
|
|
|
54
54
|
{
|
|
55
55
|
type: 'value:visible',
|
|
56
56
|
target: '*(range,ignoreCase,staticSearchable)',
|
|
57
|
-
condition: "{{!($self.value=='many-many'||$self.value=='one-many')}}",
|
|
57
|
+
condition: "{{!($self.value=='many-many'||$self.value=='one-many'||$self.value=='x-enum')}}",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
type: 'value:visible',
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1176,6 +1176,7 @@ export declare const components: {
|
|
|
1176
1176
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
1177
1177
|
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
1178
1178
|
isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1179
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
1179
1180
|
}>;
|
|
1180
1181
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
1181
1182
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
@@ -1304,6 +1305,7 @@ export declare const components: {
|
|
|
1304
1305
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
1305
1306
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
1306
1307
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
1308
|
+
dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1307
1309
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
|
|
1308
1310
|
title: string;
|
|
1309
1311
|
}>;
|
|
@@ -1455,11 +1457,12 @@ export declare const components: {
|
|
|
1455
1457
|
readonly __k: "init-name-with-id";
|
|
1456
1458
|
}, {
|
|
1457
1459
|
readonly when: "$attached";
|
|
1458
|
-
readonly body:
|
|
1460
|
+
readonly body: string;
|
|
1459
1461
|
}, {
|
|
1460
1462
|
readonly when: "mode";
|
|
1461
1463
|
readonly to: "$children";
|
|
1462
1464
|
readonly body: string;
|
|
1465
|
+
readonly remainToTemplateContainer: "WdFormObj *";
|
|
1463
1466
|
}];
|
|
1464
1467
|
};
|
|
1465
1468
|
};
|
|
@@ -20566,6 +20569,7 @@ declare const _default: {
|
|
|
20566
20569
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
20567
20570
|
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
20568
20571
|
isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
20572
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
20569
20573
|
}>;
|
|
20570
20574
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
20571
20575
|
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
|
|
@@ -20694,6 +20698,7 @@ declare const _default: {
|
|
|
20694
20698
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
20695
20699
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
20696
20700
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
20701
|
+
dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
20697
20702
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
|
|
20698
20703
|
title: string;
|
|
20699
20704
|
}>;
|
|
@@ -20845,11 +20850,12 @@ declare const _default: {
|
|
|
20845
20850
|
readonly __k: "init-name-with-id";
|
|
20846
20851
|
}, {
|
|
20847
20852
|
readonly when: "$attached";
|
|
20848
|
-
readonly body:
|
|
20853
|
+
readonly body: string;
|
|
20849
20854
|
}, {
|
|
20850
20855
|
readonly when: "mode";
|
|
20851
20856
|
readonly to: "$children";
|
|
20852
20857
|
readonly body: string;
|
|
20858
|
+
readonly remainToTemplateContainer: "WdFormObj *";
|
|
20853
20859
|
}];
|
|
20854
20860
|
};
|
|
20855
20861
|
};
|
|
@@ -643,6 +643,8 @@ export interface WdFormItemProps extends CommonPropsType, Pick<ItemDataType, 'la
|
|
|
643
643
|
format?: string;
|
|
644
644
|
/** 字段值 */
|
|
645
645
|
value?: any;
|
|
646
|
+
/** 嵌套表单类型 */
|
|
647
|
+
mode?: string;
|
|
646
648
|
}
|
|
647
649
|
export interface WdInputGroupProps extends Pick<ItemDataType, 'before' | 'after' | 'block' | 'size' | 'readOnly'> {
|
|
648
650
|
/** 子元素 */
|
|
@@ -589,16 +589,44 @@ export const FORM_ITEM_DATA = {
|
|
|
589
589
|
'x-category': X_CATEGORY.COMMON,
|
|
590
590
|
}),
|
|
591
591
|
_modeInFormArr: Type.StringEnum({
|
|
592
|
-
title: '
|
|
592
|
+
title: '嵌套表单模板',
|
|
593
593
|
type: 'string',
|
|
594
594
|
default: 'obj',
|
|
595
595
|
enum: [
|
|
596
|
-
{ label: '
|
|
597
|
-
{ label: '
|
|
596
|
+
{ label: '对象数组(卡片)', value: 'obj' },
|
|
597
|
+
{ label: '对象数组(表格)', value: 'custom' },
|
|
598
|
+
{ label: '值数组(表单项)', value: 'field' },
|
|
598
599
|
],
|
|
599
600
|
'x-category': X_CATEGORY.COMMON,
|
|
600
601
|
'x-component': 'string',
|
|
601
602
|
'x-index': 21,
|
|
603
|
+
'x-linkages': [
|
|
604
|
+
{
|
|
605
|
+
type: 'value:schema',
|
|
606
|
+
target: 'mode',
|
|
607
|
+
condition: '{{!!$form.values.dataSourceName}}',
|
|
608
|
+
schema: {
|
|
609
|
+
enum: [
|
|
610
|
+
{ label: '对象数组(卡片)', value: 'obj' },
|
|
611
|
+
{ label: '对象数组(表格)', value: 'table' },
|
|
612
|
+
{ label: '对象数组(自定义)', value: 'custom' },
|
|
613
|
+
{ label: '值数组(表单项)', value: 'field' },
|
|
614
|
+
],
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
type: 'value:schema',
|
|
619
|
+
target: 'mode',
|
|
620
|
+
condition: '{{!$form.values.dataSourceName}}',
|
|
621
|
+
schema: {
|
|
622
|
+
enum: [
|
|
623
|
+
{ label: '对象数组(卡片)', value: 'obj' },
|
|
624
|
+
{ label: '对象数组(自定义)', value: 'custom' },
|
|
625
|
+
{ label: '值数组(表单项)', value: 'field' },
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
],
|
|
602
630
|
}),
|
|
603
631
|
_addDefaultValue: Type.Unknown({
|
|
604
632
|
title: '新增表单项初始值',
|