@cloudbase/weda-ui 3.13.4 → 3.13.6

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.
Files changed (31) hide show
  1. package/dist/configs/components/chart/line.d.ts +4 -0
  2. package/dist/configs/components/chart/line.js +27 -0
  3. package/dist/configs/components/chart/pie.d.ts +128 -0
  4. package/dist/configs/components/chart/pie.js +917 -0
  5. package/dist/configs/components/echart.js +7 -7
  6. package/dist/configs/components/listView.js +6 -6
  7. package/dist/configs/components/navLayout.json +5 -5
  8. package/dist/configs/components/wd-icon.js +6 -4
  9. package/dist/configs/components/wd-layout.js +2 -2
  10. package/dist/configs/components/wd-menu-layout.d.ts +4 -4
  11. package/dist/configs/components/wd-modal.js +2 -2
  12. package/dist/configs/index.d.ts +8848 -9818
  13. package/dist/configs/index.js +1 -1
  14. package/dist/configs/type-utils/index.js +1 -7
  15. package/dist/configs/type-utils/type-form.js +3 -3
  16. package/dist/configs/utils/layout.d.ts +1 -1
  17. package/dist/configs/utils/layout.js +3 -3
  18. package/dist/onlineConfig.json +20 -0
  19. package/dist/style/weda-ui.min.css +2 -2
  20. package/dist/web/components/echart/echart.js +1 -1
  21. package/dist/web/components/listView/index.css +15 -44
  22. package/dist/web/components/richText/index.js +14 -41
  23. package/dist/web/components/wd-select/select/selectUI.js +3 -3
  24. package/dist/web/components/wd-select/wd-select.js +1 -1
  25. package/dist/web/components/wd-select-multiple/wd-select-multiple.js +1 -1
  26. package/dist/web/utils/isPrivate.d.ts +5 -0
  27. package/dist/web/utils/isPrivate.js +12 -0
  28. package/dist/web/utils/loadIconCss.js +7 -2
  29. package/package.json +2 -2
  30. package/dist/configs/components/chart/pie.json +0 -834
  31. package/dist/iconConfig.json +0 -6
