@cgeui/utils 0.0.2 → 0.0.3
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/dist/esm/charts/Chart/utils/complementData.js +714 -0
- package/dist/esm/charts/Chart/utils/convertToEchartsConfig/chartsToEchartsConfig.js +99 -0
- package/dist/esm/charts/Chart/utils/convertToEchartsConfig/index.js +2 -0
- package/dist/esm/charts/Chart/utils/convertToEchartsConfig/pieChartToEchartsConfig.js +140 -0
- package/dist/esm/charts/Chart/utils/getOption.js +365 -0
- package/dist/esm/charts/Chart/utils/handleChartConfig.js +279 -0
- package/dist/esm/charts/Chart/utils/index.js +5 -0
- package/dist/esm/charts/Chart/utils/preConfig/index.js +307 -0
- package/dist/esm/charts/Chart/utils/preConfig/type.js +1 -0
- package/dist/esm/charts/PieChart/interface.js +1 -0
- package/dist/esm/charts/PieChart/locales/en-US.js +9 -0
- package/dist/esm/charts/PieChart/locales/index.js +7 -0
- package/dist/esm/charts/PieChart/locales/zh-CN.js +9 -0
- package/dist/esm/charts/PieChart/util.js +434 -0
- package/dist/esm/charts/SuperChart/config/bar.js +39 -0
- package/dist/esm/charts/SuperChart/config/index.js +237 -0
- package/dist/esm/charts/SuperChart/configStyle/color.js +23 -0
- package/dist/esm/charts/SuperChart/configStyle/dataZoom.js +13 -0
- package/dist/esm/charts/SuperChart/configStyle/grid.js +20 -0
- package/dist/esm/charts/SuperChart/configStyle/index.js +10 -0
- package/dist/esm/charts/SuperChart/configStyle/legend.js +68 -0
- package/dist/esm/charts/SuperChart/configStyle/lineStyle.js +80 -0
- package/dist/esm/charts/SuperChart/configStyle/title.js +16 -0
- package/dist/esm/charts/SuperChart/configStyle/tooltip.js +38 -0
- package/dist/esm/charts/SuperChart/configStyle/visualMap.js +18 -0
- package/dist/esm/charts/SuperChart/configStyle/xAxis.js +19 -0
- package/dist/esm/charts/SuperChart/configStyle/yAxis.js +56 -0
- package/dist/esm/charts/SuperChart/interface.js +1 -0
- package/dist/esm/charts/chartTheme/colorUtil.js +22 -0
- package/dist/esm/charts/chartTheme/darkChart.js +508 -0
- package/dist/esm/charts/chartTheme/defaultChart.js +492 -0
- package/dist/esm/charts/chartTheme/index.js +4 -0
- package/dist/esm/charts/chartTheme/themeColor.js +168 -0
- package/dist/esm/charts/index.js +5 -0
- package/dist/esm/charts/utils/charts/hex2Rgb.js +32 -0
- package/dist/esm/charts/utils/constants/env.js +6 -0
- package/dist/esm/charts/utils/constants/helper.js +5 -0
- package/dist/esm/charts/utils/constants/index.js +3 -0
- package/dist/esm/charts/utils/constants/table.js +17 -0
- package/dist/esm/charts/utils/data.js +450 -0
- package/dist/esm/charts/utils/index.js +5 -0
- package/dist/esm/charts/utils/locale.js +7 -0
- package/dist/esm/charts/utils/time/index.js +14 -0
- package/dist/esm/charts/utils/types/action.d.ts +33 -0
- package/dist/esm/charts/utils/types/chart.d.ts +220 -0
- package/dist/esm/charts/utils/types/data.d.ts +51 -0
- package/dist/esm/charts/utils/types/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/lib/charts/Chart/utils/complementData.js +721 -0
- package/dist/lib/charts/Chart/utils/convertToEchartsConfig/chartsToEchartsConfig.js +105 -0
- package/dist/lib/charts/Chart/utils/convertToEchartsConfig/index.js +27 -0
- package/dist/lib/charts/Chart/utils/convertToEchartsConfig/pieChartToEchartsConfig.js +147 -0
- package/dist/lib/charts/Chart/utils/getOption.js +371 -0
- package/dist/lib/charts/Chart/utils/handleChartConfig.js +284 -0
- package/dist/lib/charts/Chart/utils/index.js +60 -0
- package/dist/lib/charts/Chart/utils/preConfig/index.js +313 -0
- package/dist/lib/charts/Chart/utils/preConfig/type.js +5 -0
- package/dist/lib/charts/PieChart/interface.js +5 -0
- package/dist/lib/charts/PieChart/locales/en-US.js +15 -0
- package/dist/lib/charts/PieChart/locales/index.js +14 -0
- package/dist/lib/charts/PieChart/locales/zh-CN.js +15 -0
- package/dist/lib/charts/PieChart/util.js +441 -0
- package/dist/lib/charts/SuperChart/config/bar.js +45 -0
- package/dist/lib/charts/SuperChart/config/index.js +243 -0
- package/dist/lib/charts/SuperChart/configStyle/color.js +29 -0
- package/dist/lib/charts/SuperChart/configStyle/dataZoom.js +19 -0
- package/dist/lib/charts/SuperChart/configStyle/grid.js +26 -0
- package/dist/lib/charts/SuperChart/configStyle/index.js +76 -0
- package/dist/lib/charts/SuperChart/configStyle/legend.js +74 -0
- package/dist/lib/charts/SuperChart/configStyle/lineStyle.js +86 -0
- package/dist/lib/charts/SuperChart/configStyle/title.js +22 -0
- package/dist/lib/charts/SuperChart/configStyle/tooltip.js +44 -0
- package/dist/lib/charts/SuperChart/configStyle/visualMap.js +24 -0
- package/dist/lib/charts/SuperChart/configStyle/xAxis.js +25 -0
- package/dist/lib/charts/SuperChart/configStyle/yAxis.js +62 -0
- package/dist/lib/charts/SuperChart/interface.js +5 -0
- package/dist/lib/charts/chartTheme/colorUtil.js +28 -0
- package/dist/lib/charts/chartTheme/darkChart.js +514 -0
- package/dist/lib/charts/chartTheme/defaultChart.js +498 -0
- package/dist/lib/charts/chartTheme/index.js +49 -0
- package/dist/lib/charts/chartTheme/themeColor.js +174 -0
- package/dist/lib/charts/index.js +60 -0
- package/dist/lib/charts/utils/charts/hex2Rgb.js +38 -0
- package/dist/lib/charts/utils/constants/env.js +12 -0
- package/dist/lib/charts/utils/constants/helper.js +11 -0
- package/dist/lib/charts/utils/constants/index.js +38 -0
- package/dist/lib/charts/utils/constants/table.js +23 -0
- package/dist/lib/charts/utils/data.js +454 -0
- package/dist/lib/charts/utils/index.js +60 -0
- package/dist/lib/charts/utils/locale.js +13 -0
- package/dist/lib/charts/utils/time/index.js +21 -0
- package/dist/lib/charts/utils/types/action.d.ts +33 -0
- package/dist/lib/charts/utils/types/chart.d.ts +220 -0
- package/dist/lib/charts/utils/types/data.d.ts +51 -0
- package/dist/lib/charts/utils/types/index.d.ts +3 -0
- package/dist/lib/index.js +25 -0
- package/package.json +2 -1
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
var legend = {
|
|
8
|
+
itemWidth: 8,
|
|
9
|
+
itemHeight: 8,
|
|
10
|
+
textStyle: {
|
|
11
|
+
color: "#000"
|
|
12
|
+
},
|
|
13
|
+
itemStyle: {
|
|
14
|
+
opacity: 0.85
|
|
15
|
+
},
|
|
16
|
+
icon: "diamond",
|
|
17
|
+
right: 0,
|
|
18
|
+
pageIconSize: 10,
|
|
19
|
+
// 翻页按钮大小
|
|
20
|
+
pageIconColor: "rgba(0,0,0, 0.7)",
|
|
21
|
+
// 可以翻页
|
|
22
|
+
pageIconInactiveColor: "rgba(0,0,0, 0.3)",
|
|
23
|
+
// 不能翻页
|
|
24
|
+
pageTextStyle: {
|
|
25
|
+
color: "rgba(0, 0, 0, 0.85)"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var barBackground = {
|
|
29
|
+
showBackground: true,
|
|
30
|
+
backgroundStyle: {
|
|
31
|
+
color: "rgba(200, 198, 198, 0.2)"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var tooltip = {
|
|
35
|
+
trigger: "axis",
|
|
36
|
+
axisPointer: {
|
|
37
|
+
type: "shadow",
|
|
38
|
+
shadowStyle: {
|
|
39
|
+
color: "rgba(219, 232, 255, 0.4)"
|
|
40
|
+
// width: 40,
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
backgroundColor: "#fff",
|
|
44
|
+
borderColor: "#fff",
|
|
45
|
+
textStyle: {
|
|
46
|
+
color: "#000"
|
|
47
|
+
},
|
|
48
|
+
appendToBody: true,
|
|
49
|
+
confine: true,
|
|
50
|
+
className: "frosted-glass",
|
|
51
|
+
extraCssText: "max-height: 240px; max-width: 400px; overflow: auto;",
|
|
52
|
+
enterable: true,
|
|
53
|
+
pageTextStyle: {
|
|
54
|
+
color: "#000"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var colorArr = ["#00B42A", "#F4A547", "#525FDD", "#FFCB47", "#34A5E5", "#E67754", "#13BDCC", "#C85DB8", "#30C147", "#9251DE"];
|
|
58
|
+
export var defaultPieChartTheme = {
|
|
59
|
+
color: colorArr,
|
|
60
|
+
backgroundColor: "transparent",
|
|
61
|
+
textStyle: {},
|
|
62
|
+
title: {
|
|
63
|
+
textStyle: {
|
|
64
|
+
color: "#444"
|
|
65
|
+
},
|
|
66
|
+
subtextStyle: {
|
|
67
|
+
color: "#888"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
legend: {
|
|
71
|
+
itemWidth: 6,
|
|
72
|
+
itemHeight: 6,
|
|
73
|
+
textStyle: {
|
|
74
|
+
color: "#000"
|
|
75
|
+
},
|
|
76
|
+
itemStyle: {
|
|
77
|
+
opacity: 0.85
|
|
78
|
+
},
|
|
79
|
+
icon: "circle",
|
|
80
|
+
right: 0,
|
|
81
|
+
pageIconSize: 10,
|
|
82
|
+
// 翻页按钮大小
|
|
83
|
+
pageIconColor: "rgba(0,0,0, 0.7)",
|
|
84
|
+
// 可以翻页
|
|
85
|
+
pageIconInactiveColor: "rgba(0,0,0, 0.3)",
|
|
86
|
+
// 不能翻页
|
|
87
|
+
pageTextStyle: {
|
|
88
|
+
color: "rgba(0, 0, 0, 0.85)"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
tooltip: tooltip
|
|
92
|
+
};
|
|
93
|
+
export var defaultChartTheme = {
|
|
94
|
+
color: colorArr,
|
|
95
|
+
backgroundColor: "transparent",
|
|
96
|
+
textStyle: {},
|
|
97
|
+
title: {
|
|
98
|
+
textStyle: {
|
|
99
|
+
color: "#444"
|
|
100
|
+
},
|
|
101
|
+
subtextStyle: {
|
|
102
|
+
color: "#888"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
line: {
|
|
106
|
+
itemStyle: {
|
|
107
|
+
borderWidth: 1
|
|
108
|
+
},
|
|
109
|
+
lineStyle: {
|
|
110
|
+
width: 2
|
|
111
|
+
},
|
|
112
|
+
symbolSize: 4,
|
|
113
|
+
symbol: "emptyCircle"
|
|
114
|
+
// smooth: true,
|
|
115
|
+
},
|
|
116
|
+
radar: {
|
|
117
|
+
itemStyle: {
|
|
118
|
+
borderWidth: 1
|
|
119
|
+
},
|
|
120
|
+
lineStyle: {
|
|
121
|
+
width: 2
|
|
122
|
+
},
|
|
123
|
+
symbolSize: 4,
|
|
124
|
+
symbol: "emptyCircle",
|
|
125
|
+
smooth: false
|
|
126
|
+
},
|
|
127
|
+
bar: _objectSpread(_objectSpread({}, barBackground), {}, {
|
|
128
|
+
barWidth: 16,
|
|
129
|
+
itemStyle: {
|
|
130
|
+
barBorderWidth: 0,
|
|
131
|
+
barBorderColor: "#ccc"
|
|
132
|
+
},
|
|
133
|
+
label: {
|
|
134
|
+
color: "#444",
|
|
135
|
+
fontWeight: 500,
|
|
136
|
+
fontSize: 14
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
pie: {
|
|
140
|
+
itemStyle: {
|
|
141
|
+
borderWidth: 0,
|
|
142
|
+
borderColor: "#fff"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
scatter: {
|
|
146
|
+
itemStyle: {
|
|
147
|
+
borderWidth: 0,
|
|
148
|
+
borderColor: "#ccc"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
boxplot: {},
|
|
152
|
+
parallel: {
|
|
153
|
+
itemStyle: {
|
|
154
|
+
borderWidth: 0,
|
|
155
|
+
borderColor: "#ccc"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
sankey: {
|
|
159
|
+
itemStyle: {
|
|
160
|
+
borderWidth: 0,
|
|
161
|
+
borderColor: "#ccc"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
funnel: {
|
|
165
|
+
itemStyle: {
|
|
166
|
+
borderWidth: 0,
|
|
167
|
+
borderColor: "#ccc"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
gauge: {
|
|
171
|
+
itemStyle: {
|
|
172
|
+
borderWidth: 0,
|
|
173
|
+
borderColor: "#ccc"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
candlestick: {
|
|
177
|
+
itemStyle: {
|
|
178
|
+
color: "#c12e34",
|
|
179
|
+
color0: "#2b821d",
|
|
180
|
+
borderColor: "#c12e34",
|
|
181
|
+
borderColor0: "#2b821d",
|
|
182
|
+
borderWidth: 1
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
graph: {
|
|
186
|
+
itemStyle: {
|
|
187
|
+
borderWidth: 0,
|
|
188
|
+
borderColor: "#ccc"
|
|
189
|
+
},
|
|
190
|
+
lineStyle: {
|
|
191
|
+
width: 1,
|
|
192
|
+
color: "#aaaaaa"
|
|
193
|
+
},
|
|
194
|
+
symbolSize: 4,
|
|
195
|
+
symbol: "emptyCircle",
|
|
196
|
+
smooth: false,
|
|
197
|
+
color: ["#c12e34", "#e6b600", "#0098d9", "#2b821d", "#005eaa", "#339ca8", "#cda819", "#32a487"],
|
|
198
|
+
label: {
|
|
199
|
+
color: "#eeeeee"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
map: {
|
|
203
|
+
itemStyle: {
|
|
204
|
+
areaColor: "#ddd",
|
|
205
|
+
borderColor: "#eee",
|
|
206
|
+
borderWidth: 0.5
|
|
207
|
+
},
|
|
208
|
+
label: {
|
|
209
|
+
color: "#c12e34"
|
|
210
|
+
},
|
|
211
|
+
emphasis: {
|
|
212
|
+
itemStyle: {
|
|
213
|
+
areaColor: "#e6b600",
|
|
214
|
+
borderColor: "#ddd",
|
|
215
|
+
borderWidth: 1
|
|
216
|
+
},
|
|
217
|
+
label: {
|
|
218
|
+
color: "#c12e34"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
geo: {
|
|
223
|
+
itemStyle: {
|
|
224
|
+
areaColor: "#ddd",
|
|
225
|
+
borderColor: "#eee",
|
|
226
|
+
borderWidth: 0.5
|
|
227
|
+
},
|
|
228
|
+
label: {
|
|
229
|
+
color: "#c12e34"
|
|
230
|
+
},
|
|
231
|
+
emphasis: {
|
|
232
|
+
itemStyle: {
|
|
233
|
+
areaColor: "#e6b600",
|
|
234
|
+
borderColor: "#ddd",
|
|
235
|
+
borderWidth: 1
|
|
236
|
+
},
|
|
237
|
+
label: {
|
|
238
|
+
color: "#c12e34"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
categoryAxis: {
|
|
243
|
+
axisLine: {
|
|
244
|
+
show: true,
|
|
245
|
+
lineStyle: {
|
|
246
|
+
type: "solid",
|
|
247
|
+
color: "#DBDFE6",
|
|
248
|
+
width: 1.5
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
axisTick: {
|
|
252
|
+
show: false,
|
|
253
|
+
lineStyle: {
|
|
254
|
+
color: "#DBDFE6"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
nameTextStyle: {
|
|
258
|
+
color: "#444",
|
|
259
|
+
opacity: 0.85
|
|
260
|
+
},
|
|
261
|
+
axisLabel: {
|
|
262
|
+
show: true,
|
|
263
|
+
color: "#444",
|
|
264
|
+
hideOverlap: true
|
|
265
|
+
},
|
|
266
|
+
splitLine: {
|
|
267
|
+
show: false
|
|
268
|
+
},
|
|
269
|
+
splitArea: {
|
|
270
|
+
show: false
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
valueAxis: {
|
|
274
|
+
scale: true,
|
|
275
|
+
axisLine: {
|
|
276
|
+
show: false,
|
|
277
|
+
lineStyle: {
|
|
278
|
+
type: "solid",
|
|
279
|
+
color: "#DBDFE6",
|
|
280
|
+
width: 1.5
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
axisTick: {
|
|
284
|
+
show: false,
|
|
285
|
+
lineStyle: {
|
|
286
|
+
color: "#DBDFE6"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
axisLabel: {
|
|
290
|
+
show: true,
|
|
291
|
+
color: "#888",
|
|
292
|
+
hideOverlap: true
|
|
293
|
+
},
|
|
294
|
+
splitLine: {
|
|
295
|
+
show: true,
|
|
296
|
+
lineStyle: {
|
|
297
|
+
type: "dashed",
|
|
298
|
+
color: ["#DBDFE6"]
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
splitArea: {
|
|
302
|
+
show: false
|
|
303
|
+
},
|
|
304
|
+
nameTextStyle: {
|
|
305
|
+
color: "#444",
|
|
306
|
+
opacity: 0.85
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
timeAxis: {
|
|
310
|
+
axisLine: {
|
|
311
|
+
show: true,
|
|
312
|
+
lineStyle: {
|
|
313
|
+
type: "solid",
|
|
314
|
+
color: "#DBDFE6",
|
|
315
|
+
width: 1.5
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
axisTick: {
|
|
319
|
+
show: false,
|
|
320
|
+
lineStyle: {
|
|
321
|
+
color: "#DBDFE6"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
nameTextStyle: {
|
|
325
|
+
color: "#444",
|
|
326
|
+
opacity: 0.85
|
|
327
|
+
},
|
|
328
|
+
axisLabel: {
|
|
329
|
+
show: true,
|
|
330
|
+
color: "#444",
|
|
331
|
+
formatter: {
|
|
332
|
+
year: "{yyyy}",
|
|
333
|
+
month: "{MMM}",
|
|
334
|
+
day: "{d}",
|
|
335
|
+
hour: "{HH}:{mm}",
|
|
336
|
+
minute: "{HH}:{mm}",
|
|
337
|
+
second: "{HH}:{mm}:{ss}"
|
|
338
|
+
},
|
|
339
|
+
hideOverlap: true
|
|
340
|
+
},
|
|
341
|
+
splitLine: {
|
|
342
|
+
show: false
|
|
343
|
+
},
|
|
344
|
+
splitArea: {
|
|
345
|
+
show: false
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
logAxis: {
|
|
349
|
+
axisLine: {
|
|
350
|
+
show: true,
|
|
351
|
+
lineStyle: {
|
|
352
|
+
color: "#DBDFE6"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
axisTick: {
|
|
356
|
+
show: true,
|
|
357
|
+
lineStyle: {
|
|
358
|
+
color: "#DBDFE6"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
axisLabel: {
|
|
362
|
+
show: true,
|
|
363
|
+
color: "#333"
|
|
364
|
+
},
|
|
365
|
+
splitLine: {
|
|
366
|
+
show: true,
|
|
367
|
+
lineStyle: {
|
|
368
|
+
type: "dashed",
|
|
369
|
+
color: ["#DBDFE6"]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
splitArea: {
|
|
373
|
+
show: false,
|
|
374
|
+
areaStyle: {
|
|
375
|
+
color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
toolbox: {
|
|
380
|
+
iconStyle: {
|
|
381
|
+
borderColor: "#06467c"
|
|
382
|
+
},
|
|
383
|
+
emphasis: {
|
|
384
|
+
iconStyle: {
|
|
385
|
+
borderColor: "#4187c2"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
legend: legend,
|
|
390
|
+
tooltip: tooltip,
|
|
391
|
+
timeline: {
|
|
392
|
+
lineStyle: {
|
|
393
|
+
color: "#005eaa",
|
|
394
|
+
width: 1
|
|
395
|
+
},
|
|
396
|
+
itemStyle: {
|
|
397
|
+
color: "#005eaa",
|
|
398
|
+
borderWidth: 1
|
|
399
|
+
},
|
|
400
|
+
controlStyle: {
|
|
401
|
+
color: "#005eaa",
|
|
402
|
+
borderColor: "#005eaa",
|
|
403
|
+
borderWidth: 0.5
|
|
404
|
+
},
|
|
405
|
+
checkpointStyle: {
|
|
406
|
+
color: "#005eaa",
|
|
407
|
+
borderColor: "#316bc2"
|
|
408
|
+
},
|
|
409
|
+
label: {
|
|
410
|
+
color: "#005eaa"
|
|
411
|
+
},
|
|
412
|
+
emphasis: {
|
|
413
|
+
itemStyle: {
|
|
414
|
+
color: "#005eaa"
|
|
415
|
+
},
|
|
416
|
+
controlStyle: {
|
|
417
|
+
color: "#005eaa",
|
|
418
|
+
borderColor: "#005eaa",
|
|
419
|
+
borderWidth: 0.5
|
|
420
|
+
},
|
|
421
|
+
label: {
|
|
422
|
+
color: "#005eaa"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
visualMap: {
|
|
427
|
+
color: ["#1790cf", "#a2d4e6"],
|
|
428
|
+
textStyle: {
|
|
429
|
+
color: "#333333"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
dataZoom: {
|
|
433
|
+
backgroundColor: "rgba(47,69,84,0)",
|
|
434
|
+
dataBackgroundColor: "rgba(47,69,84,0.3)",
|
|
435
|
+
fillerColor: "rgba(167,183,204,0.4)",
|
|
436
|
+
handleColor: "#a7b7cc",
|
|
437
|
+
handleSize: "100%",
|
|
438
|
+
textStyle: {
|
|
439
|
+
color: "#333333"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
markPoint: {
|
|
443
|
+
label: {
|
|
444
|
+
color: "#eeeeee"
|
|
445
|
+
},
|
|
446
|
+
emphasis: {
|
|
447
|
+
label: {
|
|
448
|
+
color: "#eeeeee"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
categoryAxis3D: {
|
|
453
|
+
axisLabel: {
|
|
454
|
+
color: "#444",
|
|
455
|
+
hideOverlap: true
|
|
456
|
+
},
|
|
457
|
+
axisLine: {
|
|
458
|
+
lineStyle: {
|
|
459
|
+
type: "solid",
|
|
460
|
+
color: "#DBDFE6",
|
|
461
|
+
width: 1.5
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
splitLine: {
|
|
465
|
+
show: true,
|
|
466
|
+
lineStyle: {
|
|
467
|
+
type: "dashed",
|
|
468
|
+
color: "#DBDFE6"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
valueAxis3D: {
|
|
473
|
+
axisLabel: {
|
|
474
|
+
color: "#444",
|
|
475
|
+
hideOverlap: true
|
|
476
|
+
},
|
|
477
|
+
axisLine: {
|
|
478
|
+
lineStyle: {
|
|
479
|
+
type: "solid",
|
|
480
|
+
color: "#DBDFE6",
|
|
481
|
+
width: 1.5
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
splitLine: {
|
|
485
|
+
show: true,
|
|
486
|
+
lineStyle: {
|
|
487
|
+
type: "dashed",
|
|
488
|
+
color: "#DBDFE6"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 自定义主题
|
|
3
|
+
*/
|
|
4
|
+
// All antd theme variables: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less
|
|
5
|
+
export var themeColor = {
|
|
6
|
+
'@no-bg': 'transparent',
|
|
7
|
+
'@light': '#fff',
|
|
8
|
+
'@dark': '#000',
|
|
9
|
+
'@heading-color': 'fade(@light, 85)',
|
|
10
|
+
'@text-color': 'fade(@light, 65)',
|
|
11
|
+
'@text-color-secondary': 'fade(@light, 45)',
|
|
12
|
+
'@disabled-color': 'fade(@light, 25)',
|
|
13
|
+
'@primary-5': '#40a9ff',
|
|
14
|
+
'@primary-color': '#1890ff',
|
|
15
|
+
'@outline-color': '@primary-color',
|
|
16
|
+
//icon
|
|
17
|
+
'@icon-color': 'fade(@light, 65)',
|
|
18
|
+
'@icon-color-hover': 'fade(@light, 85)',
|
|
19
|
+
'@primary-6': '#096dd9',
|
|
20
|
+
//border
|
|
21
|
+
// Border color
|
|
22
|
+
'@border-color-base': '@white-2',
|
|
23
|
+
// base border outline a component
|
|
24
|
+
'@border-color-split': '@white-2',
|
|
25
|
+
// split border inside a component
|
|
26
|
+
'@border-color-inverse': '@white',
|
|
27
|
+
'@border-width-base': '1px',
|
|
28
|
+
// width of the border for a component
|
|
29
|
+
'@border-style-base': 'solid',
|
|
30
|
+
// style of a components border
|
|
31
|
+
|
|
32
|
+
// vertical margins
|
|
33
|
+
'@margin-lg': '20px',
|
|
34
|
+
// containers
|
|
35
|
+
'@margin-md': '16px',
|
|
36
|
+
// small containers and buttons
|
|
37
|
+
'@margin-sm': '12px',
|
|
38
|
+
// Form controls and items
|
|
39
|
+
'@margin-xs': '8px',
|
|
40
|
+
// small items
|
|
41
|
+
'@margin-xss': '4px',
|
|
42
|
+
// more small
|
|
43
|
+
|
|
44
|
+
//btn
|
|
45
|
+
'@btn-default-color': '@heading-color',
|
|
46
|
+
'@btn-default-bg': '#444457',
|
|
47
|
+
'@btn-default-border': '#444457',
|
|
48
|
+
'@btn-ghost-color': 'fade(@light, 45)',
|
|
49
|
+
'@btn-ghost-border': 'fade(@light, 45)',
|
|
50
|
+
//input
|
|
51
|
+
'@input-color': '@text-color',
|
|
52
|
+
'@input-bg': '@no-bg',
|
|
53
|
+
'@input-disabled-bg': '#4c4c61',
|
|
54
|
+
'@input-placeholder-color': '@text-color-secondary',
|
|
55
|
+
'@input-hover-border-color': 'fade(@light, 10)',
|
|
56
|
+
'@checkbox-check-color': '#3b3b4d',
|
|
57
|
+
'@checkbox-color': '@primary-color',
|
|
58
|
+
'@select-border-color': '#3b3b4d',
|
|
59
|
+
//bg
|
|
60
|
+
bg1: '#03091D',
|
|
61
|
+
bg2: '#0B1227',
|
|
62
|
+
bg3: '#121C3A',
|
|
63
|
+
'@background-color-base': '@bg1',
|
|
64
|
+
'@background-color-light': '@bg2',
|
|
65
|
+
'@item-active-bg': '#272733',
|
|
66
|
+
'@menu-dark-bg': '#001529',
|
|
67
|
+
'@body-background': '@background-color-base',
|
|
68
|
+
'@component-background': '@background-color-light',
|
|
69
|
+
'@tooltip-bg': '#191922',
|
|
70
|
+
'@tooltip-arrow-color': '#191922',
|
|
71
|
+
'@popover-bg': '#2d2d3b',
|
|
72
|
+
// Layout
|
|
73
|
+
'@layout-header-background': '@background-color-light',
|
|
74
|
+
'@layout-body-background': '@body-background',
|
|
75
|
+
'@page-header-back-color': '@background-color-base',
|
|
76
|
+
'@success-color': '#00a854',
|
|
77
|
+
'@info-color': '@primary-color',
|
|
78
|
+
'@warning-color': '#ffbf00',
|
|
79
|
+
'@error-color': '#f04134',
|
|
80
|
+
'@menu-bg': '#30303d',
|
|
81
|
+
'@menu-item-active-bg': 'fade(@light, 5)',
|
|
82
|
+
'@menu-highlight-color': '@light',
|
|
83
|
+
//table
|
|
84
|
+
'@table-bg': '@background-color-base',
|
|
85
|
+
'@table-header-bg': '@background-color-base',
|
|
86
|
+
'@table-filter-dropdown-bg': '@bg3',
|
|
87
|
+
// '@table-header-filter-active-bg': '@blue',
|
|
88
|
+
//card
|
|
89
|
+
'@card-head-background': 'transparent',
|
|
90
|
+
'@card-background': '@component-background',
|
|
91
|
+
'@card-hover-border': '#383847',
|
|
92
|
+
'@card-actions-background': '#30303d',
|
|
93
|
+
'@tail-color': 'fade(@light, 10)',
|
|
94
|
+
'@radio-button-bg': 'transparent',
|
|
95
|
+
'@radio-button-checked-bg': 'transparent',
|
|
96
|
+
'@radio-dot-color': '@primary-color',
|
|
97
|
+
'@table-row-hover-bg': '#383847',
|
|
98
|
+
'@item-hover-bg': '#383847',
|
|
99
|
+
'@alert-text-color': 'fade(@dark, 65%)',
|
|
100
|
+
'@tabs-horizontal-padding': '12px 0',
|
|
101
|
+
// zIndex': 'notification > popover > tooltip
|
|
102
|
+
'@zindex-notification': '1063',
|
|
103
|
+
'@zindex-popover': '1061',
|
|
104
|
+
'@zindex-tooltip': '1060',
|
|
105
|
+
// width
|
|
106
|
+
'@anchor-border-width': '1px',
|
|
107
|
+
// margin
|
|
108
|
+
'@form-item-margin-bottom': '24px',
|
|
109
|
+
'@menu-item-vertical-margin': '0px',
|
|
110
|
+
'@menu-item-boundary-margin': '0px',
|
|
111
|
+
// size
|
|
112
|
+
'@font-size-base': '14px',
|
|
113
|
+
'@font-size-lg': '16px',
|
|
114
|
+
'@screen-xl': '1208px',
|
|
115
|
+
'@screen-lg': '1024px',
|
|
116
|
+
'@screen-md': '768px',
|
|
117
|
+
// 移动
|
|
118
|
+
'@screen-sm': '767.9px',
|
|
119
|
+
// 超小屏
|
|
120
|
+
'@screen-xs': '375px',
|
|
121
|
+
'@alert-message-color': '@popover-bg',
|
|
122
|
+
// 官网
|
|
123
|
+
'@site-text-color': '@text-color',
|
|
124
|
+
'@site-border-color-split': 'fade(@light, 5)',
|
|
125
|
+
'@site-heading-color': '@heading-color',
|
|
126
|
+
'@site-header-box-shadow': '0 0.3px 0.9px rgba(0, 0, 0, 0.12), 0 1.6px 3.6px rgba(0, 0, 0, 0.12)',
|
|
127
|
+
'@home-text-color': '@text-color',
|
|
128
|
+
// 自定义需要找设计师
|
|
129
|
+
'@gray-8': '@text-color',
|
|
130
|
+
'@skeleton-color': 'rgba(0,0,0,0.8)',
|
|
131
|
+
// pro
|
|
132
|
+
'@pro-header-box-shadow': '@site-header-box-shadow',
|
|
133
|
+
// 背景图片,新增
|
|
134
|
+
'@login-bg': "url('../assets/loginBgPng.jpg')",
|
|
135
|
+
// '@login-bg': `url('')`, // 没有必须为空,js文件里引入
|
|
136
|
+
blue: '#0C6FF2',
|
|
137
|
+
'blue-1': 'rgba(12, 111, 242, 0.1)',
|
|
138
|
+
'blue-2': 'rgba(12, 111, 242, 0.3)',
|
|
139
|
+
'blue-3': 'rgba(12, 111, 242, 0.25)',
|
|
140
|
+
green: '#19D56B',
|
|
141
|
+
purple: '#871CD5',
|
|
142
|
+
orange: '#D89614',
|
|
143
|
+
red: '#E11D26',
|
|
144
|
+
darkBlue: '#0B1227',
|
|
145
|
+
darkBlue1: '#121C3A',
|
|
146
|
+
darkBlue2: '#03091D',
|
|
147
|
+
upper: '#2CCCDB',
|
|
148
|
+
normal: '#3888FF',
|
|
149
|
+
// 不能是白色了
|
|
150
|
+
lower: '#2CCCDB',
|
|
151
|
+
// 8BFFF8
|
|
152
|
+
|
|
153
|
+
'primary-color': '#0C6FF2',
|
|
154
|
+
grey: '#D8D8D8',
|
|
155
|
+
'grey-1': 'rgba(234, 234, 234, 0.12)',
|
|
156
|
+
white: '#FFFFFF',
|
|
157
|
+
'white-1': 'rgba(255, 255, 255, 0.65)',
|
|
158
|
+
'white-2': 'rgba(255, 255, 255, 0.08)',
|
|
159
|
+
'white-3': 'rgba(255, 255, 255, 0.4)',
|
|
160
|
+
'white-4': 'rgba(255, 255, 255, 0.85)',
|
|
161
|
+
'white-5': 'rgba(255, 255, 255, 0.2)',
|
|
162
|
+
'white-6': 'rgba(255, 255, 255, 0.25)',
|
|
163
|
+
'white-7': 'rgba(255, 255, 255, 0.45)',
|
|
164
|
+
'white-8': 'rgba(255, 255, 255, 0.12)',
|
|
165
|
+
'white-9': 'rgba(255, 255, 255, 0.5)',
|
|
166
|
+
'1DB35D': '#1DB35D',
|
|
167
|
+
D89614: '#D89614'
|
|
168
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 将十六进制颜色值转换为RGB格式,并可指定透明度
|
|
3
|
+
* @param hex 十六进制颜色值,可以是三位或六位
|
|
4
|
+
* @param opacity 透明度,取值范围0-1
|
|
5
|
+
* @returns 转换后的RGB颜色值,包含透明度
|
|
6
|
+
*/
|
|
7
|
+
export function hex2Rgb(hex, opacity) {
|
|
8
|
+
// 定义rgb数组
|
|
9
|
+
var rgb = [];
|
|
10
|
+
var resolvedHex = hex;
|
|
11
|
+
// 判断传入是否为#三位十六进制数
|
|
12
|
+
if (/^\#[0-9A-F]{3}$/i.test(resolvedHex)) {
|
|
13
|
+
// 把三位十六进制数转化为六位,将每个字符重复两次
|
|
14
|
+
var sixHex = resolvedHex.replace(/[0-9A-F]/gi, function (kw) {
|
|
15
|
+
return kw + kw;
|
|
16
|
+
});
|
|
17
|
+
resolvedHex = sixHex;
|
|
18
|
+
}
|
|
19
|
+
// 判断传入是否为#六位十六进制数
|
|
20
|
+
if (/^#[0-9A-F]{6}$/i.test(resolvedHex)) {
|
|
21
|
+
// 十六进制转化为十进制并存入数组
|
|
22
|
+
resolvedHex.replace(/[0-9A-F]{2}/gi, function (kw) {
|
|
23
|
+
rgb.push(parseInt('0x' + kw, 16));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// 输出RGB格式颜色
|
|
27
|
+
return "rgb(".concat(rgb.join(','), ")").slice(0, "rgb(".concat(rgb.join(','), ")").length - 1) + ',' + opacity + ')';
|
|
28
|
+
} else {
|
|
29
|
+
// 对非六位的十六进制颜色值,直接返回并追加透明度
|
|
30
|
+
return resolvedHex.slice(0, resolvedHex.length - 1) + ',' + opacity + ')';
|
|
31
|
+
}
|
|
32
|
+
}
|