@easyv/config 1.2.24 → 1.2.26

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/legend.js CHANGED
@@ -24,14 +24,6 @@ var loopConfig = {
24
24
  name: 'show',
25
25
  displayName: '',
26
26
  value: false
27
- }, {
28
- type: "number",
29
- name: "height",
30
- displayName: "限制高度",
31
- value: 120,
32
- config: {
33
- suffix: 'px'
34
- }
35
27
  }, {
36
28
  type: "number",
37
29
  name: "interval",
@@ -127,9 +119,28 @@ var _default = function _default() {
127
119
  value: font,
128
120
  type: 'textStyle',
129
121
  markColorType: 'textColor'
122
+ }, {
123
+ "type": "radio",
124
+ "name": "LegendType",
125
+ "displayName": "类型",
126
+ "value": "Adaptive",
127
+ "config": {
128
+ "options": [{
129
+ "name": "固定宽度",
130
+ "value": "FixedWidth"
131
+ }, {
132
+ "name": "自适应",
133
+ "value": "Adaptive"
134
+ }],
135
+ "mode": "normal"
136
+ }
130
137
  }, (0, _index.sc)("maxWidth", "宽度", "number", maxWidth, {
131
138
  suffix: "px"
132
- }, showRule())].concat((0, _toConsumableArray2["default"])((0, _index.textOverflow)(overflow)), [{
139
+ }, showRule("LegendType", "$eq", "FixedWidth"))].concat((0, _toConsumableArray2["default"])((0, _index.textOverflow)(overflow).map(function (item, index) {
140
+ return _objectSpread(_objectSpread({}, item), index === 0 ? {
141
+ rule: [["LegendType", "$eq", "FixedWidth"]]
142
+ } : {});
143
+ })), [{
133
144
  name: 'iconSize',
134
145
  displayName: '图标尺寸',
135
146
  value: [{
@@ -165,7 +176,11 @@ var _default = function _default() {
165
176
  name: 'gridTemplateColumns',
166
177
  displayName: '列数',
167
178
  value: gridTemplateColumns,
168
- type: 'number'
179
+ type: 'number',
180
+ config: {
181
+ min: 1,
182
+ step: 1
183
+ }
169
184
  }, {
170
185
  name: 'gridGap',
171
186
  displayName: '间距',
@@ -32,7 +32,7 @@ var _default = function _default() {
32
32
  }]
33
33
  }
34
34
  }, {
35
- rule: [['textOverflow', '$eq', 'marquee']],
35
+ rule: [['textOverflow', '$eq', 'marquee'], ["LegendType", "$eq", "FixedWidth"]],
36
36
  name: 'speed',
37
37
  displayName: '滚动速度',
38
38
  type: 'number',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/legend.js CHANGED
@@ -17,15 +17,6 @@ const loopConfig = {
17
17
  displayName: '',
18
18
  value: false,
19
19
  },
20
- {
21
- type: "number",
22
- name: "height",
23
- displayName: "限制高度",
24
- value: 120,
25
- config: {
26
- suffix: 'px'
27
- },
28
- },
29
20
  {
30
21
  type: "number",
31
22
  name: "interval",
@@ -109,8 +100,30 @@ export default ({
109
100
  type: 'textStyle',
110
101
  markColorType: 'textColor',
111
102
  },
112
- sc("maxWidth", "宽度", "number", maxWidth, { suffix: "px" }, showRule()),
113
- ...textOverflow(overflow),
103
+ {
104
+ "type": "radio",
105
+ "name": "LegendType",
106
+ "displayName": "类型",
107
+ "value": "Adaptive",
108
+ "config": {
109
+ "options": [
110
+ {
111
+ "name": "固定宽度",
112
+ "value": "FixedWidth"
113
+ },
114
+ {
115
+ "name": "自适应",
116
+ "value": "Adaptive"
117
+ }
118
+ ],
119
+ "mode": "normal"
120
+ }
121
+ },
122
+ sc("maxWidth", "宽度", "number", maxWidth, { suffix: "px" }, showRule("LegendType","$eq","FixedWidth")),
123
+ ...textOverflow(overflow).map((item, index) => ({
124
+ ...item,
125
+ ...(index === 0 ? { rule: [["LegendType", "$eq", "FixedWidth"]] } : {}),
126
+ })),
114
127
  {
115
128
  name: 'iconSize',
116
129
  displayName: '图标尺寸',
@@ -137,6 +150,7 @@ export default ({
137
150
  type: 'group',
138
151
  },
139
152
  {
153
+
140
154
  name: 'iconGap',
141
155
  displayName: '间距',
142
156
  value: iconGap,
@@ -154,6 +168,10 @@ export default ({
154
168
  displayName: '列数',
155
169
  value: gridTemplateColumns,
156
170
  type: 'number',
171
+ config: {
172
+ min: 1,
173
+ step: 1,
174
+ }
157
175
  },
158
176
  {
159
177
  name: 'gridGap',
@@ -180,7 +198,7 @@ export default ({
180
198
  },
181
199
  },
182
200
  ],
183
- type: 'group',
201
+ type: 'group'
184
202
  },
185
203
  {
186
204
  type: 'grid',
@@ -22,7 +22,7 @@ export default ({
22
22
  },
23
23
  },
24
24
  {
25
- rule: [['textOverflow', '$eq', 'marquee']],
25
+ rule: [['textOverflow', '$eq', 'marquee'],["LegendType", "$eq", "FixedWidth"]],
26
26
  name: 'speed',
27
27
  displayName: '滚动速度',
28
28
  type: 'number',