@easyv/config 1.2.25 → 1.2.27
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 -2
- package/lib/textOverflow.js +1 -1
- package/package.json +1 -1
- package/src/font.js +23 -23
- package/src/legend.js +30 -3
- package/src/textOverflow.js +1 -1
package/lib/legend.js
CHANGED
|
@@ -119,9 +119,28 @@ var _default = function _default() {
|
|
|
119
119
|
value: font,
|
|
120
120
|
type: 'textStyle',
|
|
121
121
|
markColorType: 'textColor'
|
|
122
|
+
}, {
|
|
123
|
+
"type": "radio",
|
|
124
|
+
"name": "LegendType",
|
|
125
|
+
"displayName": "类型",
|
|
126
|
+
"value": "FixedWidth",
|
|
127
|
+
"config": {
|
|
128
|
+
"options": [{
|
|
129
|
+
"name": "固定宽度",
|
|
130
|
+
"value": "FixedWidth"
|
|
131
|
+
}, {
|
|
132
|
+
"name": "自适应",
|
|
133
|
+
"value": "Adaptive"
|
|
134
|
+
}],
|
|
135
|
+
"mode": "normal"
|
|
136
|
+
}
|
|
122
137
|
}, (0, _index.sc)("maxWidth", "宽度", "number", maxWidth, {
|
|
123
138
|
suffix: "px"
|
|
124
|
-
}, 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
|
+
})), [{
|
|
125
144
|
name: 'iconSize',
|
|
126
145
|
displayName: '图标尺寸',
|
|
127
146
|
value: [{
|
|
@@ -157,7 +176,11 @@ var _default = function _default() {
|
|
|
157
176
|
name: 'gridTemplateColumns',
|
|
158
177
|
displayName: '列数',
|
|
159
178
|
value: gridTemplateColumns,
|
|
160
|
-
type: 'number'
|
|
179
|
+
type: 'number',
|
|
180
|
+
config: {
|
|
181
|
+
min: 1,
|
|
182
|
+
step: 1
|
|
183
|
+
}
|
|
161
184
|
}, {
|
|
162
185
|
name: 'gridGap',
|
|
163
186
|
displayName: '间距',
|
package/lib/textOverflow.js
CHANGED
package/package.json
CHANGED
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/legend.js
CHANGED
|
@@ -100,8 +100,30 @@ export default ({
|
|
|
100
100
|
type: 'textStyle',
|
|
101
101
|
markColorType: 'textColor',
|
|
102
102
|
},
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
{
|
|
104
|
+
"type": "radio",
|
|
105
|
+
"name": "LegendType",
|
|
106
|
+
"displayName": "类型",
|
|
107
|
+
"value": "FixedWidth",
|
|
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
|
+
})),
|
|
105
127
|
{
|
|
106
128
|
name: 'iconSize',
|
|
107
129
|
displayName: '图标尺寸',
|
|
@@ -128,6 +150,7 @@ export default ({
|
|
|
128
150
|
type: 'group',
|
|
129
151
|
},
|
|
130
152
|
{
|
|
153
|
+
|
|
131
154
|
name: 'iconGap',
|
|
132
155
|
displayName: '间距',
|
|
133
156
|
value: iconGap,
|
|
@@ -145,6 +168,10 @@ export default ({
|
|
|
145
168
|
displayName: '列数',
|
|
146
169
|
value: gridTemplateColumns,
|
|
147
170
|
type: 'number',
|
|
171
|
+
config: {
|
|
172
|
+
min: 1,
|
|
173
|
+
step: 1,
|
|
174
|
+
}
|
|
148
175
|
},
|
|
149
176
|
{
|
|
150
177
|
name: 'gridGap',
|
|
@@ -171,7 +198,7 @@ export default ({
|
|
|
171
198
|
},
|
|
172
199
|
},
|
|
173
200
|
],
|
|
174
|
-
type: 'group'
|
|
201
|
+
type: 'group'
|
|
175
202
|
},
|
|
176
203
|
{
|
|
177
204
|
type: 'grid',
|
package/src/textOverflow.js
CHANGED