@dckj-npm/dc-material 0.1.190 → 0.1.192

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.
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  exports.__esModule = true;
5
5
  exports["default"] = void 0;
6
6
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
+ var _props, _props$find, _props$find$setter, _props$find$setter$ge;
7
8
  var TeletextListMeta = {
8
9
  group: '低代码组件',
9
10
  componentName: 'TeletextList',
@@ -126,17 +127,14 @@ var TeletextListMeta = {
126
127
  }, {
127
128
  label: '说明',
128
129
  value: 'description'
129
- }, {
130
- label: '标签',
131
- value: 'tags'
132
130
  }]
133
131
  }]
134
132
  }
135
133
  },
136
134
  extraProps: {
137
- getValue: function getValue(target, fieldValue) {
135
+ getValue: function getValue(target, value) {
138
136
  var textLines = target.getProps().getPropValue('textLines');
139
- console.log(target, fieldValue);
137
+ console.log(target, value);
140
138
  return [{
141
139
  label: '图片链接',
142
140
  value: 'image'
@@ -147,10 +145,7 @@ var TeletextListMeta = {
147
145
  label: "\u6587\u672C" + (index + 1),
148
146
  value: "text" + (index + 1)
149
147
  };
150
- }), [{
151
- label: '标签',
152
- value: 'tags'
153
- }]);
148
+ }));
154
149
  },
155
150
  setValue: function setValue(target, value) {
156
151
  console.log('dataList', target, value);
@@ -219,65 +214,6 @@ var TeletextListMeta = {
219
214
  isRequired: false,
220
215
  initialValue: ''
221
216
  }
222
- }, {
223
- title: {
224
- label: {
225
- type: 'i18n',
226
- 'en-US': 'tags',
227
- 'zh-CN': '标签列表'
228
- }
229
- },
230
- name: 'tags',
231
- description: '标签列表',
232
- setter: {
233
- componentName: 'ArraySetter',
234
- props: {
235
- itemSetter: {
236
- componentName: 'ObjectSetter',
237
- props: {
238
- config: {
239
- items: [{
240
- title: {
241
- label: {
242
- type: 'i18n',
243
- 'en-US': 'name',
244
- 'zh-CN': '标签名称'
245
- }
246
- },
247
- name: 'name',
248
- description: '标签名称',
249
- setter: {
250
- componentName: 'StringSetter',
251
- isRequired: true,
252
- initialValue: ''
253
- }
254
- }, {
255
- title: {
256
- label: {
257
- type: 'i18n',
258
- 'en-US': 'color',
259
- 'zh-CN': '标签颜色'
260
- }
261
- },
262
- name: 'color',
263
- description: '标签颜色',
264
- setter: {
265
- componentName: 'StringSetter',
266
- isRequired: true,
267
- initialValue: ''
268
- }
269
- }],
270
- extraSetter: {
271
- componentName: 'MixedSetter',
272
- isRequired: false,
273
- props: {}
274
- }
275
- }
276
- }
277
- }
278
- },
279
- initialValue: []
280
- }
281
217
  }],
282
218
  extraSetter: {
283
219
  componentName: 'MixedSetter',
@@ -353,8 +289,10 @@ var TeletextListMeta = {
353
289
  },
354
290
  extraProps: {
355
291
  setValue: function setValue(target, value) {
292
+ var _target$node;
356
293
  target.getProps().setPropValue('textLines', value);
357
- console.log('文字行数', target, value);
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
+ console.log('文字行数', target, value, schema);
358
296
  }
359
297
  }
360
298
  }, {
@@ -498,11 +436,23 @@ var TeletextListMeta = {
498
436
  }, {
499
437
  title: '列表项间距',
500
438
  name: 'itemGap',
501
- description: '列表项间距'
439
+ description: '列表项间距',
440
+ setter: {
441
+ componentName: 'NumberSetter',
442
+ isRequired: false,
443
+ initialValue: 10,
444
+ defaultValue: 10
445
+ }
502
446
  }, {
503
447
  title: '列表项内边距',
504
448
  name: 'itemPadding',
505
- description: '列表项内边距'
449
+ description: '列表项内边距',
450
+ setter: {
451
+ componentName: 'NumberSetter',
452
+ isRequired: false,
453
+ initialValue: 0,
454
+ defaultValue: 0
455
+ }
506
456
  }],
