@easyv/config 1.2.9 → 1.2.10

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/label.js CHANGED
@@ -645,7 +645,7 @@ var axisLabel = function axisLabel() {
645
645
  displayName: "显示最新",
646
646
  value: showLast,
647
647
  type: "boolean",
648
- tip: "显示返回最新数据的轴标签"
648
+ tip: "开启后会必定展示首尾日期的数据,但可能会导致标签数量和预期不一致"
649
649
  }, (0, _.sc)("autoSort", "自动排序", "boolean", autoSort, {
650
650
  other: {
651
651
  tip: "数据按时间自动排序展示"
package/lib/tooltip.js CHANGED
@@ -14,6 +14,7 @@ var defaultTooltip = {
14
14
  x: 0,
15
15
  y: 0
16
16
  },
17
+ bgColor: 'rgba(48, 55, 66, 0.85)',
17
18
  image: '',
18
19
  size: {
19
20
  width: 120,
@@ -27,6 +28,8 @@ var defaultTooltip = {
27
28
  },
28
29
  data: {
29
30
  xAxis: {
31
+ background: "",
32
+ gap: 5,
30
33
  font: {
31
34
  fontFamily: 'Mircosoft Yahei',
32
35
  fontSize: 16,
@@ -43,7 +46,9 @@ var defaultTooltip = {
43
46
  },
44
47
  data: {
45
48
  lineHeight: 18,
49
+ gap: 5,
46
50
  iconSize: 10,
51
+ background: "",
47
52
  num: "",
48
53
  name: {
49
54
  fontFamily: 'Mircosoft Yahei',
@@ -99,6 +104,8 @@ var _default = function _default() {
99
104
  tipTranslateX = _ref$tip$translate$x === void 0 ? defaultTooltip.tip.translate.x : _ref$tip$translate$x,
100
105
  _ref$tip$translate$y = _ref$tip$translate.y,
101
106
  tipTranslateY = _ref$tip$translate$y === void 0 ? defaultTooltip.tip.translate.y : _ref$tip$translate$y,
107
+ _ref$tip$bgColor = _ref$tip.bgColor,
108
+ bgColor = _ref$tip$bgColor === void 0 ? defaultTooltip.tip.bgColor : _ref$tip$bgColor,
102
109
  _ref$tip$image = _ref$tip.image,
103
110
  image = _ref$tip$image === void 0 ? defaultTooltip.tip.image : _ref$tip$image,
104
111
  _ref$tip$size = _ref$tip.size;
@@ -121,7 +128,11 @@ var _default = function _default() {
121
128
  _ref$tip$data = _ref$tip$data === void 0 ? defaultTooltip.tip.data : _ref$tip$data;
122
129
  var _ref$tip$data$xAxis = _ref$tip$data.xAxis;
123
130
  _ref$tip$data$xAxis = _ref$tip$data$xAxis === void 0 ? defaultTooltip.tip.data.xAxis : _ref$tip$data$xAxis;
124
- var _ref$tip$data$xAxis$f = _ref$tip$data$xAxis.font;
131
+ var _ref$tip$data$xAxis$b = _ref$tip$data$xAxis.background,
132
+ xAxisBg = _ref$tip$data$xAxis$b === void 0 ? defaultTooltip.tip.data.xAxis.background : _ref$tip$data$xAxis$b,
133
+ _ref$tip$data$xAxis$g = _ref$tip$data$xAxis.gap,
134
+ xAxisGap = _ref$tip$data$xAxis$g === void 0 ? defaultTooltip.tip.data.xAxis.gap : _ref$tip$data$xAxis$g,
135
+ _ref$tip$data$xAxis$f = _ref$tip$data$xAxis.font;
125
136
  _ref$tip$data$xAxis$f = _ref$tip$data$xAxis$f === void 0 ? defaultTooltip.tip.data.xAxis.font : _ref$tip$data$xAxis$f;
126
137
  var xAxisFontFamily = _ref$tip$data$xAxis$f.fontFamily,
127
138
  xAxisFontSize = _ref$tip$data$xAxis$f.fontSize,
@@ -139,10 +150,14 @@ var _default = function _default() {
139
150
  _ref$tip$data$data = _ref$tip$data$data === void 0 ? defaultTooltip.tip.data.data : _ref$tip$data$data;
140
151
  var _ref$tip$data$data$li = _ref$tip$data$data.lineHeight,
141
152
  lineHeight = _ref$tip$data$data$li === void 0 ? defaultTooltip.tip.data.lineHeight : _ref$tip$data$data$li,
153
+ _ref$tip$data$data$ga = _ref$tip$data$data.gap,
154
+ dataGap = _ref$tip$data$data$ga === void 0 ? defaultTooltip.tip.data.gap : _ref$tip$data$data$ga,
142
155
  _ref$tip$data$data$ic = _ref$tip$data$data.iconSize,
143
156
  iconSize = _ref$tip$data$data$ic === void 0 ? defaultTooltip.tip.data.iconSize : _ref$tip$data$data$ic,
144
157
  _ref$tip$data$data$nu = _ref$tip$data$data.num,
145
158
  num = _ref$tip$data$data$nu === void 0 ? defaultTooltip.tip.data.num : _ref$tip$data$data$nu,
159
+ _ref$tip$data$data$ba = _ref$tip$data$data.background,
160
+ dataBg = _ref$tip$data$data$ba === void 0 ? defaultTooltip.tip.data.background : _ref$tip$data$data$ba,
146
161
  _ref$tip$data$data$na = _ref$tip$data$data.name;
147
162
  _ref$tip$data$data$na = _ref$tip$data$data$na === void 0 ? defaultTooltip.tip.data.data.name : _ref$tip$data$data$na;
148
163
  var nameFontFamily = _ref$tip$data$data$na.fontFamily,
@@ -201,6 +216,12 @@ var _default = function _default() {
201
216
  name: 'tip',
202
217
  displayName: '提示框',
203
218
  value: [(0, _.translate)(tipTranslateX, tipTranslateY), {
219
+ name: "bgColor",
220
+ displayName: "背景色",
221
+ type: "color",
222
+ value: bgColor,
223
+ tip: "如果没有背景图,则启用背景色作为背景"
224
+ }, {
204
225
  type: 'uploadImage',
205
226
  name: 'image',
206
227
  displayName: '背景',
@@ -238,6 +259,16 @@ var _default = function _default() {
238
259
  name: 'xAxis',
239
260
  displayName: '类目标签',
240
261
  value: [{
262
+ name: "background",
263
+ displayName: "背景图",
264
+ type: "image",
265
+ value: xAxisBg
266
+ }, {
267
+ name: "gap",
268
+ displayName: "下间距",
269
+ type: "number",
270
+ value: xAxisGap
271
+ }, {
241
272
  name: 'font',
242
273
  displayName: '文本样式',
243
274
  value: {
@@ -276,15 +307,25 @@ var _default = function _default() {
276
307
  displayName: '数据',
277
308
  name: 'data',
278
309
  value: [{
279
- displayName: '行间距',
310
+ displayName: '行高',
280
311
  type: 'number',
281
312
  value: lineHeight,
282
313
  name: 'lineHeight'
314
+ }, {
315
+ displayName: '行间距',
316
+ type: 'number',
317
+ value: dataGap,
318
+ name: 'gap'
283
319
  }, {
284
320
  displayName: '图标尺寸',
285
321
  type: 'number',
286
322
  value: iconSize,
287
323
  name: 'iconSize'
324
+ }, {
325
+ name: "background",
326
+ displayName: "背景图",
327
+ type: "image",
328
+ value: dataBg
288
329
  }, {
289
330
  displayName: "保留小数",
290
331
  type: "input",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/label.js CHANGED
@@ -655,7 +655,7 @@ export const axisLabel = ({
655
655
  displayName: "显示最新",
656
656
  value: showLast,
657
657
  type: "boolean",
658
- tip: "显示返回最新数据的轴标签",
658
+ tip: "开启后会必定展示首尾日期的数据,但可能会导致标签数量和预期不一致",
659
659
  },
660
660
  sc(
661
661
  "autoSort",
package/src/tooltip.js CHANGED
@@ -5,6 +5,7 @@ const defaultTooltip = {
5
5
  interval: 4,
6
6
  tip: {
7
7
  translate: { x: 0, y: 0 },
8
+ bgColor: 'rgba(48, 55, 66, 0.85)',
8
9
  image: '',
9
10
  size: { width: 120, height: 110 },
10
11
  margin: {
@@ -15,6 +16,8 @@ const defaultTooltip = {
15
16
  },
16
17
  data: {
17
18
  xAxis: {
19
+ background:"",
20
+ gap:5,
18
21
  font: {
19
22
  fontFamily: 'Mircosoft Yahei',
20
23
  fontSize: 16,
@@ -26,10 +29,11 @@ const defaultTooltip = {
26
29
  align: 'left',
27
30
  translate: { x: 0, y: 0 },
28
31
  },
29
-
30
32
  data: {
31
33
  lineHeight: 18,
34
+ gap:5,
32
35
  iconSize: 10,
36
+ background:"",
33
37
  num:"",
34
38
  name: {
35
39
  fontFamily: 'Mircosoft Yahei',
@@ -72,10 +76,11 @@ export default ({
72
76
  x: tipTranslateX = defaultTooltip.tip.translate.x,
73
77
  y: tipTranslateY = defaultTooltip.tip.translate.y,
74
78
  } = defaultTooltip.tip.translate,
79
+ bgColor = defaultTooltip.tip.bgColor,
75
80
  image = defaultTooltip.tip.image,
76
81
  size: {
77
82
  width: tipWidth = defaultTooltip.tip.size.width,
78
- height: tipHeight = defaultTooltip.tip.size.height,
83
+ height: tipHeight = defaultTooltip.tip.size.height
79
84
  } = defaultTooltip.tip.size,
80
85
  margin: {
81
86
  marginTop = defaultTooltip.tip.margin.marginTop,
@@ -85,6 +90,8 @@ export default ({
85
90
  } = defaultTooltip.tip.margin,
86
91
  data: {
87
92
  xAxis: {
93
+ background:xAxisBg = defaultTooltip.tip.data.xAxis.background,
94
+ gap:xAxisGap = defaultTooltip.tip.data.xAxis.gap,
88
95
  font: {
89
96
  fontFamily: xAxisFontFamily,
90
97
  fontSize: xAxisFontSize,
@@ -100,8 +107,10 @@ export default ({
100
107
  // iconSize = defaultTooltip.tip.data.iconSize,
101
108
  data: {
102
109
  lineHeight = defaultTooltip.tip.data.lineHeight,
110
+ gap:dataGap = defaultTooltip.tip.data.gap,
103
111
  iconSize = defaultTooltip.tip.data.iconSize,
104
112
  num = defaultTooltip.tip.data.num,
113
+ background:dataBg = defaultTooltip.tip.data.background,
105
114
  name: {
106
115
  fontFamily: nameFontFamily,
107
116
  fontSize: nameFontSize,
@@ -166,6 +175,13 @@ export default ({
166
175
  displayName: '提示框',
167
176
  value: [
168
177
  translate(tipTranslateX, tipTranslateY),
178
+ {
179
+ name:"bgColor",
180
+ displayName:"背景色",
181
+ type:"color",
182
+ value:bgColor,
183
+ tip:"如果没有背景图,则启用背景色作为背景"
184
+ },
169
185
  {
170
186
  type: 'uploadImage',
171
187
  name: 'image',
@@ -193,7 +209,7 @@ export default ({
193
209
  span: 12,
194
210
  suffix: 'H',
195
211
  },
196
- },
212
+ }
197
213
  ],
198
214
  type: 'group',
199
215
  },
@@ -211,6 +227,18 @@ export default ({
211
227
  name: 'xAxis',
212
228
  displayName: '类目标签',
213
229
  value: [
230
+ {
231
+ name:"background",
232
+ displayName:"背景图",
233
+ type:"image",
234
+ value:xAxisBg
235
+ },
236
+ {
237
+ name:"gap",
238
+ displayName:"下间距",
239
+ type:"number",
240
+ value:xAxisGap
241
+ },
214
242
  {
215
243
  name: 'font',
216
244
  displayName: '文本样式',
@@ -255,17 +283,29 @@ export default ({
255
283
  name: 'data',
256
284
  value: [
257
285
  {
258
- displayName: '行间距',
286
+ displayName: '行高',
259
287
  type: 'number',
260
288
  value: lineHeight,
261
289
  name: 'lineHeight',
262
290
  },
291
+ {
292
+ displayName: '行间距',
293
+ type: 'number',
294
+ value: dataGap,
295
+ name: 'gap',
296
+ },
263
297
  {
264
298
  displayName: '图标尺寸',
265
299
  type: 'number',
266
300
  value: iconSize,
267
301
  name: 'iconSize',
268
302
  },
303
+ {
304
+ name:"background",
305
+ displayName:"背景图",
306
+ type:"image",
307
+ value:dataBg
308
+ },
269
309
  {
270
310
  displayName:"保留小数",
271
311
  type:"input",