@easyv/config 1.3.1 → 1.3.2

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.
@@ -1,45 +1,45 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var defaultTextOverflow = {
8
- textOverflow: 'ellipsis',
9
- speed: 5
10
- };
11
- var _default = function _default() {
12
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultTextOverflow,
13
- _ref$textOverflow = _ref.textOverflow,
14
- textOverflow = _ref$textOverflow === void 0 ? defaultTextOverflow.textOverflow : _ref$textOverflow,
15
- _ref$speed = _ref.speed,
16
- speed = _ref$speed === void 0 ? defaultTextOverflow.speed : _ref$speed;
17
- return [{
18
- name: 'textOverflow',
19
- displayName: '文本溢出',
20
- value: textOverflow,
21
- type: 'select',
22
- config: {
23
- options: [{
24
- name: '换行',
25
- value: 'break-word'
26
- }, {
27
- name: '省略号',
28
- value: 'ellipsis'
29
- }, {
30
- name: '跑马灯',
31
- value: 'marquee'
32
- }]
33
- }
34
- }, {
35
- rule: [['textOverflow', '$eq', 'marquee'], ["LegendType", "$eq", "FixedWidth"]],
36
- name: 'speed',
37
- displayName: '滚动速度',
38
- type: 'number',
39
- value: speed,
40
- config: {
41
- min: 1
42
- }
43
- }];
44
- };
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var defaultTextOverflow = {
8
+ textOverflow: 'ellipsis',
9
+ speed: 5
10
+ };
11
+ var _default = function _default() {
12
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultTextOverflow,
13
+ _ref$textOverflow = _ref.textOverflow,
14
+ textOverflow = _ref$textOverflow === void 0 ? defaultTextOverflow.textOverflow : _ref$textOverflow,
15
+ _ref$speed = _ref.speed,
16
+ speed = _ref$speed === void 0 ? defaultTextOverflow.speed : _ref$speed;
17
+ return [{
18
+ name: 'textOverflow',
19
+ displayName: '文本溢出',
20
+ value: textOverflow,
21
+ type: 'select',
22
+ config: {
23
+ options: [{
24
+ name: '换行',
25
+ value: 'break-word'
26
+ }, {
27
+ name: '省略号',
28
+ value: 'ellipsis'
29
+ }, {
30
+ name: '跑马灯',
31
+ value: 'marquee'
32
+ }]
33
+ }
34
+ }, {
35
+ rule: [['textOverflow', '$eq', 'marquee'], ["LegendType", "$eq", "FixedWidth"]],
36
+ name: 'speed',
37
+ displayName: '滚动速度',
38
+ type: 'number',
39
+ value: speed,
40
+ config: {
41
+ min: 1
42
+ }
43
+ }];
44
+ };
45
45
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/font.js CHANGED
@@ -1,23 +1,23 @@
1
- const defaultFont = {
2
- fontFamily: 'SourceHanSansCN-Medium',
3
- fontSize: 12,
4
- color: 'rgba(230,247,255,0.7)',
5
- bold: false,
6
- italic: false,
7
- letterSpacing: 0,
8
- };
9
- export default ({
10
- fontFamily = defaultFont.fontFamily,
11
- fontSize = defaultFont.fontSize,
12
- color = defaultFont.color,
13
- bold = defaultFont.bold,
14
- italic = defaultFont.italic,
15
- letterSpacing = defaultFont.letterSpacing,
16
- } = defaultFont) => ({
17
- fontFamily,
18
- fontSize,
19
- color,
20
- bold,
21
- italic,
22
- letterSpacing,
23
- });
1
+ const defaultFont = {
2
+ fontFamily: 'SourceHanSansCN-Medium',
3
+ fontSize: 12,
4
+ color: 'rgba(230,247,255,0.7)',
5
+ bold: false,
6
+ italic: false,
7
+ letterSpacing: 0,
8
+ };
9
+ export default ({
10
+ fontFamily = defaultFont.fontFamily,
11
+ fontSize = defaultFont.fontSize,
12
+ color = defaultFont.color,
13
+ bold = defaultFont.bold,
14
+ italic = defaultFont.italic,
15
+ letterSpacing = defaultFont.letterSpacing,
16
+ } = defaultFont) => ({
17
+ fontFamily,
18
+ fontSize,
19
+ color,
20
+ bold,
21
+ italic,
22
+ letterSpacing,
23
+ });
package/src/label.js CHANGED
@@ -139,6 +139,7 @@ export const labelOfPie = ({
139
139
  percent: {
140
140
  show: showPercent = defaultLabelOfPie.percent.show,
141
141
  precision = defaultLabelOfPie.percent.precision,
142
+ sameColor: percentSameColor = defaultLabelOfPie.percent.sameColor,
142
143
  font: percentFont = defaultLabelOfPie.percent.font,
143
144
  translate:{
144
145
  x:percentX = defaultLabelOfPie.percent.translate.x,
@@ -147,6 +148,7 @@ export const labelOfPie = ({
147
148
  } = defaultLabelOfPie.percent,
148
149
  value: {
149
150
  show: showValue = defaultLabelOfPie.value.show,
151
+ sameColor: valueSameColor = defaultLabelOfPie.value.sameColor,
150
152
  suffix: {
151
153
  show: showSuffix = defaultLabelOfPie.value.suffix.show,
152
154
  text: suffixText = defaultLabelOfPie.value.suffix.text,
@@ -290,6 +292,12 @@ export const labelOfPie = ({
290
292
  min: 0,
291
293
  },
292
294
  },
295
+ {
296
+ "name": "sameColor",
297
+ "displayName": "颜色跟随",
298
+ "value": percentSameColor,
299
+ "type": "boolean"
300
+ },
293
301
  {
294
302
  rule: [["show", "$eq", true]],
295
303
  name: "font",
@@ -311,6 +319,13 @@ export const labelOfPie = ({
311
319
  value: showValue,
312
320
  type: "boolean",
313
321
  },
322
+ {
323
+ rule: [['show', '$eq', true]],
324
+ name: 'sameColor',
325
+ displayName: '颜色跟随',
326
+ value: valueSameColor,
327
+ type: 'boolean',
328
+ },
314
329
  {
315
330
  rule: [["show", "$eq", true]],
316
331
  name: "suffix",