@dckj-npm/dc-material 0.1.376 → 0.1.377
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/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/teletext-list.html +3 -3
- package/build/docs/umi.6f6bf535.js +1 -0
- package/build/docs/{umi.6743fcd4.css → umi.9770df27.css} +1 -1
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/docs/~demos/teletext-list-demo-1.html +3 -3
- package/build/docs/~demos/teletext-list-demo.html +3 -3
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +2 -2
- package/dist/BizComps.js.map +1 -1
- package/es/components/teletext-list/teletext-list-item.d.ts +14 -77
- package/es/components/teletext-list/teletext-list-item.js +153 -165
- package/es/components/teletext-list/teletext-list-item.scss +53 -4
- package/es/components/teletext-list/teletext-list.d.ts +60 -4
- package/es/components/teletext-list/teletext-list.js +55 -37
- package/lib/components/teletext-list/teletext-list-item.d.ts +14 -77
- package/lib/components/teletext-list/teletext-list-item.js +153 -164
- package/lib/components/teletext-list/teletext-list-item.scss +53 -4
- package/lib/components/teletext-list/teletext-list.d.ts +60 -4
- package/lib/components/teletext-list/teletext-list.js +55 -37
- package/lowcode/teletext-list/meta.ts +457 -703
- package/lowcode/teletext-list/meta.ts.bak +821 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_es/teletext-list/meta.js +689 -598
- package/lowcode_es/teletext-list/meta.ts.bak +821 -0
- package/lowcode_lib/meta.js +1 -1
- package/lowcode_lib/teletext-list/meta.js +689 -598
- package/lowcode_lib/teletext-list/meta.ts.bak +821 -0
- package/package.json +3 -3
- package/build/docs/umi.d20b1d99.js +0 -1
|
@@ -37,397 +37,717 @@ var TeletextListMeta = {
|
|
|
37
37
|
subName: ''
|
|
38
38
|
},
|
|
39
39
|
configure: {
|
|
40
|
-
props: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
props: [
|
|
41
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
|
+
// 分组一:数据与内容
|
|
43
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
{
|
|
45
|
+
type: 'group',
|
|
46
|
+
title: '数据与内容',
|
|
47
|
+
display: 'accordion',
|
|
48
|
+
items: [{
|
|
49
|
+
title: '标题',
|
|
50
|
+
name: 'title',
|
|
51
|
+
description: '列表头部标题文本',
|
|
52
|
+
setter: {
|
|
53
|
+
componentName: 'StringSetter',
|
|
54
|
+
isRequired: false,
|
|
55
|
+
initialValue: ''
|
|
46
56
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, {
|
|
70
|
-
label: '仅有文字',
|
|
71
|
-
value: 'textOnly'
|
|
72
|
-
}]
|
|
57
|
+
}, {
|
|
58
|
+
title: '更多文字',
|
|
59
|
+
name: 'moreText',
|
|
60
|
+
description: '更多按钮文字,为空时不显示',
|
|
61
|
+
setter: {
|
|
62
|
+
componentName: 'StringSetter',
|
|
63
|
+
isRequired: false,
|
|
64
|
+
initialValue: ''
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
title: '文本槽位数',
|
|
68
|
+
name: 'textLines',
|
|
69
|
+
description: '每项渲染几个文本字段:2=标题+说明,3=加text3,4=加text3+text4。这是"显示几格",不是"每格显示几行"——行数截断请到"标题/说明文字样式"分组修改"最大行数"。',
|
|
70
|
+
setter: {
|
|
71
|
+
componentName: 'NumberSetter',
|
|
72
|
+
isRequired: false,
|
|
73
|
+
initialValue: 2,
|
|
74
|
+
defaultValue: 2,
|
|
75
|
+
props: {
|
|
76
|
+
min: 2,
|
|
77
|
+
max: 4
|
|
78
|
+
}
|
|
73
79
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
extraProps: {
|
|
81
|
+
setValue: function setValue(target, value) {
|
|
82
|
+
var _target$parent, _target$parent$items;
|
|
83
|
+
target.getProps().setPropValue('textLines', value);
|
|
84
|
+
var dataListBindProp = target === null || target === void 0 ? void 0 : (_target$parent = target.parent) === null || _target$parent === void 0 ? void 0 : (_target$parent$items = _target$parent.items) === null || _target$parent$items === void 0 ? void 0 : _target$parent$items.find(function (item) {
|
|
85
|
+
return item.name === 'dataListBind';
|
|
86
|
+
});
|
|
87
|
+
if (dataListBindProp !== null && dataListBindProp !== void 0 && dataListBindProp.setter) {
|
|
88
|
+
var baseChildren = [{
|
|
89
|
+
label: '图片链接',
|
|
90
|
+
value: 'image'
|
|
91
|
+
}, {
|
|
92
|
+
label: '类型',
|
|
93
|
+
value: 'itemType'
|
|
94
|
+
}, {
|
|
95
|
+
label: '标题',
|
|
96
|
+
value: 'title'
|
|
97
|
+
}, {
|
|
98
|
+
label: '说明',
|
|
99
|
+
value: 'description'
|
|
100
|
+
}];
|
|
101
|
+
var textChildren = value > 2 ? Array.from({
|
|
102
|
+
length: value - 2
|
|
103
|
+
}).map(function (_, i) {
|
|
104
|
+
return {
|
|
105
|
+
label: "\u6587\u672C" + (i + 3),
|
|
106
|
+
value: "text" + (i + 3)
|
|
107
|
+
};
|
|
108
|
+
}) : [];
|
|
109
|
+
dataListBindProp.setter.props.attributes[0].children = [].concat(baseChildren, textChildren);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
82
112
|
}
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
value: 'left'
|
|
108
|
-
}, {
|
|
109
|
-
label: '右',
|
|
110
|
-
value: 'right'
|
|
111
|
-
}, {
|
|
112
|
-
label: '上',
|
|
113
|
-
value: 'top'
|
|
114
|
-
}, {
|
|
115
|
-
label: '下',
|
|
116
|
-
value: 'bottom'
|
|
117
|
-
}, {
|
|
118
|
-
label: '无',
|
|
119
|
-
value: 'none'
|
|
120
|
-
}]
|
|
113
|
+
}, {
|
|
114
|
+
title: '数据源绑定',
|
|
115
|
+
name: 'dataListBind',
|
|
116
|
+
setter: {
|
|
117
|
+
componentName: 'SetterFormVariable',
|
|
118
|
+
props: {
|
|
119
|
+
attributes: [{
|
|
120
|
+
label: '图文数据',
|
|
121
|
+
value: 'dataList',
|
|
122
|
+
children: [{
|
|
123
|
+
label: '图片链接',
|
|
124
|
+
value: 'image'
|
|
125
|
+
}, {
|
|
126
|
+
label: '行类型(值为"开关"时该行显示开关控件)',
|
|
127
|
+
value: 'itemType'
|
|
128
|
+
}, {
|
|
129
|
+
label: '标题',
|
|
130
|
+
value: 'title'
|
|
131
|
+
}, {
|
|
132
|
+
label: '说明',
|
|
133
|
+
value: 'description'
|
|
134
|
+
}]
|
|
135
|
+
}]
|
|
136
|
+
}
|
|
121
137
|
},
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
description: '图片宽度',
|
|
132
|
-
setter: {
|
|
133
|
-
componentName: 'NumberSetter',
|
|
134
|
-
isRequired: false,
|
|
135
|
-
initialValue: 100
|
|
136
|
-
},
|
|
137
|
-
extraProps: {
|
|
138
|
-
/**
|
|
139
|
-
* ignoreDefaultValue: 防止布局面板修改 Image 子节点 style 后,
|
|
140
|
-
* 引擎 remount SettingFieldView 时 initDefaultValue 把 imgWidth 重置为 100。
|
|
141
|
-
* 与 dataList 同理:只要 prop 有值就永远不应被 initialValue 覆盖。
|
|
142
|
-
*/
|
|
143
|
-
ignoreDefaultValue: function ignoreDefaultValue() {
|
|
144
|
-
return true;
|
|
138
|
+
extraProps: {}
|
|
139
|
+
}, {
|
|
140
|
+
title: {
|
|
141
|
+
label: {
|
|
142
|
+
type: 'i18n',
|
|
143
|
+
'en-US': 'dataList',
|
|
144
|
+
'zh-CN': '静态数据'
|
|
145
|
+
},
|
|
146
|
+
tip: 'dataList | 静态数据'
|
|
145
147
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
name: 'dataList',
|
|
149
|
+
description: '列表静态数据,绑定数据源后此项被覆盖',
|
|
150
|
+
setter: {
|
|
151
|
+
componentName: 'ArraySetter',
|
|
152
|
+
props: {
|
|
153
|
+
itemSetter: {
|
|
154
|
+
componentName: 'ObjectSetter',
|
|
155
|
+
props: {
|
|
156
|
+
config: {
|
|
157
|
+
items: [{
|
|
158
|
+
title: {
|
|
159
|
+
label: {
|
|
160
|
+
type: 'i18n',
|
|
161
|
+
'en-US': 'title',
|
|
162
|
+
'zh-CN': '标题'
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
name: 'title',
|
|
166
|
+
setter: {
|
|
167
|
+
componentName: 'StringSetter',
|
|
168
|
+
isRequired: false,
|
|
169
|
+
initialValue: ''
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
title: {
|
|
173
|
+
label: {
|
|
174
|
+
type: 'i18n',
|
|
175
|
+
'en-US': 'image',
|
|
176
|
+
'zh-CN': '图片地址'
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
name: 'image',
|
|
180
|
+
setter: {
|
|
181
|
+
componentName: 'CustomImageSetter',
|
|
182
|
+
isRequired: false,
|
|
183
|
+
initialValue: ''
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
title: {
|
|
187
|
+
label: {
|
|
188
|
+
type: 'i18n',
|
|
189
|
+
'en-US': 'description',
|
|
190
|
+
'zh-CN': '描述'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
name: 'description',
|
|
194
|
+
setter: {
|
|
195
|
+
componentName: 'StringSetter',
|
|
196
|
+
isRequired: false,
|
|
197
|
+
initialValue: ''
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
title: {
|
|
201
|
+
label: {
|
|
202
|
+
type: 'i18n',
|
|
203
|
+
'en-US': 'text3',
|
|
204
|
+
'zh-CN': '文本3'
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
name: 'text3',
|
|
208
|
+
description: '文本槽位数 ≥ 3 时显示',
|
|
209
|
+
setter: {
|
|
210
|
+
componentName: 'StringSetter',
|
|
211
|
+
isRequired: false,
|
|
212
|
+
initialValue: ''
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
title: {
|
|
216
|
+
label: {
|
|
217
|
+
type: 'i18n',
|
|
218
|
+
'en-US': 'text4',
|
|
219
|
+
'zh-CN': '文本4'
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
name: 'text4',
|
|
223
|
+
description: '文本槽位数 = 4 时显示',
|
|
224
|
+
setter: {
|
|
225
|
+
componentName: 'StringSetter',
|
|
226
|
+
isRequired: false,
|
|
227
|
+
initialValue: ''
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
title: {
|
|
231
|
+
label: {
|
|
232
|
+
type: 'i18n',
|
|
233
|
+
'en-US': 'itemType',
|
|
234
|
+
'zh-CN': '行类型'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
name: 'itemType',
|
|
238
|
+
description: '值为"开关"时该行显示开关控件,留空为默认文字行',
|
|
239
|
+
setter: {
|
|
240
|
+
componentName: 'SelectSetter',
|
|
241
|
+
props: {
|
|
242
|
+
options: [{
|
|
243
|
+
label: '默认(文字行)',
|
|
244
|
+
value: ''
|
|
245
|
+
}, {
|
|
246
|
+
label: '开关',
|
|
247
|
+
value: '开关'
|
|
248
|
+
}]
|
|
249
|
+
},
|
|
250
|
+
initialValue: ''
|
|
251
|
+
}
|
|
252
|
+
}],
|
|
253
|
+
extraSetter: {
|
|
254
|
+
componentName: 'MixedSetter',
|
|
255
|
+
isRequired: false,
|
|
256
|
+
props: {}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
initialValue: function initialValue(target) {
|
|
263
|
+
var _target$node$schema$p, _target$node, _target$node$schema, _target$node$schema$p2, _target$getProps, _target$getProps$call, _target$getProps$call2;
|
|
264
|
+
var existing = (_target$node$schema$p = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : (_target$node$schema = _target$node.schema) === null || _target$node$schema === void 0 ? void 0 : (_target$node$schema$p2 = _target$node$schema.props) === null || _target$node$schema$p2 === void 0 ? void 0 : _target$node$schema$p2.dataList) !== null && _target$node$schema$p !== void 0 ? _target$node$schema$p : target === null || target === void 0 ? void 0 : (_target$getProps = target.getProps) === null || _target$getProps === void 0 ? void 0 : (_target$getProps$call = _target$getProps.call(target)) === null || _target$getProps$call === void 0 ? void 0 : (_target$getProps$call2 = _target$getProps$call.getPropValue) === null || _target$getProps$call2 === void 0 ? void 0 : _target$getProps$call2.call(_target$getProps$call, 'dataList');
|
|
265
|
+
if (existing !== undefined) return existing;
|
|
266
|
+
return DEFAULT_DATA_LIST;
|
|
267
|
+
}
|
|
169
268
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
269
|
+
extraProps: {
|
|
270
|
+
ignoreDefaultValue: function ignoreDefaultValue() {
|
|
271
|
+
return true;
|
|
272
|
+
},
|
|
273
|
+
getValue: function getValue(target, currentValue) {
|
|
274
|
+
var _target$node2, _target$node2$schema, _target$node2$schema$;
|
|
275
|
+
if (currentValue !== undefined) return currentValue;
|
|
276
|
+
var fromSchema = target === null || target === void 0 ? void 0 : (_target$node2 = target.node) === null || _target$node2 === void 0 ? void 0 : (_target$node2$schema = _target$node2.schema) === null || _target$node2$schema === void 0 ? void 0 : (_target$node2$schema$ = _target$node2$schema.props) === null || _target$node2$schema$ === void 0 ? void 0 : _target$node2$schema$.dataList;
|
|
277
|
+
if (fromSchema !== undefined) return fromSchema;
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
177
280
|
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
children: [{
|
|
189
|
-
label: '图片链接',
|
|
190
|
-
value: 'image'
|
|
281
|
+
}, {
|
|
282
|
+
title: '类型',
|
|
283
|
+
name: 'type',
|
|
284
|
+
description: '列表类型',
|
|
285
|
+
setter: {
|
|
286
|
+
componentName: 'RadioGroupSetter',
|
|
287
|
+
props: {
|
|
288
|
+
options: [{
|
|
289
|
+
label: '图文',
|
|
290
|
+
value: 'textAndImg'
|
|
191
291
|
}, {
|
|
192
|
-
label: '
|
|
193
|
-
value: '
|
|
292
|
+
label: '仅图片',
|
|
293
|
+
value: 'imgOnly'
|
|
194
294
|
}, {
|
|
195
|
-
label: '
|
|
196
|
-
value: '
|
|
295
|
+
label: '仅文字',
|
|
296
|
+
value: 'textOnly'
|
|
297
|
+
}]
|
|
298
|
+
},
|
|
299
|
+
initialValue: 'textAndImg'
|
|
300
|
+
}
|
|
301
|
+
}, {
|
|
302
|
+
title: '是否购物车列表',
|
|
303
|
+
name: 'isShoppingCart',
|
|
304
|
+
setter: {
|
|
305
|
+
componentName: 'BoolSetter',
|
|
306
|
+
isRequired: true,
|
|
307
|
+
initialValue: false
|
|
308
|
+
}
|
|
309
|
+
}, {
|
|
310
|
+
title: '是否愿望单列表',
|
|
311
|
+
name: 'isWishList',
|
|
312
|
+
setter: {
|
|
313
|
+
componentName: 'BoolSetter',
|
|
314
|
+
isRequired: true,
|
|
315
|
+
initialValue: false
|
|
316
|
+
}
|
|
317
|
+
}, {
|
|
318
|
+
title: '是否用户菜单列表',
|
|
319
|
+
name: 'isUserMenu',
|
|
320
|
+
setter: {
|
|
321
|
+
componentName: 'BoolSetter',
|
|
322
|
+
isRequired: true,
|
|
323
|
+
initialValue: false
|
|
324
|
+
}
|
|
325
|
+
}]
|
|
326
|
+
},
|
|
327
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
328
|
+
// 分组二:列表布局
|
|
329
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
330
|
+
{
|
|
331
|
+
type: 'group',
|
|
332
|
+
title: '列表布局',
|
|
333
|
+
display: 'accordion',
|
|
334
|
+
items: [{
|
|
335
|
+
title: '子项分布',
|
|
336
|
+
name: 'itemRowAlign',
|
|
337
|
+
description: '列方向或横向一行滚动',
|
|
338
|
+
setter: {
|
|
339
|
+
componentName: 'RadioGroupSetter',
|
|
340
|
+
props: {
|
|
341
|
+
options: [{
|
|
342
|
+
label: '纵向列表',
|
|
343
|
+
value: 'column'
|
|
197
344
|
}, {
|
|
198
|
-
label: '
|
|
199
|
-
value: '
|
|
345
|
+
label: '横向滚动',
|
|
346
|
+
value: 'row'
|
|
200
347
|
}]
|
|
201
|
-
}
|
|
348
|
+
},
|
|
349
|
+
initialValue: 'column'
|
|
202
350
|
}
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
tip: 'moreText | 更多文字'
|
|
224
|
-
},
|
|
225
|
-
name: 'moreText',
|
|
226
|
-
description: '更多文字',
|
|
227
|
-
setter: {
|
|
228
|
-
componentName: 'StringSetter',
|
|
229
|
-
isRequired: false,
|
|
230
|
-
initialValue: ''
|
|
231
|
-
}
|
|
232
|
-
}, {
|
|
233
|
-
title: '文字行数',
|
|
234
|
-
name: 'textLines',
|
|
235
|
-
description: '文字行数',
|
|
236
|
-
setter: {
|
|
237
|
-
componentName: 'NumberSetter',
|
|
238
|
-
isRequired: false,
|
|
239
|
-
initialValue: 2,
|
|
240
|
-
defaultValue: 2,
|
|
241
|
-
props: {
|
|
242
|
-
min: 2,
|
|
243
|
-
max: 4
|
|
351
|
+
}, {
|
|
352
|
+
title: '子项列数',
|
|
353
|
+
name: 'itemColumns',
|
|
354
|
+
description: '纵向模式时的列数(1-4)',
|
|
355
|
+
setter: {
|
|
356
|
+
componentName: 'NumberSetter',
|
|
357
|
+
isRequired: false,
|
|
358
|
+
initialValue: function initialValue(target) {
|
|
359
|
+
var p = target.getProps().getPropValue('imagePlacement');
|
|
360
|
+
return p === 'top' || p === 'bottom' ? 2 : 1;
|
|
361
|
+
},
|
|
362
|
+
defaultValue: function defaultValue(target) {
|
|
363
|
+
var p = target.getProps().getPropValue('imagePlacement');
|
|
364
|
+
return p === 'top' || p === 'bottom' ? 2 : 1;
|
|
365
|
+
},
|
|
366
|
+
props: {
|
|
367
|
+
min: 1,
|
|
368
|
+
max: 4
|
|
369
|
+
}
|
|
244
370
|
}
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var _child$props, _child$props$key;
|
|
257
|
-
return child.componentName === 'NextText' && (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : (_child$props$key = _child$props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
|
|
258
|
-
})) === null || _schemaChildren$filte === void 0 ? void 0 : _schemaChildren$filte.length) || 0;
|
|
259
|
-
if (value > currentLength) {
|
|
260
|
-
// 需要添加新的文本组件
|
|
261
|
-
for (var i = currentLength + 1; i <= value; i++) {
|
|
262
|
-
var _node$children;
|
|
263
|
-
var newChild = {
|
|
264
|
-
componentName: 'NextText',
|
|
265
|
-
props: {
|
|
266
|
-
type: 'inherit',
|
|
267
|
-
children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
|
|
268
|
-
key: "text-" + i
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
node === null || node === void 0 ? void 0 : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.push(newChild);
|
|
272
|
-
}
|
|
273
|
-
} else if (value < currentLength) {
|
|
274
|
-
var _node$children2, _node$children2$forEa;
|
|
275
|
-
// 收集需要移除的节点,再调用 child.remove() 通过引擎 API 逐个删除
|
|
276
|
-
// 避免 node.children = [...] 直接赋值(IPublicModelNodeChildren 不支持重新赋值)
|
|
277
|
-
var nodesToRemove = [];
|
|
278
|
-
node === null || node === void 0 ? void 0 : (_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : (_node$children2$forEa = _node$children2.forEach) === null || _node$children2$forEa === void 0 ? void 0 : _node$children2$forEa.call(_node$children2, function (child) {
|
|
279
|
-
var _child$schema, _child$schema$props;
|
|
280
|
-
var key = child === null || child === void 0 ? void 0 : (_child$schema = child.schema) === null || _child$schema === void 0 ? void 0 : (_child$schema$props = _child$schema.props) === null || _child$schema$props === void 0 ? void 0 : _child$schema$props.key;
|
|
281
|
-
if ((child === null || child === void 0 ? void 0 : child.componentName) === 'NextText' && typeof key === 'string' && key.startsWith('text-')) {
|
|
282
|
-
var order = Number(key.split('-')[1]);
|
|
283
|
-
if (!Number.isNaN(order) && order > value) {
|
|
284
|
-
nodesToRemove.push(child);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
nodesToRemove.forEach(function (child) {
|
|
289
|
-
var _child$remove;
|
|
290
|
-
return child === null || child === void 0 ? void 0 : (_child$remove = child.remove) === null || _child$remove === void 0 ? void 0 : _child$remove.call(child);
|
|
291
|
-
});
|
|
371
|
+
}, {
|
|
372
|
+
title: '子项间距',
|
|
373
|
+
name: 'itemGap',
|
|
374
|
+
description: '子项之间的间距(px)',
|
|
375
|
+
setter: {
|
|
376
|
+
componentName: 'NumberSetter',
|
|
377
|
+
isRequired: false,
|
|
378
|
+
initialValue: 10,
|
|
379
|
+
defaultValue: 10,
|
|
380
|
+
props: {
|
|
381
|
+
min: 0
|
|
292
382
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
383
|
+
}
|
|
384
|
+
}]
|
|
385
|
+
},
|
|
386
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
387
|
+
// 分组三:列表项样式
|
|
388
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
389
|
+
{
|
|
390
|
+
type: 'group',
|
|
391
|
+
title: '子项样式',
|
|
392
|
+
display: 'accordion',
|
|
393
|
+
items: [{
|
|
394
|
+
title: '内边距',
|
|
395
|
+
name: 'itemPadding',
|
|
396
|
+
description: '列表项内边距(px)',
|
|
397
|
+
setter: {
|
|
398
|
+
componentName: 'NumberSetter',
|
|
399
|
+
isRequired: false,
|
|
400
|
+
initialValue: 0,
|
|
401
|
+
defaultValue: 0,
|
|
402
|
+
props: {
|
|
403
|
+
min: 0
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}, {
|
|
407
|
+
title: '背景颜色',
|
|
408
|
+
name: 'itemBgColor',
|
|
409
|
+
description: '列表项背景颜色',
|
|
410
|
+
setter: {
|
|
411
|
+
componentName: 'ColorSetter',
|
|
412
|
+
isRequired: false,
|
|
413
|
+
initialValue: '#ffffff'
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
title: '圆角',
|
|
417
|
+
name: 'itemBorderRadius',
|
|
418
|
+
description: '列表项圆角(px)',
|
|
419
|
+
setter: {
|
|
420
|
+
componentName: 'NumberSetter',
|
|
421
|
+
isRequired: false,
|
|
422
|
+
initialValue: 0,
|
|
423
|
+
defaultValue: 0,
|
|
424
|
+
props: {
|
|
425
|
+
min: 0
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}, {
|
|
429
|
+
title: '边框颜色',
|
|
430
|
+
name: 'itemBorderColor',
|
|
431
|
+
description: '列表项边框颜色',
|
|
432
|
+
setter: {
|
|
433
|
+
componentName: 'ColorSetter',
|
|
434
|
+
isRequired: false,
|
|
435
|
+
initialValue: ''
|
|
436
|
+
}
|
|
437
|
+
}, {
|
|
438
|
+
title: '边框宽度',
|
|
439
|
+
name: 'itemBorderWidth',
|
|
440
|
+
description: '列表项边框宽度(px),设置边框颜色后生效',
|
|
441
|
+
setter: {
|
|
442
|
+
componentName: 'NumberSetter',
|
|
443
|
+
isRequired: false,
|
|
444
|
+
initialValue: 0,
|
|
445
|
+
defaultValue: 0,
|
|
446
|
+
props: {
|
|
447
|
+
min: 0,
|
|
448
|
+
max: 10
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}]
|
|
452
|
+
},
|
|
453
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
454
|
+
// 分组四:图片样式
|
|
455
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
456
|
+
{
|
|
457
|
+
type: 'group',
|
|
458
|
+
title: '图片样式',
|
|
459
|
+
display: 'accordion',
|
|
460
|
+
items: [{
|
|
461
|
+
title: '图片位置',
|
|
462
|
+
name: 'imagePlacement',
|
|
463
|
+
setter: {
|
|
464
|
+
componentName: 'RadioGroupSetter',
|
|
465
|
+
props: {
|
|
466
|
+
options: [{
|
|
467
|
+
label: '左',
|
|
468
|
+
value: 'left'
|
|
302
469
|
}, {
|
|
303
|
-
label: '
|
|
304
|
-
value: '
|
|
470
|
+
label: '右',
|
|
471
|
+
value: 'right'
|
|
305
472
|
}, {
|
|
306
|
-
label: '
|
|
307
|
-
value: '
|
|
473
|
+
label: '上',
|
|
474
|
+
value: 'top'
|
|
308
475
|
}, {
|
|
309
|
-
label: '
|
|
310
|
-
value: '
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
476
|
+
label: '下',
|
|
477
|
+
value: 'bottom'
|
|
478
|
+
}, {
|
|
479
|
+
label: '无',
|
|
480
|
+
value: 'none'
|
|
481
|
+
}]
|
|
482
|
+
},
|
|
483
|
+
initialValue: 'left'
|
|
484
|
+
},
|
|
485
|
+
extraProps: {}
|
|
486
|
+
}, {
|
|
487
|
+
title: '图文对齐',
|
|
488
|
+
name: 'textAlign',
|
|
489
|
+
description: '图片与文字的交叉轴对齐方式',
|
|
490
|
+
setter: {
|
|
491
|
+
componentName: 'RadioGroupSetter',
|
|
492
|
+
props: {
|
|
493
|
+
options: [{
|
|
494
|
+
label: '顶对齐',
|
|
495
|
+
value: 'flex-start'
|
|
496
|
+
}, {
|
|
497
|
+
label: '居中',
|
|
498
|
+
value: 'center'
|
|
499
|
+
}, {
|
|
500
|
+
label: '底对齐',
|
|
501
|
+
value: 'flex-end'
|
|
502
|
+
}]
|
|
503
|
+
},
|
|
504
|
+
initialValue: 'flex-start'
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
title: '图文间距',
|
|
508
|
+
name: 'textImgGap',
|
|
509
|
+
description: '图片与文字区域之间的间距(px)',
|
|
510
|
+
setter: {
|
|
511
|
+
componentName: 'NumberSetter',
|
|
512
|
+
isRequired: false,
|
|
513
|
+
initialValue: 16,
|
|
514
|
+
defaultValue: 16,
|
|
515
|
+
props: {
|
|
516
|
+
min: 0
|
|
325
517
|
}
|
|
326
518
|
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
defaultValue: function defaultValue(target) {
|
|
340
|
-
var isTwoColumns = target.getProps().getPropValue('imagePlacement') === 'top' || target.getProps().getPropValue('imagePlacement') === 'bottom';
|
|
341
|
-
return isTwoColumns ? 2 : 1;
|
|
519
|
+
}, {
|
|
520
|
+
title: '宽度',
|
|
521
|
+
name: 'imgWidth',
|
|
522
|
+
description: '图片宽度(px)',
|
|
523
|
+
setter: {
|
|
524
|
+
componentName: 'NumberSetter',
|
|
525
|
+
isRequired: false,
|
|
526
|
+
initialValue: 100,
|
|
527
|
+
props: {
|
|
528
|
+
min: 10
|
|
529
|
+
}
|
|
342
530
|
},
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
531
|
+
extraProps: {
|
|
532
|
+
ignoreDefaultValue: function ignoreDefaultValue() {
|
|
533
|
+
return true;
|
|
534
|
+
},
|
|
535
|
+
getValue: function getValue(target, value) {
|
|
536
|
+
var _target$node3, _target$node3$schema, _target$node3$schema$;
|
|
537
|
+
var parsed = parsePxNumber(value);
|
|
538
|
+
if (parsed !== undefined) return parsed;
|
|
539
|
+
var fromSchema = parsePxNumber(target === null || target === void 0 ? void 0 : (_target$node3 = target.node) === null || _target$node3 === void 0 ? void 0 : (_target$node3$schema = _target$node3.schema) === null || _target$node3$schema === void 0 ? void 0 : (_target$node3$schema$ = _target$node3$schema.props) === null || _target$node3$schema$ === void 0 ? void 0 : _target$node3$schema$.imgWidth);
|
|
540
|
+
if (fromSchema !== undefined) return fromSchema;
|
|
541
|
+
return 100;
|
|
542
|
+
}
|
|
346
543
|
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}, {
|
|
359
|
-
title: '子项内边距',
|
|
360
|
-
name: 'itemPadding',
|
|
361
|
-
description: '子项内边距',
|
|
362
|
-
setter: {
|
|
363
|
-
componentName: 'NumberSetter',
|
|
364
|
-
isRequired: false,
|
|
365
|
-
initialValue: 0,
|
|
366
|
-
defaultValue: 0
|
|
367
|
-
}
|
|
368
|
-
}, {
|
|
369
|
-
title: '子项背景颜色',
|
|
370
|
-
name: 'itemBgColor',
|
|
371
|
-
description: '子项背景颜色',
|
|
372
|
-
setter: {
|
|
373
|
-
componentName: 'ColorSetter',
|
|
374
|
-
isRequired: false,
|
|
375
|
-
initialValue: '#fff',
|
|
376
|
-
defaultValue: '#fff'
|
|
377
|
-
}
|
|
378
|
-
}, {
|
|
379
|
-
title: '子项分布',
|
|
380
|
-
name: 'itemRowAlign',
|
|
381
|
-
description: '子项分布',
|
|
382
|
-
setter: {
|
|
383
|
-
componentName: 'SelectSetter',
|
|
384
|
-
props: {
|
|
385
|
-
options: [{
|
|
386
|
-
label: '列分布',
|
|
387
|
-
value: 'column'
|
|
388
|
-
}, {
|
|
389
|
-
label: '一行显示',
|
|
390
|
-
value: 'row'
|
|
391
|
-
}]
|
|
392
|
-
},
|
|
393
|
-
initialValue: 'column'
|
|
394
|
-
}
|
|
395
|
-
}, {
|
|
396
|
-
title: '图文对齐方式',
|
|
397
|
-
name: 'textAlign',
|
|
398
|
-
description: '图文对齐方式',
|
|
399
|
-
setter: {
|
|
400
|
-
componentName: 'SelectSetter',
|
|
401
|
-
props: {
|
|
402
|
-
options: [{
|
|
403
|
-
label: '左对齐',
|
|
404
|
-
value: 'flex-start'
|
|
405
|
-
}, {
|
|
406
|
-
label: '右对齐',
|
|
407
|
-
value: 'flex-end'
|
|
408
|
-
}, {
|
|
409
|
-
label: '居中对齐',
|
|
410
|
-
value: 'center'
|
|
411
|
-
}]
|
|
544
|
+
}, {
|
|
545
|
+
title: '高度',
|
|
546
|
+
name: 'imgHeight',
|
|
547
|
+
description: '图片高度(px)',
|
|
548
|
+
setter: {
|
|
549
|
+
componentName: 'NumberSetter',
|
|
550
|
+
isRequired: false,
|
|
551
|
+
initialValue: 100,
|
|
552
|
+
props: {
|
|
553
|
+
min: 10
|
|
554
|
+
}
|
|
412
555
|
},
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
556
|
+
extraProps: {
|
|
557
|
+
ignoreDefaultValue: function ignoreDefaultValue() {
|
|
558
|
+
return true;
|
|
559
|
+
},
|
|
560
|
+
getValue: function getValue(target, value) {
|
|
561
|
+
var _target$node4, _target$node4$schema, _target$node4$schema$;
|
|
562
|
+
var parsed = parsePxNumber(value);
|
|
563
|
+
if (parsed !== undefined) return parsed;
|
|
564
|
+
var fromSchema = parsePxNumber(target === null || target === void 0 ? void 0 : (_target$node4 = target.node) === null || _target$node4 === void 0 ? void 0 : (_target$node4$schema = _target$node4.schema) === null || _target$node4$schema === void 0 ? void 0 : (_target$node4$schema$ = _target$node4$schema.props) === null || _target$node4$schema$ === void 0 ? void 0 : _target$node4$schema$.imgHeight);
|
|
565
|
+
if (fromSchema !== undefined) return fromSchema;
|
|
566
|
+
return 100;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}, {
|
|
570
|
+
title: '圆角',
|
|
571
|
+
name: 'imgBorderRadius',
|
|
572
|
+
description: '图片圆角(px),设为 999 可得到圆形',
|
|
573
|
+
setter: {
|
|
574
|
+
componentName: 'NumberSetter',
|
|
575
|
+
isRequired: false,
|
|
576
|
+
initialValue: 0,
|
|
577
|
+
defaultValue: 0,
|
|
578
|
+
props: {
|
|
579
|
+
min: 0
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}, {
|
|
583
|
+
title: '填充方式',
|
|
584
|
+
name: 'imgObjectFit',
|
|
585
|
+
description: '图片在容器内的填充方式',
|
|
586
|
+
setter: {
|
|
587
|
+
componentName: 'RadioGroupSetter',
|
|
588
|
+
props: {
|
|
589
|
+
options: [{
|
|
590
|
+
label: '覆盖',
|
|
591
|
+
value: 'cover'
|
|
592
|
+
}, {
|
|
593
|
+
label: '适应',
|
|
594
|
+
value: 'contain'
|
|
595
|
+
}, {
|
|
596
|
+
label: '拉伸',
|
|
597
|
+
value: 'fill'
|
|
598
|
+
}, {
|
|
599
|
+
label: '原始',
|
|
600
|
+
value: 'none'
|
|
601
|
+
}]
|
|
602
|
+
},
|
|
603
|
+
initialValue: 'cover'
|
|
604
|
+
}
|
|
605
|
+
}]
|
|
606
|
+
},
|
|
607
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
608
|
+
// 分组五:标题文字样式
|
|
609
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
610
|
+
{
|
|
611
|
+
type: 'group',
|
|
612
|
+
title: '标题文字样式',
|
|
613
|
+
display: 'accordion',
|
|
614
|
+
items: [{
|
|
615
|
+
title: '颜色',
|
|
616
|
+
name: 'titleColor',
|
|
617
|
+
setter: {
|
|
618
|
+
componentName: 'ColorSetter',
|
|
619
|
+
isRequired: false,
|
|
620
|
+
initialValue: ''
|
|
621
|
+
}
|
|
622
|
+
}, {
|
|
623
|
+
title: '字体大小',
|
|
624
|
+
name: 'titleFontSize',
|
|
625
|
+
description: '标题字体大小(px)',
|
|
626
|
+
setter: {
|
|
627
|
+
componentName: 'NumberSetter',
|
|
628
|
+
isRequired: false,
|
|
629
|
+
initialValue: 14,
|
|
630
|
+
defaultValue: 14,
|
|
631
|
+
props: {
|
|
632
|
+
min: 10,
|
|
633
|
+
max: 60
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
title: '字重',
|
|
638
|
+
name: 'titleFontWeight',
|
|
639
|
+
setter: {
|
|
640
|
+
componentName: 'RadioGroupSetter',
|
|
641
|
+
props: {
|
|
642
|
+
options: [{
|
|
643
|
+
label: '常规',
|
|
644
|
+
value: 'normal'
|
|
645
|
+
}, {
|
|
646
|
+
label: '中等',
|
|
647
|
+
value: '500'
|
|
648
|
+
}, {
|
|
649
|
+
label: '半粗',
|
|
650
|
+
value: '600'
|
|
651
|
+
}, {
|
|
652
|
+
label: '粗体',
|
|
653
|
+
value: 'bold'
|
|
654
|
+
}]
|
|
655
|
+
},
|
|
656
|
+
initialValue: '600'
|
|
657
|
+
}
|
|
658
|
+
}, {
|
|
659
|
+
title: '最大行数',
|
|
660
|
+
name: 'titleLineClamp',
|
|
661
|
+
description: '超出后显示省略号,0 表示不限制',
|
|
662
|
+
setter: {
|
|
663
|
+
componentName: 'NumberSetter',
|
|
664
|
+
isRequired: false,
|
|
665
|
+
initialValue: 1,
|
|
666
|
+
defaultValue: 1,
|
|
667
|
+
props: {
|
|
668
|
+
min: 0,
|
|
669
|
+
max: 10
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}]
|
|
673
|
+
},
|
|
674
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
675
|
+
// 分组六:说明文字样式
|
|
676
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
677
|
+
{
|
|
678
|
+
type: 'group',
|
|
679
|
+
title: '说明文字样式',
|
|
680
|
+
display: 'accordion',
|
|
681
|
+
items: [{
|
|
682
|
+
title: '颜色',
|
|
683
|
+
name: 'descriptionColor',
|
|
684
|
+
setter: {
|
|
685
|
+
componentName: 'ColorSetter',
|
|
686
|
+
isRequired: false,
|
|
687
|
+
initialValue: ''
|
|
688
|
+
}
|
|
689
|
+
}, {
|
|
690
|
+
title: '字体大小',
|
|
691
|
+
name: 'descriptionFontSize',
|
|
692
|
+
description: '说明字体大小(px)',
|
|
693
|
+
setter: {
|
|
694
|
+
componentName: 'NumberSetter',
|
|
695
|
+
isRequired: false,
|
|
696
|
+
initialValue: 13,
|
|
697
|
+
defaultValue: 13,
|
|
698
|
+
props: {
|
|
699
|
+
min: 10,
|
|
700
|
+
max: 60
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}, {
|
|
704
|
+
title: '字重',
|
|
705
|
+
name: 'descriptionFontWeight',
|
|
706
|
+
setter: {
|
|
707
|
+
componentName: 'RadioGroupSetter',
|
|
708
|
+
props: {
|
|
709
|
+
options: [{
|
|
710
|
+
label: '常规',
|
|
711
|
+
value: 'normal'
|
|
712
|
+
}, {
|
|
713
|
+
label: '中等',
|
|
714
|
+
value: '500'
|
|
715
|
+
}, {
|
|
716
|
+
label: '半粗',
|
|
717
|
+
value: '600'
|
|
718
|
+
}, {
|
|
719
|
+
label: '粗体',
|
|
720
|
+
value: 'bold'
|
|
721
|
+
}]
|
|
722
|
+
},
|
|
723
|
+
initialValue: 'normal'
|
|
724
|
+
}
|
|
725
|
+
}, {
|
|
726
|
+
title: '最大行数',
|
|
727
|
+
name: 'descriptionLineClamp',
|
|
728
|
+
description: '超出后显示省略号,0 表示不限制',
|
|
729
|
+
setter: {
|
|
730
|
+
componentName: 'NumberSetter',
|
|
731
|
+
isRequired: false,
|
|
732
|
+
initialValue: 1,
|
|
733
|
+
defaultValue: 1,
|
|
734
|
+
props: {
|
|
735
|
+
min: 0,
|
|
736
|
+
max: 10
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}]
|
|
740
|
+
},
|
|
741
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
742
|
+
// 浮层图标
|
|
743
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
744
|
+
{
|
|
745
|
+
title: '浮层图标',
|
|
427
746
|
name: 'iconList',
|
|
747
|
+
description: '在每个列表项上叠加绝对定位图标(如角标、标签等)',
|
|
428
748
|
extraProps: {
|
|
429
749
|
display: 'accordion',
|
|
430
|
-
defaultCollapsed:
|
|
750
|
+
defaultCollapsed: true
|
|
431
751
|
},
|
|
432
752
|
setter: {
|
|
433
753
|
componentName: 'ArraySetter',
|
|
@@ -540,138 +860,6 @@ var TeletextListMeta = {
|
|
|
540
860
|
}
|
|
541
861
|
}
|
|
542
862
|
}
|
|
543
|
-
}, {
|
|
544
|
-
title: '是否为购物车列表',
|
|
545
|
-
name: 'isShoppingCart',
|
|
546
|
-
description: '是否为购物车列表',
|
|
547
|
-
setter: {
|
|
548
|
-
componentName: 'BoolSetter',
|
|
549
|
-
isRequired: true,
|
|
550
|
-
initialValue: false
|
|
551
|
-
}
|
|
552
|
-
}, {
|
|
553
|
-
title: '是否为愿望单列表',
|
|
554
|
-
name: 'isWishList',
|
|
555
|
-
description: '是否为愿望单列表',
|
|
556
|
-
setter: {
|
|
557
|
-
componentName: 'BoolSetter',
|
|
558
|
-
isRequired: true,
|
|
559
|
-
initialValue: false
|
|
560
|
-
}
|
|
561
|
-
}, {
|
|
562
|
-
title: '是否为用户菜单列表',
|
|
563
|
-
name: 'isUserMenu',
|
|
564
|
-
description: '是否为用户菜单列表',
|
|
565
|
-
setter: {
|
|
566
|
-
componentName: 'BoolSetter',
|
|
567
|
-
isRequired: true,
|
|
568
|
-
initialValue: false
|
|
569
|
-
}
|
|
570
|
-
}, {
|
|
571
|
-
title: {
|
|
572
|
-
label: {
|
|
573
|
-
type: 'i18n',
|
|
574
|
-
'en-US': 'dataList',
|
|
575
|
-
'zh-CN': '数据'
|
|
576
|
-
},
|
|
577
|
-
tip: 'dataList | 数据'
|
|
578
|
-
},
|
|
579
|
-
name: 'dataList',
|
|
580
|
-
description: '数据',
|
|
581
|
-
setter: {
|
|
582
|
-
componentName: 'ArraySetter',
|
|
583
|
-
props: {
|
|
584
|
-
itemSetter: {
|
|
585
|
-
componentName: 'ObjectSetter',
|
|
586
|
-
props: {
|
|
587
|
-
config: {
|
|
588
|
-
items: [{
|
|
589
|
-
title: {
|
|
590
|
-
label: {
|
|
591
|
-
type: 'i18n',
|
|
592
|
-
'en-US': 'title',
|
|
593
|
-
'zh-CN': '标题'
|
|
594
|
-
}
|
|
595
|
-
},
|
|
596
|
-
name: 'title',
|
|
597
|
-
description: '标题',
|
|
598
|
-
setter: {
|
|
599
|
-
componentName: 'StringSetter',
|
|
600
|
-
isRequired: false,
|
|
601
|
-
initialValue: ''
|
|
602
|
-
}
|
|
603
|
-
}, {
|
|
604
|
-
title: {
|
|
605
|
-
label: {
|
|
606
|
-
type: 'i18n',
|
|
607
|
-
'en-US': 'image',
|
|
608
|
-
'zh-CN': '图片地址'
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
name: 'image',
|
|
612
|
-
description: '图片地址',
|
|
613
|
-
setter: {
|
|
614
|
-
componentName: 'CustomImageSetter',
|
|
615
|
-
isRequired: false,
|
|
616
|
-
initialValue: ''
|
|
617
|
-
}
|
|
618
|
-
}, {
|
|
619
|
-
title: {
|
|
620
|
-
label: {
|
|
621
|
-
type: 'i18n',
|
|
622
|
-
'en-US': 'description',
|
|
623
|
-
'zh-CN': '描述'
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
name: 'description',
|
|
627
|
-
description: '描述',
|
|
628
|
-
setter: {
|
|
629
|
-
componentName: 'StringSetter',
|
|
630
|
-
isRequired: false,
|
|
631
|
-
initialValue: ''
|
|
632
|
-
}
|
|
633
|
-
}],
|
|
634
|
-
extraSetter: {
|
|
635
|
-
componentName: 'MixedSetter',
|
|
636
|
-
isRequired: false,
|
|
637
|
-
props: {}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
initialValue: function initialValue(target) {
|
|
644
|
-
var _target$node$schema$p2, _target$node4, _target$node4$schema, _target$node4$schema$, _target$getProps, _target$getProps$call, _target$getProps$call2;
|
|
645
|
-
// ignoreDefaultValue: () => true 保证此函数在 SettingFieldView remount 时
|
|
646
|
-
// 永远不会被 initDefaultValue 调用,仅作为安全兜底保留。
|
|
647
|
-
// 正常的首次创建数据由 snippet.props.dataList 提供。
|
|
648
|
-
var existing = (_target$node$schema$p2 = target === null || target === void 0 ? void 0 : (_target$node4 = target.node) === null || _target$node4 === void 0 ? void 0 : (_target$node4$schema = _target$node4.schema) === null || _target$node4$schema === void 0 ? void 0 : (_target$node4$schema$ = _target$node4$schema.props) === null || _target$node4$schema$ === void 0 ? void 0 : _target$node4$schema$.dataList) !== null && _target$node$schema$p2 !== void 0 ? _target$node$schema$p2 : target === null || target === void 0 ? void 0 : (_target$getProps = target.getProps) === null || _target$getProps === void 0 ? void 0 : (_target$getProps$call = _target$getProps.call(target)) === null || _target$getProps$call === void 0 ? void 0 : (_target$getProps$call2 = _target$getProps$call.getPropValue) === null || _target$getProps$call2 === void 0 ? void 0 : _target$getProps$call2.call(_target$getProps$call, 'dataList');
|
|
649
|
-
if (existing !== undefined) return existing;
|
|
650
|
-
return DEFAULT_DATA_LIST;
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
extraProps: {
|
|
654
|
-
/**
|
|
655
|
-
* ignoreDefaultValue: 彻底阻止引擎在 SettingFieldView remount 时
|
|
656
|
-
* 调用 initDefaultValue → 把 initialValue(默认数据数组)通过 field.setValue
|
|
657
|
-
* 写入 dataList prop,覆盖已绑定的 JSExpression。
|
|
658
|
-
*
|
|
659
|
-
* 这是根本性解决方案:在引擎层面阻断 initDefaultValue 的执行,
|
|
660
|
-
* 而不是试图在 initialValue/getValue/setValue 中做缓存和还原来补救。
|
|
661
|
-
*/
|
|
662
|
-
ignoreDefaultValue: function ignoreDefaultValue() {
|
|
663
|
-
return true;
|
|
664
|
-
},
|
|
665
|
-
getValue: function getValue(target, currentValue) {
|
|
666
|
-
var _target$node5, _target$node5$schema, _target$node5$schema$;
|
|
667
|
-
// currentValue 已有值时直接返回
|
|
668
|
-
if (currentValue !== undefined) return currentValue;
|
|
669
|
-
// 从 schema 快照兜底读取(最可靠的源头数据,始终反映持久化状态)
|
|
670
|
-
var fromSchema = target === null || target === void 0 ? void 0 : (_target$node5 = target.node) === null || _target$node5 === void 0 ? void 0 : (_target$node5$schema = _target$node5.schema) === null || _target$node5$schema === void 0 ? void 0 : (_target$node5$schema$ = _target$node5$schema.props) === null || _target$node5$schema$ === void 0 ? void 0 : _target$node5$schema$.dataList;
|
|
671
|
-
if (fromSchema !== undefined) return fromSchema;
|
|
672
|
-
return undefined;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
863
|
}],
|
|
676
864
|
supports: {
|
|
677
865
|
style: true,
|
|
@@ -711,106 +899,9 @@ var getSnippets = function getSnippets(textLines) {
|
|
|
711
899
|
// 因为 dataList 使用了 ignoreDefaultValue:()=>true 来阻止引擎在
|
|
712
900
|
// SettingFieldView remount 时覆盖已绑定的 JSExpression,
|
|
713
901
|
// 所以 initDefaultValue 永远不会运行,首次拖入的初始数据必须由 snippet 提供。
|
|
714
|
-
dataList: DEFAULT_DATA_LIST
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
componentName: 'NextText',
|
|
718
|
-
props: {
|
|
719
|
-
type: 'h5',
|
|
720
|
-
children: '列表标题',
|
|
721
|
-
key: 'box-title',
|
|
722
|
-
style: {
|
|
723
|
-
fontSize: '16px',
|
|
724
|
-
fontWeight: 'bold'
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
}, {
|
|
728
|
-
componentName: 'Image',
|
|
729
|
-
props: {
|
|
730
|
-
imgSrc: 'https://img.alicdn.com/tps/TB16TQvOXXXXXbiaFXXXXXXXXXX-120-120.svg',
|
|
731
|
-
key: 'image'
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
// 动态生成文本组件
|
|
735
|
-
// ...Array.from({ length: textLines }).map((_, index) => ({
|
|
736
|
-
// componentName: 'NextText',
|
|
737
|
-
// props: {
|
|
738
|
-
// type: index === 0 ? 'h5' : 'inherit',
|
|
739
|
-
// children:
|
|
740
|
-
// index === 0
|
|
741
|
-
// ? '标题标题'
|
|
742
|
-
// : '基于1 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
|
|
743
|
-
// key: `text-${index + 1}`,
|
|
744
|
-
// },
|
|
745
|
-
// })),
|
|
746
|
-
{
|
|
747
|
-
componentName: 'NextText',
|
|
748
|
-
props: {
|
|
749
|
-
type: 'h5',
|
|
750
|
-
children: '标题标题',
|
|
751
|
-
key: "text-1"
|
|
752
|
-
}
|
|
753
|
-
}, {
|
|
754
|
-
componentName: 'NextText',
|
|
755
|
-
props: {
|
|
756
|
-
type: 'inherit',
|
|
757
|
-
children: '基于1 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
|
|
758
|
-
key: "text-2"
|
|
759
|
-
}
|
|
760
|
-
}, {
|
|
761
|
-
componentName: 'NextText',
|
|
762
|
-
props: {
|
|
763
|
-
type: 'inherit',
|
|
764
|
-
children: '基于1 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
|
|
765
|
-
key: "text-3"
|
|
766
|
-
}
|
|
767
|
-
}, {
|
|
768
|
-
componentName: 'NextText',
|
|
769
|
-
props: {
|
|
770
|
-
type: 'inherit',
|
|
771
|
-
children: '基于1 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
|
|
772
|
-
key: "text-4"
|
|
773
|
-
}
|
|
774
|
-
}, {
|
|
775
|
-
componentName: 'Select',
|
|
776
|
-
props: {
|
|
777
|
-
popType: 'dialog',
|
|
778
|
-
selectType: 'number',
|
|
779
|
-
value: 1,
|
|
780
|
-
prefix: '数量: ',
|
|
781
|
-
dialogTitle: '选择数量',
|
|
782
|
-
btnText: '确定',
|
|
783
|
-
key: 'select-box-1'
|
|
784
|
-
}
|
|
785
|
-
}, {
|
|
786
|
-
componentName: 'Select',
|
|
787
|
-
props: {
|
|
788
|
-
popType: 'dialog',
|
|
789
|
-
selectType: 'string',
|
|
790
|
-
dataList: [{
|
|
791
|
-
label: 'M',
|
|
792
|
-
value: 'M'
|
|
793
|
-
}, {
|
|
794
|
-
label: 'X',
|
|
795
|
-
value: 'X'
|
|
796
|
-
}, {
|
|
797
|
-
label: 'XL',
|
|
798
|
-
value: 'XL'
|
|
799
|
-
}],
|
|
800
|
-
value: 'X',
|
|
801
|
-
prefix: '尺码: ',
|
|
802
|
-
dialogTitle: '选择尺码',
|
|
803
|
-
btnText: '确定',
|
|
804
|
-
key: 'select-box-2'
|
|
805
|
-
}
|
|
806
|
-
}, {
|
|
807
|
-
componentName: 'Switch',
|
|
808
|
-
props: {
|
|
809
|
-
size: 'small',
|
|
810
|
-
disabled: false,
|
|
811
|
-
key: 'switch-1'
|
|
812
|
-
}
|
|
813
|
-
}]
|
|
902
|
+
dataList: DEFAULT_DATA_LIST,
|
|
903
|
+
title: '列表标题'
|
|
904
|
+
}
|
|
814
905
|
}
|
|
815
906
|
}];
|
|
816
907
|
};
|