@easyv/config 1.2.12 → 1.2.14

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/lib/control.js CHANGED
@@ -13,6 +13,7 @@ var defaultControl = {
13
13
  },
14
14
  gap: 20,
15
15
  drag: {
16
+ start: 0,
16
17
  width: 30,
17
18
  color: "RGBA(255, 255, 255, .3)"
18
19
  }
@@ -33,7 +34,9 @@ var control = function control() {
33
34
  gap = _ref$gap === void 0 ? defaultControl.gap : _ref$gap,
34
35
  _ref$drag = _ref.drag;
35
36
  _ref$drag = _ref$drag === void 0 ? defaultControl.drag : _ref$drag;
36
- var _ref$drag$width = _ref$drag.width,
37
+ var _ref$drag$start = _ref$drag.start,
38
+ start = _ref$drag$start === void 0 ? defaultControl.drag.start : _ref$drag$start,
39
+ _ref$drag$width = _ref$drag.width,
37
40
  width = _ref$drag$width === void 0 ? defaultControl.drag.width : _ref$drag$width,
38
41
  _ref$drag$color = _ref$drag.color,
39
42
  dragColor = _ref$drag$color === void 0 ? defaultControl.drag.color : _ref$drag$color;
@@ -84,6 +87,16 @@ var control = function control() {
84
87
  name: "drag",
85
88
  displayName: "详情区域",
86
89
  value: [{
90
+ name: "start",
91
+ displayName: "起始位置",
92
+ value: start,
93
+ type: "range",
94
+ config: {
95
+ suffix: "%",
96
+ min: 0,
97
+ max: 100
98
+ }
99
+ }, {
87
100
  name: "width",
88
101
  displayName: "宽度",
89
102
  value: width,
package/lib/legend.js CHANGED
@@ -364,12 +364,14 @@ var defaultLegendOfPie = {
364
364
  show: true,
365
365
  precision: 0,
366
366
  sameColor: false,
367
+ align: "left",
367
368
  gap: 0,
368
369
  font: defaultFont
369
370
  },
370
371
  value: {
371
372
  show: true,
372
373
  sameColor: false,
374
+ align: "left",
373
375
  gap: 0,
374
376
  font: defaultFont,
375
377
  suffix: {
@@ -426,6 +428,8 @@ var legendOfPie = function legendOfPie() {
426
428
  precision = _ref3$percent$precisi === void 0 ? defaultLegendOfPie.percent.precision : _ref3$percent$precisi,
427
429
  _ref3$percent$sameCol = _ref3$percent.sameColor,
428
430
  percentSameColor = _ref3$percent$sameCol === void 0 ? defaultLegendOfPie.percent.sameColor : _ref3$percent$sameCol,
431
+ _ref3$percent$align = _ref3$percent.align,
432
+ percentAlign = _ref3$percent$align === void 0 ? defaultLegendOfPie.percent.align : _ref3$percent$align,
429
433
  _ref3$percent$gap = _ref3$percent.gap,
430
434
  percentGap = _ref3$percent$gap === void 0 ? defaultLegendOfPie.percent.gap : _ref3$percent$gap,
431
435
  _ref3$percent$font = _ref3$percent.font,
@@ -436,6 +440,8 @@ var legendOfPie = function legendOfPie() {
436
440
  showValue = _ref3$value$show === void 0 ? defaultLegendOfPie.value.show : _ref3$value$show,
437
441
  _ref3$value$sameColor = _ref3$value.sameColor,
438
442
  valueSameColor = _ref3$value$sameColor === void 0 ? defaultLegendOfPie.value.sameColor : _ref3$value$sameColor,
443
+ _ref3$value$align = _ref3$value.align,
444
+ valueAlign = _ref3$value$align === void 0 ? defaultLegendOfPie.value.align : _ref3$value$align,
439
445
  _ref3$value$gap = _ref3$value.gap,
440
446
  valueGap = _ref3$value$gap === void 0 ? defaultLegendOfPie.value.gap : _ref3$value$gap,
441
447
  _ref3$value$font = _ref3$value.font,
@@ -555,6 +561,27 @@ var legendOfPie = function legendOfPie() {
555
561
  displayName: '颜色跟随',
556
562
  value: percentSameColor,
557
563
  type: 'boolean'
564
+ }), _objectSpread(_objectSpread({}, showRule()), {}, {
565
+ name: "align",
566
+ displayName: "文本对齐",
567
+ value: percentAlign,
568
+ type: "radio",
569
+ config: {
570
+ mode: "icon",
571
+ options: [{
572
+ name: "左对齐",
573
+ value: "left",
574
+ icon: "align-left"
575
+ }, {
576
+ name: "居中对齐",
577
+ value: "center",
578
+ icon: "align-center"
579
+ }, {
580
+ name: "右对齐",
581
+ value: "right",
582
+ icon: "align-right"
583
+ }]
584
+ }
558
585
  }), _objectSpread(_objectSpread({}, showRule()), {}, {
559
586
  name: 'font',
560
587
  displayName: '文本样式',
@@ -603,6 +630,27 @@ var legendOfPie = function legendOfPie() {
603
630
  displayName: '颜色跟随',
604
631
  value: valueSameColor,
605
632
  type: 'boolean'
633
+ }), _objectSpread(_objectSpread({}, showRule()), {}, {
634
+ name: "align",
635
+ displayName: "文本对齐",
636
+ value: valueAlign,
637
+ type: "radio",
638
+ config: {
639
+ mode: "icon",
640
+ options: [{
641
+ name: "左对齐",
642
+ value: "left",
643
+ icon: "align-left"
644
+ }, {
645
+ name: "居中对齐",
646
+ value: "center",
647
+ icon: "align-center"
648
+ }, {
649
+ name: "右对齐",
650
+ value: "right",
651
+ icon: "align-right"
652
+ }]
653
+ }
606
654
  }), _objectSpread(_objectSpread({}, showRule()), {}, {
607
655
  name: 'font',
608
656
  displayName: '文本样式',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,4 +28,4 @@
28
28
  "commit": true
29
29
  }
30
30
  }
31
- }
31
+ }
package/src/control.js CHANGED
@@ -7,6 +7,7 @@ const defaultControl={
7
7
  },
8
8
  gap:20,
9
9
  drag:{
10
+ start:0,
10
11
  width:30,
11
12
  color:"RGBA(255, 255, 255, .3)"
12
13
  }
@@ -21,6 +22,7 @@ export const control = ({
21
22
  } = defaultControl.margin,
22
23
  gap = defaultControl.gap,
23
24
  drag:{
25
+ start = defaultControl.drag.start,
24
26
  width = defaultControl.drag.width,
25
27
  color:dragColor = defaultControl.drag.color
26
28
  } = defaultControl.drag
@@ -80,6 +82,17 @@ export const control = ({
80
82
  name: "drag",
81
83
  displayName: "详情区域",
82
84
  value: [
85
+ {
86
+ name: "start",
87
+ displayName: "起始位置",
88
+ value: start,
89
+ type: "range",
90
+ config: {
91
+ suffix: "%",
92
+ min: 0,
93
+ max:100
94
+ },
95
+ },
83
96
  {
84
97
  name: "width",
85
98
  displayName: "宽度",
package/src/legend.js CHANGED
@@ -379,12 +379,14 @@ const defaultLegendOfPie = {
379
379
  show: true,
380
380
  precision: 0,
381
381
  sameColor: false,
382
+ align:"left",
382
383
  gap: 0,
383
384
  font: defaultFont,
384
385
  },
385
386
  value: {
386
387
  show: true,
387
388
  sameColor: false,
389
+ align:"left",
388
390
  gap: 0,
389
391
  font: defaultFont,
390
392
  suffix: {
@@ -419,12 +421,14 @@ export const legendOfPie = ({
419
421
  show: showPercent = defaultLegendOfPie.percent.show,
420
422
  precision = defaultLegendOfPie.percent.precision,
421
423
  sameColor: percentSameColor = defaultLegendOfPie.percent.sameColor,
424
+ align: percentAlign = defaultLegendOfPie.percent.align,
422
425
  gap: percentGap = defaultLegendOfPie.percent.gap,
423
426
  font: percentFont = defaultLegendOfPie.percent.font,
424
427
  } = defaultLegendOfPie.percent,
425
428
  value: {
426
429
  show: showValue = defaultLegendOfPie.value.show,
427
430
  sameColor: valueSameColor = defaultLegendOfPie.value.sameColor,
431
+ align: valueAlign = defaultLegendOfPie.value.align,
428
432
  gap: valueGap = defaultLegendOfPie.value.gap,
429
433
  font: valueFont = defaultLegendOfPie.value.font,
430
434
  suffix: {
@@ -552,6 +556,21 @@ export const legendOfPie = ({
552
556
  value: percentSameColor,
553
557
  type: 'boolean',
554
558
  },
559
+ {
560
+ ...showRule(),
561
+ name:"align",
562
+ displayName:"文本对齐",
563
+ value:percentAlign,
564
+ type:"radio",
565
+ config:{
566
+ mode:"icon",
567
+ options:[
568
+ { name:"左对齐", value:"left", icon:"align-left" },
569
+ { name:"居中对齐", value:"center", icon:"align-center" },
570
+ { name:"右对齐", value:"right", icon:"align-right" }
571
+ ]
572
+ }
573
+ },
555
574
  {
556
575
  ...showRule(),
557
576
  name: 'font',
@@ -622,6 +641,21 @@ export const legendOfPie = ({
622
641
  value: valueSameColor,
623
642
  type: 'boolean',
624
643
  },
644
+ {
645
+ ...showRule(),
646
+ name:"align",
647
+ displayName:"文本对齐",
648
+ value:valueAlign,
649
+ type:"radio",
650
+ config:{
651
+ mode:"icon",
652
+ options:[
653
+ { name:"左对齐", value:"left", icon:"align-left" },
654
+ { name:"居中对齐", value:"center", icon:"align-center" },
655
+ { name:"右对齐", value:"right", icon:"align-right" }
656
+ ]
657
+ }
658
+ },
625
659
  {
626
660
  ...showRule(),
627
661
  name: 'font',