@@ -0,0 +1,917 @@
1
+ import { defineConfig, Type } from '../../type-utils';
2
+ const $attached_template = `
3
+ {{#with $self as |$self|}}
4
+ {{#if (helper_utils '===' $self.attributes.dataSourceType 'variable')}}
5
+ [attributes]
6
+ ':datasourceVariable'="[
7
+ {
8
+ XLabel: { Value: 'sotm' },
9
+ YLabels: [{ Name: '销售金额', Value: '124213' }],
10
+ },
11
+ {
12
+ XLabel: { Value: 'Lisi' },
13
+ YLabels: [{ Name: '销售金额', Value: '116123' }],
14
+ },
15
+ {
16
+ XLabel: { Value: 'maza' },
17
+ YLabels: [{ Name: '销售金额', Value: '100123' }],
18
+ },
19
+ ]"
20
+ {{/if}}
21
+ {{/with}}
22
+ `;
23
+ const data = Type.Object({
24
+ chartType: Type.StringEnum({
25
+ title: '图形类型',
26
+ type: 'string',
27
+ default: 'pie',
28
+ 'x-component': 'radio',
29
+ 'x-index': 10,
30
+ enum: [
31
+ {
32
+ label: '饼形',
33
+ value: 'pie',
34
+ },
35
+ {
36
+ label: '环形',
37
+ value: 'ring',
38
+ },
39
+ ],
40
+ description: '支持饼形和环形,本文以饼形为例',
41
+ }),
42
+ isTitle: Type.Boolean({
43
+ title: '显示标题',
44
+ type: 'boolean',
45
+ default: true,
46
+ 'x-index': 20,
47
+ 'x-linkages': [
48
+ {
49
+ type: 'value:visible',
50
+ target: '*(title)',
51
+ condition: '{{ $self.value }}',
52
+ },
53
+ ],
54
+ }),
55
+ title: Type.String({
56
+ title: '图表标题',
57
+ default: '柱状图标题',
58
+ type: 'string',
59
+ 'x-index': 40,
60
+ }),
61
+ dataSource: Type.Object({
62
+ // 已废弃
63
+ name: Type.String(),
64
+ type: Type.String(),
65
+ subType: Type.String(),
66
+ methodName: Type.String(),
67
+ }, {
68
+ type: 'object',
69
+ title: '数据源(废弃)',
70
+ display: false,
71
+ 'x-index': 43,
72
+ 'x-component': 'chart-datasource-select',
73
+ 'x-props': {
74
+ 'data-hidebind': true,
75
+ },
76
+ 'x-component-props': {
77
+ postChange: {
78
+ addOrUpdateComponentDataBinds: {
79
+ dataBind: {
80
+ propertyPath: 'filterData',
81
+ bindDataPath: '[]',
82
+ type: 'expression',
83
+ extra: {},
84
+ },
85
+ },
86
+ },
87
+ },
88
+ 'x-linkages': [
89
+ {
90
+ type: 'value:visible',
91
+ target: '*(filterData)',
92
+ condition: "{{ ($self.value && $self.value.type ==='database') || ($self.value && $self.value.type ==='cloud-integration') }}",
93
+ },
94
+ {
95
+ type: 'value:schema',
96
+ condition: '{{ $self.value && !!$self.value.name }}',
97
+ target: 'filterData',
98
+ schema: {
99
+ 'x-component-props': '{{{selectedDataSourceName: $self.value.name}}}',
100
+ },
101
+ },
102
+ {
103
+ type: 'value:visible',
104
+ target: '*(xFieldShow,xField,xStatistics,xIsCountEmpty,yField)',
105
+ condition: "{{ $self.value && $self.value.type ==='database' }}",
106
+ },
107
+ ],
108
+ description: '已废弃数据源配置',
109
+ }),
110
+ dataSourceType: Type.StringEnum({
111
+ 'x-index': 45,
112
+ title: '数据源',
113
+ 'x-category': '基础属性',
114
+ type: 'string',
115
+ default: 'data-model',
116
+ enum: [
117
+ {
118
+ label: '数据模型',
119
+ value: 'data-model',
120
+ },
121
+ {
122
+ label: 'APIs',
123
+ value: 'custom-connector',
124
+ },
125
+ {
126
+ label: '变量',
127
+ value: 'variable',
128
+ },
129
+ ],
130
+ 'x-linkages': [
131
+ {
132
+ _comment: '数据模型才显示的',
133
+ type: 'value:state',
134
+ condition: "{{$self.value === 'data-model'}}",
135
+ target: '*(dataModel,filterData,xFieldShow,xField,xStatistics,xIsCountEmpty,yFieldSubTitle,yField,groupKey)',
136
+ state: {
137
+ display: true,
138
+ },
139
+ },
140
+ {
141
+ _comment: '数据模型不显示的',
142
+ type: 'value:state',
143
+ condition: "{{$self.value === 'data-model'}}",
144
+ target: '*(connector,connectorMethod,connectorParams,datasourceVariable)',
145
+ state: {
146
+ display: false,
147
+ },
148
+ },
149
+ {
150
+ _comment: 'APIs才显示的',
151
+ type: 'value:state',
152
+ target: '*(connector,connectorMethod,connectorParams)',
153
+ condition: "{{$self.value === 'custom-connector'}}",
154
+ state: {
155
+ display: true,
156
+ },
157
+ },
158
+ {
159
+ _comment: 'APIs隐藏的',
160
+ type: 'value:state',
161
+ target: '*(groupKey,filterData,xFieldShow,xField,yFieldSubTitle,yField,datasourceVariable,dataModel,xStatistics)',
162
+ condition: "{{$self.value === 'custom-connector'}}",
163
+ state: {
164
+ display: false,
165
+ },
166
+ },
167
+ {
168
+ _comment: '变量时才显示',
169
+ type: 'value:state',
170
+ target: '*(datasourceVariable)',
171
+ condition: "{{$self.value === 'variable'}}",
172
+ state: {
173
+ display: true,
174
+ },
175
+ },
176
+ {
177
+ _comment: '变量时不显示',
178
+ type: 'value:state',
179
+ target: '*(connector,dataModel,xStatistics,groupKey,filterData,xFieldShow,xField,yFieldSubTitle,yField,connectorMethod,connectorParams)',
180
+ condition: "{{$self.value === 'variable'}}",
181
+ state: {
182
+ display: false,
183
+ },
184
+ },
185
+ {
186
+ _comment: '给 connector-selector 设value属性',
187
+ type: 'value:schema',
188
+ target: 'connector',
189
+ schema: {
190
+ 'x-component-props': '{{{value:$value}}}',
191
+ },
192
+ },
193
+ ],
194
+ 'x-props': {
195
+ 'data-hidebind': true,
196
+ },
197
+ description: '数据源类型选择',
198
+ }),
199
+ dataModel: Type.Object({
200
+ name: Type.Optional(Type.String({
201
+ title: '数据模型名',
202
+ })),
203
+ extra: Type.Optional(Type.Object({
204
+ viewId: Type.String({
205
+ title: '数据模型视图id',
206
+ }),
207
+ methodName: Type.String({
208
+ title: '数据模型方法名',
209
+ }),
210
+ }, {
211
+ title: '数据模型属性',
212
+ })),
213
+ }, {
214
+ 'x-index': 50,
215
+ title: '数据模型',
216
+ type: 'object',
217
+ 'x-category': '基础属性',
218
+ required: true,
219
+ 'x-component': 'datasource-selector',
220
+ 'x-component-props': {
221
+ methodName: 'wedaAggregateData',
222
+ },
223
+ 'x-props': {
224
+ 'data-hidebind': true,
225
+ },
226
+ 'x-linkages': [
227
+ {
228
+ type: 'value:visible',
229
+ target: '*(filterData)',
230
+ condition: '{{ Boolean($self.value && $self.value.extra)}}',
231
+ },
232
+ {
233
+ type: 'value:schema',
234
+ condition: '{{ $self.value && !!$self.value.name }}',
235
+ target: 'filterData',
236
+ schema: {
237
+ 'x-component-props': '{{{selectedDataSourceName: $self.value.name}}}',
238
+ },
239
+ },
240
+ {
241
+ type: 'value:visible',
242
+ target: '*(xFieldShow,xField,xStatistics,xIsCountEmpty,yField)',
243
+ condition: '{{ (Boolean($self.value && $self.value.extra)) }}',
244
+ },
245
+ ],
246
+ description: '展示模型数据的数据来源',
247
+ }),
248
+ datasourceVariable: Type.Array(Type.Object({
249
+ XLabel: Type.Optional(Type.Object({
250
+ Name: Type.Optional(Type.String({ title: '字段标识' })),
251
+ Value: Type.String({ title: '坐标文字' }),
252
+ })),
253
+ YLabels: Type.Optional(Type.Object({
254
+ Name: Type.Optional(Type.String({ title: '字段标识' })),
255
+ Value: Type.String({ title: '坐标文字' }),
256
+ })),
257
+ }), {
258
+ 'x-component': 'jsontext',
259
+ 'x-component-props': {
260
+ autoSize: { minRows: 2, maxRows: 10 },
261
+ },
262
+ 'x-index': 53,
263
+ title: '数据源变量',
264
+ 'x-category': '基础属性',
265
+ description: '数据源变量',
266
+ required: true,
267
+ }),
268
+ connector: Type.Object({
269
+ datasource: Type.Optional(Type.Object({
270
+ title: Type.String({
271
+ title: 'API名',
272
+ }),
273
+ id: Type.String({
274
+ title: 'ID',
275
+ }),
276
+ name: Type.String({
277
+ title: '数据源标识',
278
+ }),
279
+ })),
280
+ }, {
281
+ title: 'APIs',
282
+ type: 'object',
283
+ 'x-component': 'connector-select',
284
+ 'x-index': 54,
285
+ required: true,
286
+ 'x-category': '基础属性',
287
+ 'x-props': {
288
+ 'data-hidebind': true,
289
+ },
290
+ 'x-linkages': [
291
+ {
292
+ type: 'value:schema',
293
+ target: 'connectorMethod',
294
+ schema: {
295
+ 'x-component-props': {
296
+ value: '{{$self.value}}',
297
+ },
298
+ },
299
+ },
300
+ ],
301
+ description: '展示数据的APIs来源选择',
302
+ }),
303
+ connectorMethod: Type.Object({
304
+ name: Type.Optional(Type.String({ title: '方法标识' })),
305
+ title: Type.Optional(Type.String({ title: '方法名' })),
306
+ }, {
307
+ title: '调用方法',
308
+ type: 'object',
309
+ required: true,
310
+ 'x-component': 'connector-method-select',
311
+ 'x-index': 55,
312
+ 'x-category': '基础属性',
313
+ 'x-component-props': {
314
+ docUrl: 'https://cloud.tencent.com/document/product/1301/71197#.E6.9F.B1.E7.8A.B6.E5.9B.BE.E3.80.81.E6.8A.98.E7.BA.BF.E5.9B.BE.E3.80.81.E9.A5.BC.E5.9B.BE',
315
+ paramsSchema: {
316
+ type: 'object',
317
+ properties: {
318
+ outParams: {
319
+ type: 'object',
320
+ properties: {
321
+ properties: {
322
+ type: 'object',
323
+ properties: {
324
+ result: {
325
+ type: 'object',
326
+ properties: {
327
+ type: {
328
+ const: 'array',
329
+ },
330
+ items: {
331
+ type: 'object',
332
+ properties: {
333
+ type: {
334
+ const: 'object',
335
+ },
336
+ properties: {
337
+ type: 'object',
338
+ properties: {
339
+ XLabel: {
340
+ type: 'object',
341
+ properties: {
342
+ type: {
343
+ const: 'object',
344
+ },
345
+ properties: {
346
+ type: 'object',
347
+ properties: {
348
+ Value: {
349
+ type: 'object',
350
+ properties: {
351
+ type: {
352
+ const: 'string',
353
+ },
354
+ },
355
+ },
356
+ },
357
+ required: ['Value'],
358
+ },
359
+ },
360
+ },
361
+ YLabels: {
362
+ type: 'object',
363
+ properties: {
364
+ type: {
365
+ const: 'array',
366
+ },
367
+ items: {
368
+ type: 'object',
369
+ properties: {
370
+ type: {
371
+ const: 'object',
372
+ },
373
+ properties: {
374
+ type: 'object',
375
+ properties: {
376
+ Name: {
377
+ type: 'object',
378
+ properties: {
379
+ type: {
380
+ const: 'string',
381
+ },
382
+ },
383
+ },
384
+ Value: {
385
+ type: 'object',
386
+ properties: {
387
+ type: {
388
+ const: 'number',
389
+ },
390
+ },
391
+ },
392
+ },
393
+ required: ['Name', 'Value'],
394
+ },
395
+ },
396
+ },
397
+ },
398
+ },
399
+ },
400
+ required: ['XLabel', 'YLabels'],
401
+ },
402
+ },
403
+ },
404
+ },
405
+ },
406
+ },
407
+ required: ['result'],
408
+ },
409
+ },
410
+ },
411
+ },
412
+ },
413
+ },
414
+ 'x-helper-text': '方法的出入参需满足组件要求,[查看文档](https://cloud.tencent.com/document/product/1301/71197#.E6.9F.B1.E7.8A.B6.E5.9B.BE.E3.80.81.E6.8A.98.E7.BA.BF.E5.9B.BE.E3.80.81.E9.A5.BC.E5.9B.BE)',
415
+ 'x-helper-text-color': '#E37318',
416
+ description: '展示数据的APIs调用方法选择',
417
+ }),
418
+ connectorParams: Type.Record(Type.String(), Type.Any(), {
419
+ title: '查询入参',
420
+ type: 'string',
421
+ 'x-component': 'property-object-params-field',
422
+ 'x-component-props': {
423
+ dataSourceKeyName: 'connector',
424
+ dataSourceValuePath: 'datasource.name',
425
+ methodNameKeyName: 'connectorMethod',
426
+ methodValuePath: 'name',
427
+ paramsKeyName: 'connectorParams',
428
+ },
429
+ 'x-index': 56,
430
+ 'x-category': '基础属性',
431
+ description: "对APIs调用方法获取的数据进行筛选过滤。支持对象类型,例如 {name:'',value:''}",
432
+ }),
433
+ filterData: Type.Record(Type.String(), Type.Any(), {
434
+ title: '数据筛选',
435
+ 'x-index': 60,
436
+ 'x-component': 'condition-select',
437
+ 'x-component-props': {
438
+ dataSourceNamePropKey: 'dataModel',
439
+ customRelOptions: {
440
+ string: [
441
+ {
442
+ value: 'eq',
443
+ text: '等于',
444
+ },
445
+ {
446
+ value: 'neq',
447
+ text: '不等于',
448
+ },
449
+ {
450
+ value: 'in',
451
+ text: '包含',
452
+ },
453
+ {
454
+ value: 'nin',
455
+ text: '不包含',
456
+ },
457
+ ],
458
+ boolean: [
459
+ {
460
+ value: 'eq',
461
+ text: '等于',
462
+ },
463
+ ],
464
+ number: [
465
+ {
466
+ value: 'eq',
467
+ text: '等于',
468
+ type: 'equal',
469
+ },
470
+ {
471
+ value: 'neq',
472
+ text: '不等于',
473
+ type: 'unequal',
474
+ },
475
+ {
476
+ value: 'gt',
477
+ text: '大于',
478
+ type: 'greater',
479
+ },
480
+ {
481
+ value: 'gte',
482
+ text: '大于等于',
483
+ type: 'greater_or_equal',
484
+ },
485
+ {
486
+ value: 'lt',
487
+ text: '小于',
488
+ type: 'less',
489
+ },
490
+ {
491
+ value: 'lte',
492
+ text: '小于等于',
493
+ type: 'less_or_equal',
494
+ },
495
+ ],
496
+ array: [
497
+ {
498
+ value: 'eq',
499
+ text: '等于',
500
+ },
501
+ {
502
+ value: 'in',
503
+ text: '包含',
504
+ },
505
+ ],
506
+ object: [
507
+ {
508
+ value: 'eq',
509
+ text: '等于',
510
+ },
511
+ {
512
+ value: 'in',
513
+ text: '包含',
514
+ },
515
+ ],
516
+ keyVarType: [
517
+ {
518
+ value: 'eq',
519
+ text: '等于',
520
+ },
521
+ {
522
+ value: 'neq',
523
+ text: '不等于',
524
+ },
525
+ {
526
+ value: 'gt',
527
+ text: '大于',
528
+ },
529
+ {
530
+ value: 'lt',
531
+ text: '小于',
532
+ },
533
+ ],
534
+ },
535
+ },
536
+ 'x-props': {
537
+ 'data-hidebind': true,
538
+ 'data-hideBindValue': true,
539
+ 'data-withBindMeta': true,
540
+ },
541
+ description: '可配置数据取值范围,可参见 数据筛选配置',
542
+ }),
543
+ setColor: Type.Array(Type.String({ title: '颜色色号' }), {
544
+ type: 'array',
545
+ title: '配色',
546
+ 'x-index': 70,
547
+ default: ['#2A70E2', '#46B690', '#EDB539', '#E46961', '#4FB3D2', '#805FDC'],
548
+ 'x-component': 'color-plate',
549
+ description: '当有多个数值字段或维度字段分组时,不同类别将按照不同配色展示,支持自定义色卡',
550
+ }),
551
+ dimensionalityShow: Type.Never({
552
+ 'x-index': 80,
553
+ 'x-category': '基础属性',
554
+ 'x-component': 'sub-category-title',
555
+ 'x-component-props': {
556
+ text: '维度',
557
+ },
558
+ }),
559
+ xField: Type.Object({
560
+ format: Type.FormatTypeUnion(),
561
+ type: Type.BasicTypeUnion(),
562
+ title: Type.String({ title: '字段名' }),
563
+ name: Type.String({ title: '字段标识' }),
564
+ }, {
565
+ type: 'object',
566
+ title: '字段选择',
567
+ 'x-index': 90,
568
+ 'x-category': '基础属性',
569
+ 'x-component': 'data-source-field-select',
570
+ 'x-component-props': {
571
+ dataSourceNamePropKey: 'dataModel',
572
+ isMethod: true,
573
+ disabledTypes: ['time'],
574
+ },
575
+ 'x-linkages': [
576
+ {
577
+ type: 'value:schema',
578
+ condition: '{{ !!$self.value }}',
579
+ target: 'xStatistics',
580
+ schema: {
581
+ enum: "{{$self.value.format ==='datetime' ? [{'label':'年','value':'y'},{'label':'月','value':'m'},{'label':'周','value':'w'},{'label':'日','value':'d'},{'label':'时','value':'h'},{'label':'分','value':'min'}] : ($self.value.format ==='date'? [{'label':'年','value':'y'},{'label':'月','value':'m'},{'label':'周','value':'w'},{'label':'日','value':'d'}] : []) }}",
582
+ },
583
+ },
584
+ {
585
+ type: 'value:visible',
586
+ target: '*(xStatistics)',
587
+ condition: "{{ $self.value && ($self.value.format ==='datetime' || $self.value.format ==='date') }}",
588
+ },
589
+ {
590
+ type: 'value:visible',
591
+ target: '*(xIsCountEmpty)',
592
+ condition: "{{ $self.value && ($self.value.format !=='datetime' && $self.value.format !=='date') }}",
593
+ },
594
+ ],
595
+ description: 'X轴数值字段选择',
596
+ }),
597
+ xStatistics: Type.String({
598
+ title: '统计维度',
599
+ type: 'string',
600
+ 'x-category': '基础属性',
601
+ 'x-index': 100,
602
+ enum: [],
603
+ }),
604
+ xIsCountEmpty: Type.Boolean({
605
+ title: '显示空值坐标',
606
+ type: 'boolean',
607
+ default: false,
608
+ 'x-index': 110,
609
+ }),
610
+ yFieldSubTitle: Type.Never({
611
+ 'x-index': 115,
612
+ 'x-component': 'sub-category-title',
613
+ 'x-component-props': {
614
+ text: '数值(Y轴)',
615
+ },
616
+ }),
617
+ yField: Type.Object({
618
+ numValue: Type.Optional(Type.Array(Type.Object({
619
+ key: Type.String(),
620
+ operationType: Type.Union(['count', 'sum', 'avg', 'max', 'min'].map((t) => Type.Literal(t))),
621
+ }))),
622
+ groupKey: Type.Optional(Type.String()),
623
+ }, {
624
+ type: 'object',
625
+ title: '字段选择',
626
+ 'x-index': 120,
627
+ 'x-category': '基础属性',
628
+ 'x-component': 'chart-y-field-select',
629
+ 'x-component-props': {
630
+ text: '编辑Y轴字段',
631
+ isMethod: true,
632
+ dataSourceNamePropKey: 'dataModel',
633
+ maxFieldCount: 1,
634
+ },
635
+ description: 'Y轴数值字段选择',
636
+ }),
637
+ legendShow: Type.Never({
638
+ 'x-index': 145,
639
+ 'x-category': '基础属性',
640
+ 'x-component': 'sub-category-title',
641
+ 'x-component-props': {
642
+ text: '图例',
643
+ },
644
+ }),
645
+ isLegend: Type.Boolean({
646
+ title: '显示图例',
647
+ type: 'boolean',
648
+ default: true,
649
+ 'x-category': '基础属性',
650
+ 'x-index': 150,
651
+ 'x-linkages': [
652
+ {
653
+ type: 'value:visible',
654
+ target: '*(legend)',
655
+ condition: '{{ $self.value }}',
656
+ },
657
+ ],
658
+ }),
659
+ legend: Type.StringEnum({
660
+ title: '图例位置',
661
+ type: 'string',
662
+ default: 'bottom',
663
+ 'x-category': '基础属性',
664
+ 'x-index': 170,
665
+ enum: [
666
+ {
667
+ value: 'top',
668
+ label: '上方',
669
+ },
670
+ {
671
+ value: 'bottom',
672
+ label: '下方',
673
+ },
674
+ ],
675
+ }),
676
+ dataTagShow: Type.Never({
677
+ 'x-index': 320,
678
+ 'x-component': 'sub-category-title',
679
+ 'x-component-props': {
680
+ text: '数据标签',
681
+ },
682
+ 'x-category': '高级属性',
683
+ }),
684
+ isSeriesShowSymbol: Type.Boolean({
685
+ title: '显示数值',
686
+ type: 'boolean',
687
+ 'x-index': 330,
688
+ default: true,
689
+ description: '数据标签显示数值',
690
+ 'x-category': '高级属性',
691
+ }),
692
+ isPercent: Type.Boolean({
693
+ title: '显示百分比',
694
+ type: 'boolean',
695
+ 'x-index': 335,
696
+ default: false,
697
+ description: '数据标签显示百分比',
698
+ 'x-category': '高级属性',
699
+ }),
700
+ unitShow: Type.Never({
701
+ 'x-index': 340,
702
+ 'x-component': 'sub-category-title',
703
+ 'x-component-props': {
704
+ text: '显示单位',
705
+ },
706
+ 'x-category': '高级属性',
707
+ }),
708
+ isUnit: Type.Boolean({
709
+ title: '显示单位',
710
+ type: 'boolean',
711
+ 'x-index': 350,
712
+ 'x-props': {
713
+ 'data-hidebind': true,
714
+ },
715
+ 'x-category': '高级属性',
716
+ default: false,
717
+ 'x-linkages': [
718
+ {
719
+ type: 'value:visible',
720
+ target: '*(unit,decimalDigits,suffix)',
721
+ condition: '{{ $self.value }}',
722
+ },
723
+ ],
724
+ }),
725
+ unit: Type.Number({
726
+ type: 'number',
727
+ title: '数值量级',
728
+ 'x-category': '高级属性',
729
+ 'x-index': 360,
730
+ default: 1,
731
+ 'x-component': 'select',
732
+ enum: [
733
+ {
734
+ label: '个',
735
+ value: 1,
736
+ },
737
+ {
738
+ label: '十',
739
+ value: 10,
740
+ },
741
+ {
742
+ label: '百',
743
+ value: 100,
744
+ },
745
+ {
746
+ label: '千',
747
+ value: 1000,
748
+ },
749
+ {
750
+ label: '万',
751
+ value: 10000,
752
+ },
753
+ {
754
+ label: '十万',
755
+ value: 100000,
756
+ },
757
+ {
758
+ label: '百万',
759
+ value: 1000000,
760
+ },
761
+ {
762
+ label: '千万',
763
+ value: 10000000,
764
+ },
765
+ {
766
+ label: '亿',
767
+ value: 100000000,
768
+ },
769
+ ],
770
+ 'x-component-props': {
771
+ options: [
772
+ {
773
+ label: '个',
774
+ value: 1,
775
+ },
776
+ {
777
+ label: '十',
778
+ value: 10,
779
+ },
780
+ {
781
+ label: '百',
782
+ value: 100,
783
+ },
784
+ {
785
+ label: '千',
786
+ value: 1000,
787
+ },
788
+ {
789
+ label: '万',
790
+ value: 10000,
791
+ },
792
+ {
793
+ label: '十万',
794
+ value: 100000,
795
+ },
796
+ {
797
+ label: '百万',
798
+ value: 1000000,
799
+ },
800
+ {
801
+ label: '千万',
802
+ value: 10000000,
803
+ },
804
+ {
805
+ label: '亿',
806
+ value: 100000000,
807
+ },
808
+ ],
809
+ },
810
+ 'x-linkages': [
811
+ {
812
+ type: 'value:state',
813
+ target: 'suffix',
814
+ condition: '{{ $self.inputed && $self.value!==1 }}',
815
+ state: {
816
+ value: "{{$self.props.enum.find(s=>s.value===$self.value) ? $self.props.enum.find(s=>s.value===$self.value).label: '' }}",
817
+ },
818
+ },
819
+ {
820
+ type: 'value:state',
821
+ target: 'suffix',
822
+ condition: '{{ $self.inputed && $self.value===1 }}',
823
+ state: {
824
+ value: '',
825
+ },
826
+ },
827
+ ],
828
+ }),
829
+ decimalDigits: Type.Number({
830
+ title: '小数位数',
831
+ type: 'number',
832
+ 'x-category': '高级属性',
833
+ default: 0,
834
+ 'x-props': {
835
+ max: 10,
836
+ min: 0,
837
+ },
838
+ 'x-index': 370,
839
+ 'x-linkages': [
840
+ {
841
+ type: 'value:state',
842
+ target: 'decimalDigits',
843
+ condition: "{{ $self.value == '' || isNaN($self.value) || $self.value < 0 }}",
844
+ state: {
845
+ value: 0,
846
+ },
847
+ },
848
+ ],
849
+ }),
850
+ suffix: Type.String({
851
+ title: '后缀',
852
+ type: 'string',
853
+ default: '',
854
+ 'x-index': 380,
855
+ 'x-category': '高级属性',
856
+ }),
857
+ });
858
+ const config = defineConfig({
859
+ $schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
860
+ data,
861
+ events: [],
862
+ meta: {
863
+ title: '饼图',
864
+ description: '用于报表场景下表示数据在总体中的占比。',
865
+ figureIcon: '../../figureIcons/Pie.svg',
866
+ icon: '../../icons/Pie.svg',
867
+ category: '图表',
868
+ categoryOrder: 600,
869
+ componentOrder: 560,
870
+ visible: ['APP'],
871
+ inlineStyleForm: {
872
+ fontSize: {
873
+ visible: false,
874
+ },
875
+ color: {
876
+ visible: false,
877
+ },
878
+ fontWeight: {
879
+ visible: false,
880
+ },
881
+ lineHeight: {
882
+ visible: false,
883
+ },
884
+ justifyContent: {
885
+ visible: false,
886
+ },
887
+ flexDirection: {
888
+ visible: false,
889
+ },
890
+ border: {
891
+ visible: false,
892
+ },
893
+ background: {
894
+ visible: false,
895
+ },
896
+ boxShadow: {
897
+ visible: false,
898
+ },
899
+ opacity: {
900
+ visible: false,
901
+ },
902
+ alignItems: {
903
+ visible: false,
904
+ },
905
+ },
906
+ templates: [
907
+ {
908
+ when: 'dataSourceType',
909
+ body: $attached_template,
910
+ },
911
+ ],
912
+ },
913
+ configMeta: {
914
+ docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/chart/Pie',
915
+ },
916
+ });
917
+ export default config;