@dckj-npm/dc-material 0.1.192 → 0.1.193
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/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/lowcode/teletext-list/meta.ts +28 -1
- package/lowcode_es/meta.js +1 -1
- package/lowcode_es/teletext-list/meta.js +25 -1
- package/lowcode_lib/meta.js +1 -1
- package/lowcode_lib/teletext-list/meta.js +25 -1
- package/package.json +2 -2
|
@@ -326,7 +326,34 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
|
|
|
326
326
|
setValue(target, value) {
|
|
327
327
|
target.getProps().setPropValue('textLines', value)
|
|
328
328
|
const schema = target?.node?.schema
|
|
329
|
-
|
|
329
|
+
const currentLength =
|
|
330
|
+
schema?.children?.filter(
|
|
331
|
+
(child) =>
|
|
332
|
+
child.componentName === 'NextText' && child.props.key?.startsWith('text-'),
|
|
333
|
+
)?.length || 0
|
|
334
|
+
if (value > currentLength) {
|
|
335
|
+
// 需要添加新的文本组件
|
|
336
|
+
for (let i = currentLength + 1; i <= value; i++) {
|
|
337
|
+
schema?.children?.push({
|
|
338
|
+
componentName: 'NextText',
|
|
339
|
+
props: {
|
|
340
|
+
type: 'inherit',
|
|
341
|
+
children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
|
|
342
|
+
key: `text-${i}`,
|
|
343
|
+
},
|
|
344
|
+
})
|
|
345
|
+
}
|
|
346
|
+
} else if (value < currentLength) {
|
|
347
|
+
// 需要移除多余的文本组件
|
|
348
|
+
schema.children = schema.children.filter(
|
|
349
|
+
(child) =>
|
|
350
|
+
!(
|
|
351
|
+
child.componentName === 'NextText' &&
|
|
352
|
+
child.props.key?.startsWith('text-') &&
|
|
353
|
+
parseInt(child.props.key.split('-')[1]) > value
|
|
354
|
+
),
|
|
355
|
+
)
|
|
356
|
+
}
|
|
330
357
|
console.log('文字行数', target, value, schema)
|
|
331
358
|
},
|
|
332
359
|
},
|
package/lowcode_es/meta.js
CHANGED
|
@@ -99,7 +99,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
99
99
|
packageName = '@dckj-npm/dc-material';
|
|
100
100
|
}
|
|
101
101
|
if (version === void 0) {
|
|
102
|
-
version = '0.1.
|
|
102
|
+
version = '0.1.193';
|
|
103
103
|
}
|
|
104
104
|
if (basicLibraryVersion === void 0) {
|
|
105
105
|
basicLibraryVersion = {
|
|
@@ -284,9 +284,33 @@ var TeletextListMeta = {
|
|
|
284
284
|
},
|
|
285
285
|
extraProps: {
|
|
286
286
|
setValue: function setValue(target, value) {
|
|
287
|
-
var _target$node;
|
|
287
|
+
var _target$node, _schema$children, _schema$children$filt;
|
|
288
288
|
target.getProps().setPropValue('textLines', value);
|
|
289
289
|
var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
|
|
290
|
+
var currentLength = (schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : (_schema$children$filt = _schema$children.filter(function (child) {
|
|
291
|
+
var _child$props$key;
|
|
292
|
+
return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
|
|
293
|
+
})) === null || _schema$children$filt === void 0 ? void 0 : _schema$children$filt.length) || 0;
|
|
294
|
+
if (value > currentLength) {
|
|
295
|
+
// 需要添加新的文本组件
|
|
296
|
+
for (var i = currentLength + 1; i <= value; i++) {
|
|
297
|
+
var _schema$children2;
|
|
298
|
+
schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
|
|
299
|
+
componentName: 'NextText',
|
|
300
|
+
props: {
|
|
301
|
+
type: 'inherit',
|
|
302
|
+
children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
|
|
303
|
+
key: "text-" + i
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
} else if (value < currentLength) {
|
|
308
|
+
// 需要移除多余的文本组件
|
|
309
|
+
schema.children = schema.children.filter(function (child) {
|
|
310
|
+
var _child$props$key2;
|
|
311
|
+
return !(child.componentName === 'NextText' && (_child$props$key2 = child.props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child.props.key.split('-')[1]) > value);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
290
314
|
console.log('文字行数', target, value, schema);
|
|
291
315
|
}
|
|
292
316
|
}
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -104,7 +104,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
104
104
|
packageName = '@dckj-npm/dc-material';
|
|
105
105
|
}
|
|
106
106
|
if (version === void 0) {
|
|
107
|
-
version = '0.1.
|
|
107
|
+
version = '0.1.193';
|
|
108
108
|
}
|
|
109
109
|
if (basicLibraryVersion === void 0) {
|
|
110
110
|
basicLibraryVersion = {
|
|
@@ -289,9 +289,33 @@ var TeletextListMeta = {
|
|
|
289
289
|
},
|
|
290
290
|
extraProps: {
|
|
291
291
|
setValue: function setValue(target, value) {
|
|
292
|
-
var _target$node;
|
|
292
|
+
var _target$node, _schema$children, _schema$children$filt;
|
|
293
293
|
target.getProps().setPropValue('textLines', value);
|
|
294
294
|
var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
|
|
295
|
+
var currentLength = (schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : (_schema$children$filt = _schema$children.filter(function (child) {
|
|
296
|
+
var _child$props$key;
|
|
297
|
+
return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
|
|
298
|
+
})) === null || _schema$children$filt === void 0 ? void 0 : _schema$children$filt.length) || 0;
|
|
299
|
+
if (value > currentLength) {
|
|
300
|
+
// 需要添加新的文本组件
|
|
301
|
+
for (var i = currentLength + 1; i <= value; i++) {
|
|
302
|
+
var _schema$children2;
|
|
303
|
+
schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
|
|
304
|
+
componentName: 'NextText',
|
|
305
|
+
props: {
|
|
306
|
+
type: 'inherit',
|
|
307
|
+
children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
|
|
308
|
+
key: "text-" + i
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
} else if (value < currentLength) {
|
|
313
|
+
// 需要移除多余的文本组件
|
|
314
|
+
schema.children = schema.children.filter(function (child) {
|
|
315
|
+
var _child$props$key2;
|
|
316
|
+
return !(child.componentName === 'NextText' && (_child$props$key2 = child.props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child.props.key.split('-')[1]) > value);
|
|
317
|
+
});
|
|
318
|
+
}
|
|
295
319
|
console.log('文字行数', target, value, schema);
|
|
296
320
|
}
|
|
297
321
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dckj-npm/dc-material",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.193",
|
|
4
4
|
"description": "dc低代码物料",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"componentConfig": {
|
|
108
108
|
"isComponentLibrary": true,
|
|
109
|
-
"materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.
|
|
109
|
+
"materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.193/build/lowcode/assets-prod.json"
|
|
110
110
|
},
|
|
111
111
|
"lcMeta": {
|
|
112
112
|
"type": "component"
|