@dckj-npm/dc-material 0.1.217 → 0.1.218

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.
@@ -315,6 +315,7 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
315
315
  setValue(target, value) {
316
316
  target.getProps().setPropValue('textLines', value)
317
317
  // 获取组件schema
318
+ const node = target?.node
318
319
  const schema = target?.node?.schema
319
320
  const currentLength =
320
321
  schema?.children?.filter(
@@ -325,18 +326,20 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
325
326
  if (value > currentLength) {
326
327
  // 需要添加新的文本组件
327
328
  for (let i = currentLength + 1; i <= value; i++) {
328
- schema?.children?.push({
329
+ const newChild = {
329
330
  componentName: 'NextText',
330
331
  props: {
331
332
  type: 'inherit',
332
333
  children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
333
334
  key: `text-${i}`,
334
335
  },
335
- })
336
+ }
337
+ // 使用 node.children.push 添加子节点
338
+ node.children.push(newChild)
336
339
  }
337
340
  } else if (value < currentLength) {
338
341
  // 需要移除多余的文本组件
339
- schema.children = schema.children.filter(
342
+ node.children = node.children.filter(
340
343
  (child) =>
341
344
  !(
342
345
  child.componentName === 'NextText' &&
@@ -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.217';
102
+ version = '0.1.218';
103
103
  }
104
104
  if (basicLibraryVersion === void 0) {
105
105
  basicLibraryVersion = {
@@ -273,6 +273,7 @@ var TeletextListMeta = {
273
273
  var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
274
274
  target.getProps().setPropValue('textLines', value);
275
275
  // 获取组件schema
276
+ var node = target === null || target === void 0 ? void 0 : target.node;
276
277
  var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
277
278
  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) {
278
279
  var _child$props$key;
@@ -281,19 +282,20 @@ var TeletextListMeta = {
281
282
  if (value > currentLength) {
282
283
  // 需要添加新的文本组件
283
284
  for (var i = currentLength + 1; i <= value; i++) {
284
- var _schema$children2;
285
- schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
285
+ var newChild = {
286
286
  componentName: 'NextText',
287
287
  props: {
288
288
  type: 'inherit',
289
289
  children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
290
290
  key: "text-" + i
291
291
  }
292
- });
292
+ };
293
+ // 使用 node.children.push 添加子节点
294
+ node.children.push(newChild);
293
295
  }
294
296
  } else if (value < currentLength) {
295
297
  // 需要移除多余的文本组件
296
- schema.children = schema.children.filter(function (child) {
298
+ node.children = node.children.filter(function (child) {
297
299
  var _child$props$key2;
298
300
  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);
299
301
  });
@@ -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.217';
107
+ version = '0.1.218';
108
108
  }
109
109
  if (basicLibraryVersion === void 0) {
110
110
  basicLibraryVersion = {
@@ -278,6 +278,7 @@ var TeletextListMeta = {
278
278
  var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
279
279
  target.getProps().setPropValue('textLines', value);
280
280
  // 获取组件schema
281
+ var node = target === null || target === void 0 ? void 0 : target.node;
281
282
  var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
282
283
  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) {
283
284
  var _child$props$key;
@@ -286,19 +287,20 @@ var TeletextListMeta = {
286
287
  if (value > currentLength) {
287
288
  // 需要添加新的文本组件
288
289
  for (var i = currentLength + 1; i <= value; i++) {
289
- var _schema$children2;
290
- schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
290
+ var newChild = {
291
291
  componentName: 'NextText',
292
292
  props: {
293
293
  type: 'inherit',
294
294
  children: '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台',
295
295
  key: "text-" + i
296
296
  }
297
- });
297
+ };
298
+ // 使用 node.children.push 添加子节点
299
+ node.children.push(newChild);
298
300
  }
299
301
  } else if (value < currentLength) {
300
302
  // 需要移除多余的文本组件
301
- schema.children = schema.children.filter(function (child) {
303
+ node.children = node.children.filter(function (child) {
302
304
  var _child$props$key2;
303
305
  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);
304
306
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dckj-npm/dc-material",
3
- "version": "0.1.217",
3
+ "version": "0.1.218",
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.217/build/lowcode/assets-prod.json"
109
+ "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.218/build/lowcode/assets-prod.json"
110
110
  },
111
111
  "lcMeta": {
112
112
  "type": "component"