@dckj-npm/dc-material 0.1.218 → 0.1.220
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 +7 -7
- package/lowcode_es/meta.js +1 -1
- package/lowcode_es/teletext-list/meta.js +9 -7
- package/lowcode_lib/meta.js +1 -1
- package/lowcode_lib/teletext-list/meta.js +9 -7
- package/package.json +2 -2
|
@@ -314,9 +314,10 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
|
|
|
314
314
|
extraProps: {
|
|
315
315
|
setValue(target, value) {
|
|
316
316
|
target.getProps().setPropValue('textLines', value)
|
|
317
|
-
// 获取组件schema
|
|
318
|
-
const node = target?.node
|
|
319
317
|
const schema = target?.node?.schema
|
|
318
|
+
const node = target?.node
|
|
319
|
+
|
|
320
|
+
// 获取当前文本组件数量
|
|
320
321
|
const currentLength =
|
|
321
322
|
schema?.children?.filter(
|
|
322
323
|
(child) =>
|
|
@@ -334,17 +335,16 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
|
|
|
334
335
|
key: `text-${i}`,
|
|
335
336
|
},
|
|
336
337
|
}
|
|
337
|
-
|
|
338
|
-
node.children.push(newChild)
|
|
338
|
+
node?.children?.push(newChild)
|
|
339
339
|
}
|
|
340
340
|
} else if (value < currentLength) {
|
|
341
341
|
// 需要移除多余的文本组件
|
|
342
|
-
node
|
|
342
|
+
node?.children?.filter(
|
|
343
343
|
(child) =>
|
|
344
344
|
!(
|
|
345
345
|
child.componentName === 'NextText' &&
|
|
346
|
-
child.props
|
|
347
|
-
parseInt(child
|
|
346
|
+
child.props?.key?.startsWith('text-') &&
|
|
347
|
+
parseInt(child?.props?.key.split('-')[1]) > value
|
|
348
348
|
),
|
|
349
349
|
)
|
|
350
350
|
}
|
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.220';
|
|
103
103
|
}
|
|
104
104
|
if (basicLibraryVersion === void 0) {
|
|
105
105
|
basicLibraryVersion = {
|
|
@@ -272,9 +272,10 @@ var TeletextListMeta = {
|
|
|
272
272
|
setValue: function setValue(target, value) {
|
|
273
273
|
var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
|
|
274
274
|
target.getProps().setPropValue('textLines', value);
|
|
275
|
-
// 获取组件schema
|
|
276
|
-
var node = target === null || target === void 0 ? void 0 : target.node;
|
|
277
275
|
var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
|
|
276
|
+
var node = target === null || target === void 0 ? void 0 : target.node;
|
|
277
|
+
|
|
278
|
+
// 获取当前文本组件数量
|
|
278
279
|
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) {
|
|
279
280
|
var _child$props$key;
|
|
280
281
|
return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
|
|
@@ -282,6 +283,7 @@ var TeletextListMeta = {
|
|
|
282
283
|
if (value > currentLength) {
|
|
283
284
|
// 需要添加新的文本组件
|
|
284
285
|
for (var i = currentLength + 1; i <= value; i++) {
|
|
286
|
+
var _node$children;
|
|
285
287
|
var newChild = {
|
|
286
288
|
componentName: 'NextText',
|
|
287
289
|
props: {
|
|
@@ -290,14 +292,14 @@ var TeletextListMeta = {
|
|
|
290
292
|
key: "text-" + i
|
|
291
293
|
}
|
|
292
294
|
};
|
|
293
|
-
|
|
294
|
-
node.children.push(newChild);
|
|
295
|
+
node === null || node === void 0 ? void 0 : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.push(newChild);
|
|
295
296
|
}
|
|
296
297
|
} else if (value < currentLength) {
|
|
298
|
+
var _node$children2;
|
|
297
299
|
// 需要移除多余的文本组件
|
|
298
|
-
node
|
|
299
|
-
var _child$props$key2;
|
|
300
|
-
return !(child.componentName === 'NextText' && (_child$props
|
|
300
|
+
node === null || node === void 0 ? void 0 : (_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2.filter(function (child) {
|
|
301
|
+
var _child$props, _child$props$key2, _child$props2;
|
|
302
|
+
return !(child.componentName === 'NextText' && (_child$props = child.props) !== null && _child$props !== void 0 && (_child$props$key2 = _child$props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.key.split('-')[1]) > value);
|
|
301
303
|
});
|
|
302
304
|
}
|
|
303
305
|
|
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.220';
|
|
108
108
|
}
|
|
109
109
|
if (basicLibraryVersion === void 0) {
|
|
110
110
|
basicLibraryVersion = {
|
|
@@ -277,9 +277,10 @@ var TeletextListMeta = {
|
|
|
277
277
|
setValue: function setValue(target, value) {
|
|
278
278
|
var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
|
|
279
279
|
target.getProps().setPropValue('textLines', value);
|
|
280
|
-
// 获取组件schema
|
|
281
|
-
var node = target === null || target === void 0 ? void 0 : target.node;
|
|
282
280
|
var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
|
|
281
|
+
var node = target === null || target === void 0 ? void 0 : target.node;
|
|
282
|
+
|
|
283
|
+
// 获取当前文本组件数量
|
|
283
284
|
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) {
|
|
284
285
|
var _child$props$key;
|
|
285
286
|
return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
|
|
@@ -287,6 +288,7 @@ var TeletextListMeta = {
|
|
|
287
288
|
if (value > currentLength) {
|
|
288
289
|
// 需要添加新的文本组件
|
|
289
290
|
for (var i = currentLength + 1; i <= value; i++) {
|
|
291
|
+
var _node$children;
|
|
290
292
|
var newChild = {
|
|
291
293
|
componentName: 'NextText',
|
|
292
294
|
props: {
|
|
@@ -295,14 +297,14 @@ var TeletextListMeta = {
|
|
|
295
297
|
key: "text-" + i
|
|
296
298
|
}
|
|
297
299
|
};
|
|
298
|
-
|
|
299
|
-
node.children.push(newChild);
|
|
300
|
+
node === null || node === void 0 ? void 0 : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.push(newChild);
|
|
300
301
|
}
|
|
301
302
|
} else if (value < currentLength) {
|
|
303
|
+
var _node$children2;
|
|
302
304
|
// 需要移除多余的文本组件
|
|
303
|
-
node
|
|
304
|
-
var _child$props$key2;
|
|
305
|
-
return !(child.componentName === 'NextText' && (_child$props
|
|
305
|
+
node === null || node === void 0 ? void 0 : (_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2.filter(function (child) {
|
|
306
|
+
var _child$props, _child$props$key2, _child$props2;
|
|
307
|
+
return !(child.componentName === 'NextText' && (_child$props = child.props) !== null && _child$props !== void 0 && (_child$props$key2 = _child$props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.key.split('-')[1]) > value);
|
|
306
308
|
});
|
|
307
309
|
}
|
|
308
310
|
|
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.220",
|
|
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.220/build/lowcode/assets-prod.json"
|
|
110
110
|
},
|
|
111
111
|
"lcMeta": {
|
|
112
112
|
"type": "component"
|