507
457
  supports: {
508
458
  style: true,
@@ -519,50 +469,50 @@ var TeletextListMeta = {
519
469
  }
520
470
  }
521
471
  };
522
- var snippets = [{
523
- title: '图文列表',
524
- screenshot: '',
525
- schema: {
526
- componentName: 'TeletextList',
527
- props: {},
528
- children: [{
529
- componentName: 'NextText',
530
- props: {
531
- type: 'h5',
532
- children: '列表标题',
533
- key: 'box-title',
534
- style: {
535
- fontSize: '16px',
536
- fontWeight: 'bold'
537
- }
538
- }
539
- }, {
540
- componentName: 'Image',
541
- props: {
542
- src: 'https://img.alicdn.com/tps/TB16TQvOXXXXXbiaFXXXXXXXXXX-120-120.svg',
543
- key: 'image'
544
- }
545
- }].concat(Array.from({
546
- length: 2
547
- }).map(function (_, index) {
548
- return {
472
+ var getSnippets = function getSnippets(textLines) {
473
+ if (textLines === void 0) {
474
+ textLines = 2;
475
+ }
476
+ return [{
477
+ title: '图文列表',
478
+ screenshot: '',
479
+ schema: {
480
+ componentName: 'TeletextList',
481
+ props: {},
482
+ children: [{
549
483
  componentName: 'NextText',
550
484
  props: {
551
- type: index === 0 ? 'h5' : 'inherit',
552
- children: index === 0 ? '标题标题' : '基于 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
553
- key: index === 0 ? 'text-1' : 'text-2'
485
+ type: 'h5',
486
+ children: '列表标题',
487
+ key: 'box-title',
488
+ style: {
489
+ fontSize: '16px',
490
+ fontWeight: 'bold'
491
+ }
554
492
  }
555
- };
556
- }), [{
557
- componentName: 'TagC',
558
- props: {
559
- name: '报名火热',
560
- color: 'orange',
561
- key: 'teletext-tag-c'
562
- }
563
- }])
564
- }
565
- }];
493
+ }, {
494
+ componentName: 'Image',
495
+ props: {
496
+ src: 'https://img.alicdn.com/tps/TB16TQvOXXXXXbiaFXXXXXXXXXX-120-120.svg',
497
+ key: 'image'
498
+ }
499
+ }].concat(Array.from({
500
+ length: textLines
501
+ }).map(function (_, index) {
502
+ return {
503
+ componentName: 'NextText',
504
+ props: {
505
+ type: index === 0 ? 'h5' : 'inherit',
506
+ children: index === 0 ? '标题标题' : '基于1 Ali-Lowcode-Engine 快速打造高生产力的低代码研发平台, 基于自然布局体系快速搭建页面',
507
+ key: "text-" + (index + 1)
508
+ }
509
+ };
510
+ }))
511
+ }
512
+ }];
513
+ };
566
514
  var _default = exports["default"] = (0, _extends2["default"])({}, TeletextListMeta, {
567
- snippets: snippets
515
+ snippets: getSnippets(((_props = TeletextListMeta.configure.props) === null || _props === void 0 ? void 0 : (_props$find = _props.find(function (prop) {
516
+ return prop.name === 'textLines';
517
+ })) === null || _props$find === void 0 ? void 0 : (_props$find$setter = _props$find.setter) === null || _props$find$setter === void 0 ? void 0 : (_props$find$setter$ge = _props$find$setter.getValue) === null || _props$find$setter$ge === void 0 ? void 0 : _props$find$setter$ge.call(_props$find$setter)) || 2)
568
518
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dckj-npm/dc-material",
3
- "version": "0.1.190",
3
+ "version": "0.1.192",
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.190/build/lowcode/assets-prod.json"
109
+ "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.192/build/lowcode/assets-prod.json"
110
110
  },
111
111
  "lcMeta": {
112
112
  "type": "component"