@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 +25 -10
- package/lib/textOverflow.js +1 -1
- package/package.json +1 -1
- package/src/legend.js +30 -12
- package/src/textOverflow.js +1 -1
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: '间距',
|
package/lib/textOverflow.js
CHANGED
package/package.json
CHANGED
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
|
-
|
|
113
|
-
|
|
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',
|
package/src/textOverflow.js
CHANGED