vue-devui 1.5.4 → 1.5.6
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/alert/index.es.js +3 -3
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +27 -9
- package/auto-complete/index.umd.js +19 -1
- package/avatar/index.es.js +77 -3
- package/avatar/index.umd.js +75 -1
- package/carousel/index.es.js +448 -0
- package/carousel/index.umd.js +1 -0
- package/carousel/package.json +8 -0
- package/carousel/style.css +1 -0
- package/checkbox/index.es.js +27 -9
- package/checkbox/index.umd.js +19 -1
- package/code-review/index.es.js +73 -0
- package/code-review/index.umd.js +1 -0
- package/code-review/package.json +8 -0
- package/code-review/style.css +1 -0
- package/collapse/index.es.js +5 -1
- package/collapse/index.umd.js +5 -1
- package/date-picker-pro/index.es.js +54 -11
- package/date-picker-pro/index.umd.js +44 -1
- package/echarts/index.es.js +395 -0
- package/echarts/index.umd.js +1 -0
- package/echarts/package.json +8 -0
- package/editor-md/index.es.js +9173 -0
- package/editor-md/index.umd.js +142 -0
- package/editor-md/package.json +8 -0
- package/editor-md/style.css +1 -0
- package/form/index.es.js +27 -9
- package/form/index.umd.js +22 -4
- package/global.d.ts +6 -0
- package/grid/index.es.js +25 -1
- package/grid/index.umd.js +1 -1
- package/image-preview/index.es.js +34 -9
- package/image-preview/index.umd.js +26 -1
- package/input/index.es.js +27 -9
- package/input/index.umd.js +19 -1
- package/input-number/index.es.js +35 -11
- package/input-number/index.umd.js +30 -6
- package/mention/index.es.js +27 -9
- package/mention/index.umd.js +19 -1
- package/notification/index.es.js +11 -4
- package/notification/index.umd.js +8 -1
- package/nuxt/components/Carousel.js +3 -0
- package/nuxt/components/CarouselItem.js +3 -0
- package/nuxt/components/CodeReview.js +3 -0
- package/nuxt/components/DChart.js +2 -0
- package/nuxt/components/EditorMd.js +3 -0
- package/nuxt/components/EditorMdInjectionKey.js +3 -0
- package/nuxt/components/MdRender.js +3 -0
- package/nuxt/components/codeReviewProps.js +3 -0
- package/nuxt/components/devuiChartProps.js +2 -0
- package/nuxt/components/editorMdProps.js +3 -0
- package/nuxt/components/mdRenderProps.js +3 -0
- package/nuxt/components/mdToolbarItemProps.js +3 -0
- package/package.json +11 -3
- package/pagination/index.es.js +34 -13
- package/pagination/index.umd.js +22 -1
- package/popover/index.es.js +12 -4
- package/popover/index.umd.js +9 -1
- package/radio/index.es.js +27 -9
- package/radio/index.umd.js +30 -12
- package/rate/index.es.js +2 -2
- package/rate/index.umd.js +1 -1
- package/search/index.es.js +31 -11
- package/search/index.umd.js +21 -1
- package/select/index.es.js +32 -11
- package/select/index.umd.js +22 -1
- package/skeleton/index.es.js +17 -1
- package/skeleton/index.umd.js +17 -1
- package/style.css +1 -1
- package/switch/index.es.js +27 -9
- package/switch/index.umd.js +25 -7
- package/table/index.es.js +27 -9
- package/table/index.umd.js +19 -1
- package/textarea/index.es.js +27 -9
- package/textarea/index.umd.js +19 -1
- package/time-picker/index.es.js +27 -9
- package/time-picker/index.umd.js +19 -1
- package/time-select/index.es.js +32 -11
- package/time-select/index.umd.js +27 -6
- package/tree/index.es.js +27 -9
- package/tree/index.umd.js +19 -1
- package/types/avatar/src/components/icon-nobody.d.ts +1 -1
- package/types/code-review/index.d.ts +11 -0
- package/types/code-review/src/code-review-types.d.ts +14 -0
- package/types/code-review/src/code-review.d.ts +27 -0
- package/types/code-review/src/composables/use-code-review.d.ts +4 -0
- package/types/echarts/index.d.ts +11 -0
- package/types/echarts/src/echarts-theme.d.ts +351 -0
- package/types/echarts/src/echarts-types.d.ts +8 -0
- package/types/echarts/src/echarts.d.ts +16 -0
- package/types/editor-md/index.d.ts +12 -0
- package/types/editor-md/src/components/font-color.d.ts +2 -0
- package/types/editor-md/src/components/font-size.d.ts +2 -0
- package/types/editor-md/src/components/md-render.d.ts +95 -0
- package/types/editor-md/src/components/toolbar-item.d.ts +14 -0
- package/types/editor-md/src/components/toolbar.d.ts +3 -0
- package/types/editor-md/src/composables/helper.d.ts +2 -0
- package/types/editor-md/src/composables/md-render-service.d.ts +26 -0
- package/types/editor-md/src/composables/use-editor-md-render.d.ts +10 -0
- package/types/editor-md/src/composables/use-editor-md-theme.d.ts +3 -0
- package/types/editor-md/src/composables/use-editor-md-toolbar.d.ts +4 -0
- package/types/editor-md/src/composables/use-editor-md.d.ts +15 -0
- package/types/editor-md/src/editor-md-types.d.ts +172 -0
- package/types/editor-md/src/editor-md.d.ts +198 -0
- package/types/editor-md/src/icons-config.d.ts +23 -0
- package/types/editor-md/src/plugins/mermaid.d.ts +2 -0
- package/types/editor-md/src/plugins/toc.d.ts +1 -0
- package/types/editor-md/src/toolbar-config.d.ts +22 -0
- package/types/editor-md/src/utils.d.ts +2 -0
- package/types/grid/src/grid-types.d.ts +4 -0
- package/types/grid/src/row.d.ts +9 -0
- package/types/menu/src/menu.d.ts +1 -1
- package/types/nav-sprite/src/nav-sprite.d.ts +1 -1
- package/types/timeline/src/components/timeline-item.d.ts +1 -1
- package/types/vue-devui.d.ts +4 -1
- package/upload/index.es.js +11 -4
- package/upload/index.umd.js +8 -1
- package/vue-devui.es.js +16564 -14195
- package/vue-devui.umd.js +315 -20
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, ref, onMounted, onUnmounted, createVNode } from "vue";
|
|
21
|
+
import * as echarts from "echarts";
|
|
22
|
+
import { toRefs } from "@vueuse/core";
|
|
23
|
+
const devuiChartProps = {
|
|
24
|
+
option: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: {}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const DARK_LINE_COLOR = "#4E5057";
|
|
30
|
+
const DARK_TITLE_COLOR = "#CED1DB";
|
|
31
|
+
const DARK_TEXT_COLOR = "#696C75";
|
|
32
|
+
const DARK_LEGEND_COLOR = "#868A99";
|
|
33
|
+
const DARK_AXIS_COLOR = "#4E5057";
|
|
34
|
+
const LIGHT_LINE_COLOR = "#D7D8DA";
|
|
35
|
+
const LIGHT_TITLE_COLOR = "#252B3A";
|
|
36
|
+
const LIGHT_TEXT_COLOR = "#9B9FA8";
|
|
37
|
+
const LIGHT_LEGEND_COLOR = "#71757F";
|
|
38
|
+
const LIGHT_AXIS_COLOR = "#D7D8DA";
|
|
39
|
+
const DEFAULT_BASIC_COLOR_PALETTE = [
|
|
40
|
+
"#5C8DFF",
|
|
41
|
+
"#BC94FF",
|
|
42
|
+
"#54D2EB",
|
|
43
|
+
"#A6DD82",
|
|
44
|
+
"#FCDA6B",
|
|
45
|
+
"#CA7ED6",
|
|
46
|
+
"#7298F1",
|
|
47
|
+
"#73CEA6",
|
|
48
|
+
"#EDD249",
|
|
49
|
+
"#CAABFF",
|
|
50
|
+
"#85CAFF",
|
|
51
|
+
"#93D99A",
|
|
52
|
+
"#96ADFA",
|
|
53
|
+
"#F4AF8F",
|
|
54
|
+
"#A282E9",
|
|
55
|
+
"#FFBB6B",
|
|
56
|
+
"#69DBB9",
|
|
57
|
+
"#76DBEF",
|
|
58
|
+
"#B1CE4F",
|
|
59
|
+
"#5DA4DC"
|
|
60
|
+
];
|
|
61
|
+
function axisCommon(type) {
|
|
62
|
+
if (type === "dark") {
|
|
63
|
+
return {
|
|
64
|
+
axisLine: {
|
|
65
|
+
lineStyle: {
|
|
66
|
+
color: DARK_AXIS_COLOR
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
axisTick: {
|
|
70
|
+
lineStyle: {
|
|
71
|
+
color: DARK_AXIS_COLOR
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
axisLabel: {
|
|
75
|
+
textStyle: {
|
|
76
|
+
color: DARK_TEXT_COLOR
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
splitLine: {
|
|
80
|
+
lineStyle: {
|
|
81
|
+
type: [3, 3],
|
|
82
|
+
color: DARK_LINE_COLOR
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
return {
|
|
88
|
+
axisLine: {
|
|
89
|
+
lineStyle: {
|
|
90
|
+
color: LIGHT_AXIS_COLOR
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
axisTick: {
|
|
94
|
+
lineStyle: {
|
|
95
|
+
color: LIGHT_AXIS_COLOR
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
axisLabel: {
|
|
99
|
+
textStyle: {
|
|
100
|
+
color: LIGHT_TEXT_COLOR
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
splitLine: {
|
|
104
|
+
lineStyle: {
|
|
105
|
+
type: [3, 3],
|
|
106
|
+
color: LIGHT_LINE_COLOR
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const DEVUI_ECHART_THEME = {
|
|
113
|
+
defaultColorPalette: DEFAULT_BASIC_COLOR_PALETTE,
|
|
114
|
+
defaultDarkTheme: {
|
|
115
|
+
color: DEFAULT_BASIC_COLOR_PALETTE,
|
|
116
|
+
tooltip: {
|
|
117
|
+
axisPointer: {
|
|
118
|
+
label: {
|
|
119
|
+
show: false
|
|
120
|
+
},
|
|
121
|
+
lineStyle: {
|
|
122
|
+
color: DARK_LINE_COLOR,
|
|
123
|
+
width: 2,
|
|
124
|
+
type: [2, 3]
|
|
125
|
+
},
|
|
126
|
+
crossStyle: {
|
|
127
|
+
color: DARK_LINE_COLOR,
|
|
128
|
+
width: 2,
|
|
129
|
+
type: [2, 3]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
backgroundColor: "rgba(36,37,38,0.96)",
|
|
133
|
+
extraCssText: "border-radius: 8px;box-shadow: 0 1px 4px 0 rgba(37,43,58,0.1)",
|
|
134
|
+
borderWidth: 0,
|
|
135
|
+
padding: [8, 8],
|
|
136
|
+
textStyle: {
|
|
137
|
+
color: DARK_LEGEND_COLOR,
|
|
138
|
+
fontSize: 12
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
virtualMap: {
|
|
142
|
+
textStyle: {
|
|
143
|
+
color: DARK_TEXT_COLOR
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
legend: {
|
|
147
|
+
height: "80%",
|
|
148
|
+
width: "80%",
|
|
149
|
+
textStyle: {
|
|
150
|
+
color: DARK_LEGEND_COLOR
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
textStyle: {
|
|
154
|
+
color: DARK_TEXT_COLOR
|
|
155
|
+
},
|
|
156
|
+
title: {
|
|
157
|
+
textStyle: {
|
|
158
|
+
color: DARK_TITLE_COLOR
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
toolbox: {
|
|
162
|
+
iconStyle: {
|
|
163
|
+
borderColor: DARK_LINE_COLOR
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
dataZoom: {
|
|
167
|
+
textStyle: {
|
|
168
|
+
color: DARK_TEXT_COLOR
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
timeline: {
|
|
172
|
+
lineStyle: {
|
|
173
|
+
color: DARK_LINE_COLOR
|
|
174
|
+
},
|
|
175
|
+
label: {
|
|
176
|
+
textStyle: {
|
|
177
|
+
color: DARK_TEXT_COLOR
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
timeAxis: axisCommon("dark"),
|
|
182
|
+
logAxis: axisCommon("dark"),
|
|
183
|
+
valueAxis: __spreadProps(__spreadValues({}, axisCommon("dark")), {
|
|
184
|
+
axisLine: {
|
|
185
|
+
show: false,
|
|
186
|
+
lineStyle: {
|
|
187
|
+
color: DARK_AXIS_COLOR
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
axisTick: {
|
|
191
|
+
show: false
|
|
192
|
+
}
|
|
193
|
+
}),
|
|
194
|
+
categoryAxis: __spreadProps(__spreadValues({}, axisCommon("dark")), {
|
|
195
|
+
axisLine: {
|
|
196
|
+
show: true,
|
|
197
|
+
lineStyle: {
|
|
198
|
+
color: DARK_AXIS_COLOR
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
axisTick: {
|
|
202
|
+
show: false
|
|
203
|
+
}
|
|
204
|
+
}),
|
|
205
|
+
line: {
|
|
206
|
+
symbol: "circle"
|
|
207
|
+
},
|
|
208
|
+
graph: {
|
|
209
|
+
color: DEFAULT_BASIC_COLOR_PALETTE
|
|
210
|
+
},
|
|
211
|
+
geo: {
|
|
212
|
+
itemStyle: {
|
|
213
|
+
borderColor: "#fff",
|
|
214
|
+
areaColor: "#37383A"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
defaultLightTheme: {
|
|
219
|
+
color: DEFAULT_BASIC_COLOR_PALETTE,
|
|
220
|
+
tooltip: {
|
|
221
|
+
axisPointer: {
|
|
222
|
+
label: {
|
|
223
|
+
show: false
|
|
224
|
+
},
|
|
225
|
+
lineStyle: {
|
|
226
|
+
color: LIGHT_LINE_COLOR,
|
|
227
|
+
width: 2,
|
|
228
|
+
type: [2, 3]
|
|
229
|
+
},
|
|
230
|
+
crossStyle: {
|
|
231
|
+
color: LIGHT_LINE_COLOR,
|
|
232
|
+
width: 2,
|
|
233
|
+
type: [2, 3]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
backgroundColor: "rgba(255,255,255,0.96)",
|
|
237
|
+
extraCssText: "border-radius: 8px;box-shadow: 0 1px 4px 0 rgba(37,43,58,0.1)",
|
|
238
|
+
borderWidth: 0,
|
|
239
|
+
padding: [8, 8],
|
|
240
|
+
textStyle: {
|
|
241
|
+
color: LIGHT_LEGEND_COLOR,
|
|
242
|
+
fontSize: 12
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
virtualMap: {
|
|
246
|
+
textStyle: {
|
|
247
|
+
color: LIGHT_TEXT_COLOR
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
legend: {
|
|
251
|
+
height: "80%",
|
|
252
|
+
width: "80%",
|
|
253
|
+
align: "left",
|
|
254
|
+
textStyle: {
|
|
255
|
+
color: LIGHT_LEGEND_COLOR
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
textStyle: {
|
|
259
|
+
color: LIGHT_TEXT_COLOR
|
|
260
|
+
},
|
|
261
|
+
title: {
|
|
262
|
+
textStyle: {
|
|
263
|
+
color: LIGHT_TITLE_COLOR
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
toolbox: {
|
|
267
|
+
iconStyle: {
|
|
268
|
+
borderColor: LIGHT_LINE_COLOR
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
dataZoom: {
|
|
272
|
+
textStyle: {
|
|
273
|
+
color: LIGHT_TEXT_COLOR
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
timeline: {
|
|
277
|
+
lineStyle: {
|
|
278
|
+
color: LIGHT_LINE_COLOR
|
|
279
|
+
},
|
|
280
|
+
label: {
|
|
281
|
+
textStyle: {
|
|
282
|
+
color: LIGHT_TEXT_COLOR
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
timeAxis: axisCommon("light"),
|
|
287
|
+
logAxis: axisCommon("light"),
|
|
288
|
+
valueAxis: __spreadProps(__spreadValues({}, axisCommon("light")), {
|
|
289
|
+
axisLine: {
|
|
290
|
+
show: false,
|
|
291
|
+
lineStyle: {
|
|
292
|
+
color: LIGHT_AXIS_COLOR
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
axisTick: {
|
|
296
|
+
show: false
|
|
297
|
+
}
|
|
298
|
+
}),
|
|
299
|
+
categoryAxis: __spreadProps(__spreadValues({}, axisCommon("light")), {
|
|
300
|
+
axisLine: {
|
|
301
|
+
show: true,
|
|
302
|
+
lineStyle: {
|
|
303
|
+
color: LIGHT_AXIS_COLOR
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
axisTick: {
|
|
307
|
+
show: false
|
|
308
|
+
}
|
|
309
|
+
}),
|
|
310
|
+
line: {
|
|
311
|
+
symbol: "emptyCircle",
|
|
312
|
+
markPoint: {
|
|
313
|
+
label: {
|
|
314
|
+
show: true,
|
|
315
|
+
color: LIGHT_TEXT_COLOR
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
graph: {
|
|
320
|
+
color: DEFAULT_BASIC_COLOR_PALETTE
|
|
321
|
+
},
|
|
322
|
+
geo: {
|
|
323
|
+
itemStyle: {
|
|
324
|
+
borderColor: "#fff",
|
|
325
|
+
areaColor: "#eaebed"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
var DChart = defineComponent({
|
|
331
|
+
name: "DChart",
|
|
332
|
+
props: devuiChartProps,
|
|
333
|
+
emits: ["chartReady"],
|
|
334
|
+
setup(props, {
|
|
335
|
+
emit
|
|
336
|
+
}) {
|
|
337
|
+
const {
|
|
338
|
+
option
|
|
339
|
+
} = toRefs(props);
|
|
340
|
+
let theme;
|
|
341
|
+
let themeService;
|
|
342
|
+
let isDark = false;
|
|
343
|
+
let echartInstacne;
|
|
344
|
+
let timer;
|
|
345
|
+
const chartRef = ref();
|
|
346
|
+
const themeChange = () => {
|
|
347
|
+
var _a;
|
|
348
|
+
isDark = !!((_a = themeService == null ? void 0 : themeService.currentTheme) == null ? void 0 : _a.isDark);
|
|
349
|
+
theme = isDark ? DEVUI_ECHART_THEME.defaultDarkTheme : DEVUI_ECHART_THEME.defaultLightTheme;
|
|
350
|
+
echartInstacne.dispose();
|
|
351
|
+
echartInstacne = echarts.init(chartRef.value, theme);
|
|
352
|
+
echartInstacne.setOption(option.value, true);
|
|
353
|
+
console.log(option.value);
|
|
354
|
+
emit("chartReady", echartInstacne);
|
|
355
|
+
};
|
|
356
|
+
const onresize = () => {
|
|
357
|
+
clearTimeout(timer);
|
|
358
|
+
timer = setTimeout(() => {
|
|
359
|
+
echartInstacne.resize();
|
|
360
|
+
}, 100);
|
|
361
|
+
};
|
|
362
|
+
onMounted(() => {
|
|
363
|
+
var _a;
|
|
364
|
+
themeService = window["devuiThemeService"];
|
|
365
|
+
isDark = !!((_a = themeService == null ? void 0 : themeService.currentTheme) == null ? void 0 : _a.isDark);
|
|
366
|
+
theme = isDark ? DEVUI_ECHART_THEME.defaultDarkTheme : DEVUI_ECHART_THEME.defaultLightTheme;
|
|
367
|
+
echartInstacne = echarts.init(chartRef.value, theme);
|
|
368
|
+
if (themeService) {
|
|
369
|
+
themeService.eventBus.add("themeChanged", themeChange);
|
|
370
|
+
}
|
|
371
|
+
echartInstacne.setOption(option.value, true);
|
|
372
|
+
emit("chartReady", echartInstacne);
|
|
373
|
+
window.addEventListener("resize", onresize);
|
|
374
|
+
});
|
|
375
|
+
onUnmounted(() => {
|
|
376
|
+
echartInstacne == null ? void 0 : echartInstacne.dispatchAction({
|
|
377
|
+
type: "hideTip"
|
|
378
|
+
});
|
|
379
|
+
themeService.eventBus.remove("themeChanged", themeChange);
|
|
380
|
+
});
|
|
381
|
+
return () => createVNode("div", {
|
|
382
|
+
"ref": chartRef,
|
|
383
|
+
"class": "devui-charts"
|
|
384
|
+
}, null);
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
var index = {
|
|
388
|
+
title: "Echarts \u56FE\u8868",
|
|
389
|
+
category: "\u6F14\u8FDB\u4E2D",
|
|
390
|
+
status: "100%",
|
|
391
|
+
install(app) {
|
|
392
|
+
app.component(DChart.name, DChart);
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
export { DChart, index as default, devuiChartProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var j=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var v=(e,t,l)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,p=(e,t)=>{for(var l in t||(t={}))z.call(t,l)&&v(e,l,t[l]);if(F)for(var l of F(t))N.call(t,l)&&v(e,l,t[l]);return e},C=(e,t)=>G(e,H(t));(function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("echarts"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","echarts","@vueuse/core"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.index={},e.Vue,e.echarts,e.core))})(this,function(e,t,l,R){"use strict";function k(o){if(o&&o.__esModule)return o;var d={__proto__:null,[Symbol.toStringTag]:"Module"};return o&&Object.keys(o).forEach(function(n){if(n!=="default"){var s=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(d,n,s.get?s:{enumerable:!0,get:function(){return o[n]}})}}),d.default=o,Object.freeze(d)}var g=k(l);const _={option:{type:Object,default:{}}},u="#4E5057",B="#CED1DB",h="#696C75",b="#868A99",D="#4E5057",y="#D7D8DA",I="#252B3A",c="#9B9FA8",E="#71757F",S="#D7D8DA",f=["#5C8DFF","#BC94FF","#54D2EB","#A6DD82","#FCDA6B","#CA7ED6","#7298F1","#73CEA6","#EDD249","#CAABFF","#85CAFF","#93D99A","#96ADFA","#F4AF8F","#A282E9","#FFBB6B","#69DBB9","#76DBEF","#B1CE4F","#5DA4DC"];function a(o){return o==="dark"?{axisLine:{lineStyle:{color:D}},axisTick:{lineStyle:{color:D}},axisLabel:{textStyle:{color:h}},splitLine:{lineStyle:{type:[3,3],color:u}}}:{axisLine:{lineStyle:{color:S}},axisTick:{lineStyle:{color:S}},axisLabel:{textStyle:{color:c}},splitLine:{lineStyle:{type:[3,3],color:y}}}}const T={defaultColorPalette:f,defaultDarkTheme:{color:f,tooltip:{axisPointer:{label:{show:!1},lineStyle:{color:u,width:2,type:[2,3]},crossStyle:{color:u,width:2,type:[2,3]}},backgroundColor:"rgba(36,37,38,0.96)",extraCssText:"border-radius: 8px;box-shadow: 0 1px 4px 0 rgba(37,43,58,0.1)",borderWidth:0,padding:[8,8],textStyle:{color:b,fontSize:12}},virtualMap:{textStyle:{color:h}},legend:{height:"80%",width:"80%",textStyle:{color:b}},textStyle:{color:h},title:{textStyle:{color:B}},toolbox:{iconStyle:{borderColor:u}},dataZoom:{textStyle:{color:h}},timeline:{lineStyle:{color:u},label:{textStyle:{color:h}}},timeAxis:a("dark"),logAxis:a("dark"),valueAxis:C(p({},a("dark")),{axisLine:{show:!1,lineStyle:{color:D}},axisTick:{show:!1}}),categoryAxis:C(p({},a("dark")),{axisLine:{show:!0,lineStyle:{color:D}},axisTick:{show:!1}}),line:{symbol:"circle"},graph:{color:f},geo:{itemStyle:{borderColor:"#fff",areaColor:"#37383A"}}},defaultLightTheme:{color:f,tooltip:{axisPointer:{label:{show:!1},lineStyle:{color:y,width:2,type:[2,3]},crossStyle:{color:y,width:2,type:[2,3]}},backgroundColor:"rgba(255,255,255,0.96)",extraCssText:"border-radius: 8px;box-shadow: 0 1px 4px 0 rgba(37,43,58,0.1)",borderWidth:0,padding:[8,8],textStyle:{color:E,fontSize:12}},virtualMap:{textStyle:{color:c}},legend:{height:"80%",width:"80%",align:"left",textStyle:{color:E}},textStyle:{color:c},title:{textStyle:{color:I}},toolbox:{iconStyle:{borderColor:y}},dataZoom:{textStyle:{color:c}},timeline:{lineStyle:{color:y},label:{textStyle:{color:c}}},timeAxis:a("light"),logAxis:a("light"),valueAxis:C(p({},a("light")),{axisLine:{show:!1,lineStyle:{color:S}},axisTick:{show:!1}}),categoryAxis:C(p({},a("light")),{axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!1}}),line:{symbol:"emptyCircle",markPoint:{label:{show:!0,color:c}}},graph:{color:f},geo:{itemStyle:{borderColor:"#fff",areaColor:"#eaebed"}}}};var A=t.defineComponent({name:"DChart",props:_,emits:["chartReady"],setup(o,{emit:d}){const{option:n}=R.toRefs(o);let s,i,m=!1,r,O;const L=t.ref(),w=()=>{var x;m=!!((x=i==null?void 0:i.currentTheme)==null?void 0:x.isDark),s=m?T.defaultDarkTheme:T.defaultLightTheme,r.dispose(),r=g.init(L.value,s),r.setOption(n.value,!0),console.log(n.value),d("chartReady",r)},M=()=>{clearTimeout(O),O=setTimeout(()=>{r.resize()},100)};return t.onMounted(()=>{var x;i=window.devuiThemeService,m=!!((x=i==null?void 0:i.currentTheme)==null?void 0:x.isDark),s=m?T.defaultDarkTheme:T.defaultLightTheme,r=g.init(L.value,s),i&&i.eventBus.add("themeChanged",w),r.setOption(n.value,!0),d("chartReady",r),window.addEventListener("resize",M)}),t.onUnmounted(()=>{r==null||r.dispatchAction({type:"hideTip"}),i.eventBus.remove("themeChanged",w)}),()=>t.createVNode("div",{ref:L,class:"devui-charts"},null)}}),P={title:"Echarts \u56FE\u8868",category:"\u6F14\u8FDB\u4E2D",status:"100%",install(o){o.component(A.name,A)}};e.DChart=A,e.default=P,e.devuiChartProps=_,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
|