hamster-charts 0.4.5 → 0.4.7
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/hamster-charts.css +1 -1
- package/dist/hamster-charts.js +218 -194
- package/dist/hamster-charts.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/hamster-charts.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.h-panel[data-v-474190fc]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-header[data-v-b83cf769]{background-size:100% 100%;background-repeat:no-repeat;position:relative}.h-main[data-v-1025786b]{width:100%}.h-chart[data-v-ad5727b9]{background-size:100% 100%;background-repeat:no-repeat}.h-chart .chart[data-v-ad5727b9]{width:100%}.h-left[data-v-65e91535],.h-right[data-v-e897c957]{height:100%}.h-top[data-v-54014ba4],.h-bottom[data-v-086bec2a]{width:100%}.h-chart-title[data-v-
|
|
1
|
+
.h-panel[data-v-474190fc]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-header[data-v-b83cf769]{background-size:100% 100%;background-repeat:no-repeat;position:relative}.h-main[data-v-1025786b]{width:100%}.h-chart[data-v-ad5727b9]{background-size:100% 100%;background-repeat:no-repeat}.h-chart .chart[data-v-ad5727b9]{width:100%}.h-left[data-v-65e91535],.h-right[data-v-e897c957]{height:100%}.h-top[data-v-54014ba4],.h-bottom[data-v-086bec2a]{width:100%}.h-chart-title[data-v-5c9b16aa]{width:100%;background-size:100% 100%;background-repeat:no-repeat;position:relative}.h-item-chart[data-v-7c5da244]{background-size:100% 100%;background-repeat:no-repeat}[data-v-937cc59c]::-webkit-scrollbar{width:0px}[data-v-937cc59c]::-webkit-scrollbar-track{background:#31313181}[data-v-937cc59c]::-webkit-scrollbar-thumb{background:#444;border-radius:10px}[data-v-937cc59c]::-webkit-scrollbar-thumb:hover{background:#555}.h-list[data-v-937cc59c]{position:relative;overflow:hidden}.list-header[data-v-937cc59c]{display:flex;align-items:center;width:100%}.header-item[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;font-weight:700}.scroll-wrapper[data-v-937cc59c]{position:relative;width:100%;will-change:transform}.data-list[data-v-937cc59c]{width:100%}.data-list-item[data-v-937cc59c]{display:flex;transition:all .3s ease;border-bottom:1px solid rgba(255,255,255,.1)}.data-list-item[data-v-937cc59c]:hover{background:#ffffff0d}.data-item-cell[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;padding:8px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.h-view[data-v-2b1c3083]{background-size:100% 100%;background-repeat:no-repeat}.h-data-label[data-v-f0ce86db]{background-repeat:no-repeat;background-size:100% 100%}.h-button[data-v-0a183c56]{outline:none;background-repeat:no-repeat;background-size:100% 100%;border-radius:2px;border:none}.h-grid[data-v-34e7422b]{border:1px solid red}.h-grid .h-grid-item[data-v-34e7422b]{border:1px solid rebeccapurple}.h-counter[data-v-fba32a26]{display:flex;align-items:center}.counter-digit[data-v-fba32a26]{position:relative;overflow:hidden}.digit-scroll[data-v-fba32a26]{display:flex;flex-direction:column;will-change:transform}.digit-item[data-v-fba32a26]{flex-shrink:0}.h-layout[data-v-957ea318]{height:100%}.h-flex[data-v-c8c463ea]{background-size:100% 100%;background-repeat:no-repeat}
|
package/dist/hamster-charts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as h, openBlock as s, createElementBlock as u, normalizeStyle as c, unref as g, renderSlot as b, toDisplayString as I, createCommentVNode as j, ref as v, onMounted as it, onBeforeUnmount as at, watch as G, withDirectives as ut, createElementVNode as z, vShow as dt, Fragment as O, renderList as D } from "vue";
|
|
2
2
|
import * as rt from "echarts";
|
|
3
|
-
import { useDebounceFn as lt, useResizeObserver as
|
|
3
|
+
import { useDebounceFn as lt, useResizeObserver as ot } from "@vueuse/core";
|
|
4
4
|
const m = (e, t) => {
|
|
5
5
|
const i = e.__vccOpts || e;
|
|
6
6
|
for (const [r, l] of t)
|
|
@@ -23,13 +23,13 @@ const m = (e, t) => {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
let t = e, i =
|
|
26
|
+
let t = e, i = h(() => ({
|
|
27
27
|
position: t.position,
|
|
28
28
|
backgroundImage: t.url ? `url(${t.url})` : "none"
|
|
29
29
|
}));
|
|
30
|
-
return (r, l) => (
|
|
30
|
+
return (r, l) => (s(), u("div", {
|
|
31
31
|
class: "h-panel",
|
|
32
|
-
style: c(
|
|
32
|
+
style: c(g(i))
|
|
33
33
|
}, [
|
|
34
34
|
b(r.$slots, "default", {}, void 0, !0)
|
|
35
35
|
], 4));
|
|
@@ -91,11 +91,11 @@ const ft = {
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
setup(e) {
|
|
94
|
-
let t = e, i =
|
|
94
|
+
let t = e, i = h(() => ({
|
|
95
95
|
width: t.width,
|
|
96
96
|
height: t.height,
|
|
97
97
|
backgroundImage: `url( ${t.url})`
|
|
98
|
-
})), r =
|
|
98
|
+
})), r = h(() => ({
|
|
99
99
|
color: t.color,
|
|
100
100
|
fontSize: t.fontSize,
|
|
101
101
|
position: t.textPosition,
|
|
@@ -103,14 +103,14 @@ const ft = {
|
|
|
103
103
|
left: t.textLeft,
|
|
104
104
|
transform: t.textTransform
|
|
105
105
|
}));
|
|
106
|
-
return (l, S) => (
|
|
106
|
+
return (l, S) => (s(), u("div", {
|
|
107
107
|
class: "h-header",
|
|
108
|
-
style: c(
|
|
108
|
+
style: c(g(i))
|
|
109
109
|
}, [
|
|
110
|
-
|
|
110
|
+
g(t).showText ? (s(), u("span", {
|
|
111
111
|
key: 0,
|
|
112
|
-
style: c(
|
|
113
|
-
},
|
|
112
|
+
style: c(g(r))
|
|
113
|
+
}, I(g(t).text), 5)) : j("", !0),
|
|
114
114
|
b(l.$slots, "default", {}, void 0, !0)
|
|
115
115
|
], 4));
|
|
116
116
|
}
|
|
@@ -146,16 +146,16 @@ const yt = {
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
setup(e) {
|
|
149
|
-
let t = e, i =
|
|
149
|
+
let t = e, i = h(() => ({
|
|
150
150
|
height: t.height !== "auto" || t.height !== "0" ? `calc(100% - ${t.height})` : t.height,
|
|
151
151
|
display: t.display,
|
|
152
152
|
columnGap: t.columnGap,
|
|
153
153
|
rowGap: t.rowGap,
|
|
154
154
|
padding: t.padding
|
|
155
155
|
}));
|
|
156
|
-
return (r, l) => (
|
|
156
|
+
return (r, l) => (s(), u("div", {
|
|
157
157
|
class: "h-main",
|
|
158
|
-
style: c(
|
|
158
|
+
style: c(g(i))
|
|
159
159
|
}, [
|
|
160
160
|
b(r.$slots, "default", {}, void 0, !0)
|
|
161
161
|
], 4));
|
|
@@ -210,17 +210,17 @@ const mt = {
|
|
|
210
210
|
// 鼠标离开事件
|
|
211
211
|
],
|
|
212
212
|
setup(e, { expose: t, emit: i }) {
|
|
213
|
-
const r = i, l = e, S =
|
|
213
|
+
const r = i, l = e, S = h(() => ({
|
|
214
214
|
backgroundImage: l.url ? `url(${l.url})` : "none",
|
|
215
215
|
flex: l.flex,
|
|
216
216
|
height: l.height
|
|
217
|
-
})), x =
|
|
217
|
+
})), x = h(() => ({
|
|
218
218
|
height: l.chartsh !== "auto" && l.chartsh !== "0" ? `calc(100% - ${l.chartsh})` : l.chartsh
|
|
219
219
|
})), p = v(null);
|
|
220
220
|
let f = null;
|
|
221
|
-
const
|
|
221
|
+
const k = lt(() => {
|
|
222
222
|
f && (f.resize(), r("chart-resize", { instance: f }));
|
|
223
|
-
}, 100),
|
|
223
|
+
}, 100), C = () => {
|
|
224
224
|
if (!f) return;
|
|
225
225
|
["click", "dblclick", "mouseover", "mouseout"].forEach((a) => {
|
|
226
226
|
f.on(a, (d) => {
|
|
@@ -234,15 +234,15 @@ const mt = {
|
|
|
234
234
|
}, $ = () => {
|
|
235
235
|
if (A(), !!p.value)
|
|
236
236
|
try {
|
|
237
|
-
const n =
|
|
238
|
-
f = rt.init(p.value), f.setOption(n, { notMerge: !0 }),
|
|
237
|
+
const n = y(l.chartsOption);
|
|
238
|
+
f = rt.init(p.value), f.setOption(n, { notMerge: !0 }), C(), r("chart-ready", {
|
|
239
239
|
instance: f,
|
|
240
240
|
dom: p.value
|
|
241
241
|
});
|
|
242
242
|
} catch (n) {
|
|
243
243
|
console.error("ECharts initialization failed:", n);
|
|
244
244
|
}
|
|
245
|
-
},
|
|
245
|
+
}, y = (n) => {
|
|
246
246
|
if (!n || typeof n != "object")
|
|
247
247
|
return { series: [] };
|
|
248
248
|
const a = JSON.parse(JSON.stringify(n));
|
|
@@ -278,21 +278,21 @@ const mt = {
|
|
|
278
278
|
} : a.yAxis = { type: "value" } : a.yAxis = { type: "value" }, a.legend && (typeof a.legend == "object" && !Array.isArray(a.legend) || Array.isArray(a.legend) && (a.legend = {
|
|
279
279
|
data: a.legend
|
|
280
280
|
})), a;
|
|
281
|
-
},
|
|
282
|
-
|
|
281
|
+
}, o = () => {
|
|
282
|
+
k();
|
|
283
283
|
};
|
|
284
284
|
return it(() => {
|
|
285
285
|
setTimeout(() => {
|
|
286
286
|
$();
|
|
287
|
-
}, 0), window.addEventListener("resize",
|
|
288
|
-
|
|
287
|
+
}, 0), window.addEventListener("resize", o), ot(p, (n) => {
|
|
288
|
+
k();
|
|
289
289
|
});
|
|
290
290
|
}), at(() => {
|
|
291
|
-
window.removeEventListener("resize",
|
|
291
|
+
window.removeEventListener("resize", o), A();
|
|
292
292
|
}), G(() => l.chartsOption, (n, a) => {
|
|
293
293
|
if (n)
|
|
294
294
|
try {
|
|
295
|
-
const d =
|
|
295
|
+
const d = y(n);
|
|
296
296
|
if (!f) {
|
|
297
297
|
$();
|
|
298
298
|
return;
|
|
@@ -310,10 +310,10 @@ const mt = {
|
|
|
310
310
|
}, 0);
|
|
311
311
|
}), t({
|
|
312
312
|
getInstance: () => f,
|
|
313
|
-
resize: () =>
|
|
313
|
+
resize: () => k(),
|
|
314
314
|
dispatchAction: (n) => f == null ? void 0 : f.dispatchAction(n),
|
|
315
315
|
dispose: A
|
|
316
|
-
}), (n, a) => (
|
|
316
|
+
}), (n, a) => (s(), u("div", {
|
|
317
317
|
class: "h-chart",
|
|
318
318
|
style: c(S.value)
|
|
319
319
|
}, [
|
|
@@ -358,16 +358,16 @@ const xt = {
|
|
|
358
358
|
}
|
|
359
359
|
},
|
|
360
360
|
setup(e) {
|
|
361
|
-
let t = e, i =
|
|
361
|
+
let t = e, i = h(() => ({
|
|
362
362
|
width: t.width,
|
|
363
363
|
display: t.display,
|
|
364
364
|
flexDirection: t.flexDirection,
|
|
365
365
|
columnGap: t.columnGap,
|
|
366
366
|
rowGap: t.rowGap
|
|
367
367
|
}));
|
|
368
|
-
return (r, l) => (
|
|
368
|
+
return (r, l) => (s(), u("div", {
|
|
369
369
|
class: "h-left",
|
|
370
|
-
style: c(
|
|
370
|
+
style: c(g(i))
|
|
371
371
|
}, [
|
|
372
372
|
b(r.$slots, "default", {}, void 0, !0)
|
|
373
373
|
], 4));
|
|
@@ -402,16 +402,16 @@ const vt = {
|
|
|
402
402
|
}
|
|
403
403
|
},
|
|
404
404
|
setup(e) {
|
|
405
|
-
let t = e, i =
|
|
405
|
+
let t = e, i = h(() => ({
|
|
406
406
|
width: t.width,
|
|
407
407
|
display: t.display,
|
|
408
408
|
flexDirection: t.flexDirection,
|
|
409
409
|
columnGap: t.columnGap,
|
|
410
410
|
rowGap: t.rowGap
|
|
411
411
|
}));
|
|
412
|
-
return (r, l) => (
|
|
412
|
+
return (r, l) => (s(), u("div", {
|
|
413
413
|
class: "h-right",
|
|
414
|
-
style: c(
|
|
414
|
+
style: c(g(i))
|
|
415
415
|
}, [
|
|
416
416
|
b(r.$slots, "default", {}, void 0, !0)
|
|
417
417
|
], 4));
|
|
@@ -450,7 +450,7 @@ const wt = {
|
|
|
450
450
|
}
|
|
451
451
|
},
|
|
452
452
|
setup(e) {
|
|
453
|
-
let t = e, i =
|
|
453
|
+
let t = e, i = h(() => ({
|
|
454
454
|
width: t.width,
|
|
455
455
|
height: t.height,
|
|
456
456
|
display: t.display,
|
|
@@ -458,9 +458,9 @@ const wt = {
|
|
|
458
458
|
columnGap: t.columnGap,
|
|
459
459
|
rowGap: t.rowGap
|
|
460
460
|
}));
|
|
461
|
-
return (r, l) => (
|
|
461
|
+
return (r, l) => (s(), u("div", {
|
|
462
462
|
class: "h-center",
|
|
463
|
-
style: c(
|
|
463
|
+
style: c(g(i))
|
|
464
464
|
}, [
|
|
465
465
|
b(r.$slots, "default", {}, void 0, !0)
|
|
466
466
|
], 4));
|
|
@@ -487,14 +487,14 @@ const At = {
|
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
489
|
setup(e) {
|
|
490
|
-
let t = e, i =
|
|
490
|
+
let t = e, i = h(() => ({
|
|
491
491
|
height: t.height,
|
|
492
492
|
display: t.display,
|
|
493
493
|
position: t.position
|
|
494
494
|
}));
|
|
495
|
-
return (r, l) => (
|
|
495
|
+
return (r, l) => (s(), u("div", {
|
|
496
496
|
class: "h-top",
|
|
497
|
-
style: c(
|
|
497
|
+
style: c(g(i))
|
|
498
498
|
}, [
|
|
499
499
|
b(r.$slots, "default", {}, void 0, !0)
|
|
500
500
|
], 4));
|
|
@@ -529,16 +529,16 @@ const kt = {
|
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
531
|
setup(e) {
|
|
532
|
-
let t = e, i =
|
|
532
|
+
let t = e, i = h(() => ({
|
|
533
533
|
height: t.height,
|
|
534
534
|
display: t.display,
|
|
535
535
|
gap: t.gap,
|
|
536
536
|
rowGap: t.rowGap,
|
|
537
537
|
columnGap: t.columnGap
|
|
538
538
|
}));
|
|
539
|
-
return (r, l) => (
|
|
539
|
+
return (r, l) => (s(), u("div", {
|
|
540
540
|
class: "h-bottom",
|
|
541
|
-
style: c(
|
|
541
|
+
style: c(g(i))
|
|
542
542
|
}, [
|
|
543
543
|
b(r.$slots, "default", {}, void 0, !0)
|
|
544
544
|
], 4));
|
|
@@ -547,9 +547,9 @@ const kt = {
|
|
|
547
547
|
M.install = (e) => {
|
|
548
548
|
e.component(M.name, M);
|
|
549
549
|
};
|
|
550
|
-
const zt = {
|
|
550
|
+
const zt = { class: "def-text" }, Gt = {
|
|
551
551
|
name: "hChartTitle"
|
|
552
|
-
},
|
|
552
|
+
}, jt = /* @__PURE__ */ Object.assign(Gt, {
|
|
553
553
|
props: {
|
|
554
554
|
fontSize: {
|
|
555
555
|
type: String,
|
|
@@ -578,35 +578,44 @@ const zt = {
|
|
|
578
578
|
paddingBottom: {
|
|
579
579
|
type: String,
|
|
580
580
|
default: "auto"
|
|
581
|
+
},
|
|
582
|
+
color: {
|
|
583
|
+
type: String,
|
|
584
|
+
default: "#fff"
|
|
585
|
+
},
|
|
586
|
+
text: {
|
|
587
|
+
type: String,
|
|
588
|
+
default: "测试标题"
|
|
581
589
|
}
|
|
582
590
|
},
|
|
583
591
|
setup(e) {
|
|
584
|
-
let t = e, i =
|
|
592
|
+
let t = e, i = h(() => ({
|
|
585
593
|
height: t.height,
|
|
586
594
|
backgroundImage: `url(${t.url})`,
|
|
587
595
|
fontSize: t.fontSize,
|
|
588
596
|
paddingLeft: t.paddingLeft,
|
|
589
597
|
paddingRight: t.paddingRight,
|
|
590
598
|
paddingTop: t.paddingTop,
|
|
591
|
-
paddingBottom: t.paddingBottom
|
|
599
|
+
paddingBottom: t.paddingBottom,
|
|
600
|
+
color: t.color
|
|
592
601
|
}));
|
|
593
|
-
return (r, l) => (
|
|
602
|
+
return (r, l) => (s(), u("div", {
|
|
594
603
|
class: "h-chart-title",
|
|
595
|
-
style: c(
|
|
604
|
+
style: c(g(i))
|
|
596
605
|
}, [
|
|
597
|
-
|
|
598
|
-
b(r.$slots, "
|
|
606
|
+
z("span", zt, I(g(t).text), 1),
|
|
607
|
+
b(r.$slots, "diy", {}, void 0, !0)
|
|
599
608
|
], 4));
|
|
600
609
|
}
|
|
601
|
-
}), P = /* @__PURE__ */ m(
|
|
610
|
+
}), P = /* @__PURE__ */ m(jt, [["__scopeId", "data-v-5c9b16aa"]]);
|
|
602
611
|
P.install = (e) => {
|
|
603
612
|
e.component(P.name, P);
|
|
604
613
|
};
|
|
605
|
-
const
|
|
614
|
+
const Ot = {
|
|
606
615
|
name: "hItemChart",
|
|
607
616
|
chineseName: "独立图表",
|
|
608
617
|
description: "独立的 ECharts 图表容器组件,适用于大屏数据可视化展示"
|
|
609
|
-
},
|
|
618
|
+
}, Dt = /* @__PURE__ */ Object.assign(Ot, {
|
|
610
619
|
props: {
|
|
611
620
|
height: {
|
|
612
621
|
type: String,
|
|
@@ -631,39 +640,39 @@ const jt = {
|
|
|
631
640
|
"chart-mouseout"
|
|
632
641
|
],
|
|
633
642
|
setup(e, { expose: t, emit: i }) {
|
|
634
|
-
const r = i, l = e, S =
|
|
643
|
+
const r = i, l = e, S = h(() => ({
|
|
635
644
|
backgroundImage: l.url ? `url(${l.url})` : "none",
|
|
636
645
|
height: l.height
|
|
637
646
|
})), x = v(null);
|
|
638
647
|
let p = null;
|
|
639
648
|
const f = lt(() => {
|
|
640
649
|
p && (p.resize(), r("chart-resize", { instance: p }));
|
|
641
|
-
}, 100),
|
|
650
|
+
}, 100), k = () => {
|
|
642
651
|
if (!p) return;
|
|
643
652
|
["click", "dblclick", "mouseover", "mouseout"].forEach((n) => {
|
|
644
653
|
p.on(n, (a) => {
|
|
645
654
|
r(`chart-${n}`, a);
|
|
646
655
|
});
|
|
647
656
|
});
|
|
648
|
-
},
|
|
657
|
+
}, C = () => {
|
|
649
658
|
p && (["click", "dblclick", "mouseover", "mouseout"].forEach((n) => {
|
|
650
659
|
p.off(n);
|
|
651
660
|
}), p.dispose(), p = null);
|
|
652
661
|
}, A = () => {
|
|
653
|
-
if (
|
|
662
|
+
if (C(), !!x.value)
|
|
654
663
|
try {
|
|
655
|
-
const
|
|
656
|
-
p = rt.init(x.value), p.setOption(
|
|
664
|
+
const o = $(l.chartsOption);
|
|
665
|
+
p = rt.init(x.value), p.setOption(o, { notMerge: !0 }), k(), r("chart-ready", {
|
|
657
666
|
instance: p,
|
|
658
667
|
dom: x.value
|
|
659
668
|
});
|
|
660
|
-
} catch (
|
|
661
|
-
console.error("ECharts initialization failed:",
|
|
669
|
+
} catch (o) {
|
|
670
|
+
console.error("ECharts initialization failed:", o);
|
|
662
671
|
}
|
|
663
|
-
}, $ = (
|
|
664
|
-
if (!
|
|
672
|
+
}, $ = (o) => {
|
|
673
|
+
if (!o || typeof o != "object")
|
|
665
674
|
return { series: [] };
|
|
666
|
-
const n = JSON.parse(JSON.stringify(
|
|
675
|
+
const n = JSON.parse(JSON.stringify(o));
|
|
667
676
|
return n.series ? Array.isArray(n.series) || (n.series = [n.series]) : n.series = [], n.series = n.series.map((a) => {
|
|
668
677
|
if (!a || typeof a != "object")
|
|
669
678
|
return { type: "line" };
|
|
@@ -695,25 +704,25 @@ const jt = {
|
|
|
695
704
|
} : n.yAxis = { type: "value" } : n.yAxis = { type: "value" }, n.legend && (typeof n.legend == "object" && !Array.isArray(n.legend) || Array.isArray(n.legend) && (n.legend = {
|
|
696
705
|
data: n.legend
|
|
697
706
|
})), n;
|
|
698
|
-
},
|
|
707
|
+
}, y = () => {
|
|
699
708
|
f();
|
|
700
709
|
};
|
|
701
710
|
return it(() => {
|
|
702
711
|
setTimeout(() => {
|
|
703
712
|
A();
|
|
704
|
-
}, 0), window.addEventListener("resize",
|
|
713
|
+
}, 0), window.addEventListener("resize", y), ot(x, (o) => {
|
|
705
714
|
f();
|
|
706
715
|
});
|
|
707
716
|
}), at(() => {
|
|
708
|
-
window.removeEventListener("resize",
|
|
709
|
-
}), G(() => l.chartsOption, (
|
|
710
|
-
if (
|
|
717
|
+
window.removeEventListener("resize", y), C();
|
|
718
|
+
}), G(() => l.chartsOption, (o) => {
|
|
719
|
+
if (o)
|
|
711
720
|
try {
|
|
712
721
|
if (!p) {
|
|
713
722
|
A();
|
|
714
723
|
return;
|
|
715
724
|
}
|
|
716
|
-
const n = $(
|
|
725
|
+
const n = $(o);
|
|
717
726
|
p.setOption(n, { notMerge: !0 }), r("chart-update", {
|
|
718
727
|
instance: p,
|
|
719
728
|
option: n
|
|
@@ -724,24 +733,24 @@ const jt = {
|
|
|
724
733
|
}, { deep: !0 }), t({
|
|
725
734
|
getInstance: () => p,
|
|
726
735
|
resize: () => f(),
|
|
727
|
-
dispatchAction: (
|
|
728
|
-
dispose:
|
|
729
|
-
}), (
|
|
736
|
+
dispatchAction: (o) => p == null ? void 0 : p.dispatchAction(o),
|
|
737
|
+
dispose: C
|
|
738
|
+
}), (o, n) => (s(), u("div", {
|
|
730
739
|
class: "h-item-chart",
|
|
731
740
|
ref_key: "itemCharts",
|
|
732
741
|
ref: x,
|
|
733
742
|
style: c(S.value)
|
|
734
743
|
}, null, 4));
|
|
735
744
|
}
|
|
736
|
-
}), V = /* @__PURE__ */ m(
|
|
745
|
+
}), V = /* @__PURE__ */ m(Dt, [["__scopeId", "data-v-7c5da244"]]);
|
|
737
746
|
V.install = (e) => {
|
|
738
747
|
e.component(V.name, V);
|
|
739
748
|
};
|
|
740
|
-
const
|
|
749
|
+
const Nt = {
|
|
741
750
|
name: "hList",
|
|
742
751
|
chineseName: "滚动列表",
|
|
743
752
|
description: "支持自动滚动的数据列表组件,适用于大屏数据展示"
|
|
744
|
-
},
|
|
753
|
+
}, Tt = /* @__PURE__ */ Object.assign(Nt, {
|
|
745
754
|
props: {
|
|
746
755
|
// 容器样式
|
|
747
756
|
width: {
|
|
@@ -803,13 +812,13 @@ const Dt = {
|
|
|
803
812
|
}
|
|
804
813
|
},
|
|
805
814
|
setup(e, { expose: t }) {
|
|
806
|
-
const i = e, r = v(0), l = v(null), S = v(0), x = v([]), p = v(null), f =
|
|
815
|
+
const i = e, r = v(0), l = v(null), S = v(0), x = v([]), p = v(null), f = h(() => ({
|
|
807
816
|
width: i.width,
|
|
808
817
|
height: i.height,
|
|
809
818
|
backgroundColor: i.backgroundColor,
|
|
810
819
|
position: "relative",
|
|
811
820
|
overflow: "hidden"
|
|
812
|
-
})),
|
|
821
|
+
})), k = h(() => ({
|
|
813
822
|
height: i.headerHeight,
|
|
814
823
|
display: "flex",
|
|
815
824
|
alignItems: "center",
|
|
@@ -819,7 +828,7 @@ const Dt = {
|
|
|
819
828
|
left: 0,
|
|
820
829
|
zIndex: 10,
|
|
821
830
|
width: "100%"
|
|
822
|
-
})),
|
|
831
|
+
})), C = h(() => ({
|
|
823
832
|
transform: `translateY(-${r.value * S.value}px)`,
|
|
824
833
|
transition: `transform ${i.scrollSpeed}ms ease-in-out`,
|
|
825
834
|
marginTop: i.showHeader ? i.headerHeight : "0"
|
|
@@ -831,57 +840,57 @@ const Dt = {
|
|
|
831
840
|
}
|
|
832
841
|
});
|
|
833
842
|
let $ = null;
|
|
834
|
-
const
|
|
843
|
+
const y = () => {
|
|
835
844
|
!i.enableScroll || i.data.length === 0 || (clearInterval($), $ = setInterval(() => {
|
|
836
845
|
r.value = (r.value + 1) % i.data.length;
|
|
837
846
|
}, i.scrollDuration));
|
|
838
|
-
},
|
|
847
|
+
}, o = () => {
|
|
839
848
|
$ && (clearInterval($), $ = null);
|
|
840
849
|
}, n = () => {
|
|
841
850
|
x.value && x.value[0] && (S.value = x.value[0].offsetHeight || 40);
|
|
842
851
|
};
|
|
843
852
|
return it(() => {
|
|
844
|
-
n(),
|
|
853
|
+
n(), y(), window.addEventListener("resize", n);
|
|
845
854
|
}), at(() => {
|
|
846
|
-
|
|
855
|
+
o(), window.removeEventListener("resize", n);
|
|
847
856
|
}), G(() => i.data, (a) => {
|
|
848
857
|
a.length > 0 ? (r.value = 0, l.value = null, setTimeout(() => {
|
|
849
|
-
n(),
|
|
850
|
-
}, 100)) :
|
|
858
|
+
n(), y();
|
|
859
|
+
}, 100)) : o();
|
|
851
860
|
}, { deep: !0 }), G(() => i.enableScroll, (a) => {
|
|
852
|
-
a ?
|
|
861
|
+
a ? y() : (o(), r.value = 0);
|
|
853
862
|
}), t({
|
|
854
|
-
startScroll:
|
|
855
|
-
stopScroll:
|
|
863
|
+
startScroll: y,
|
|
864
|
+
stopScroll: o,
|
|
856
865
|
getCurrentIndex: () => r.value,
|
|
857
866
|
scrollTo: (a) => {
|
|
858
867
|
a >= 0 && a < i.data.length && (r.value = a);
|
|
859
868
|
}
|
|
860
|
-
}), (a, d) => (
|
|
869
|
+
}), (a, d) => (s(), u("div", {
|
|
861
870
|
class: "h-list",
|
|
862
871
|
style: c(f.value)
|
|
863
872
|
}, [
|
|
864
|
-
e.showHeader ? (
|
|
873
|
+
e.showHeader ? (s(), u("div", {
|
|
865
874
|
key: 0,
|
|
866
875
|
class: "list-header",
|
|
867
|
-
style: c(
|
|
876
|
+
style: c(k.value)
|
|
868
877
|
}, [
|
|
869
|
-
(
|
|
878
|
+
(s(!0), u(O, null, D(e.header, (_, w) => (s(), u("p", {
|
|
870
879
|
key: w,
|
|
871
880
|
class: "header-item"
|
|
872
|
-
},
|
|
881
|
+
}, I(_), 1))), 128))
|
|
873
882
|
], 4)) : j("", !0),
|
|
874
|
-
e.enableScroll ? (
|
|
883
|
+
e.enableScroll ? (s(), u("div", {
|
|
875
884
|
key: 1,
|
|
876
885
|
class: "scroll-wrapper",
|
|
877
|
-
style: c(
|
|
886
|
+
style: c(C.value)
|
|
878
887
|
}, [
|
|
879
888
|
z("div", {
|
|
880
889
|
class: "data-list",
|
|
881
890
|
ref_key: "listContainer",
|
|
882
891
|
ref: p
|
|
883
892
|
}, [
|
|
884
|
-
(
|
|
893
|
+
(s(!0), u(O, null, D(e.data, (_, w) => (s(), u("div", {
|
|
885
894
|
key: w,
|
|
886
895
|
class: "data-list-item",
|
|
887
896
|
style: c(A(w)),
|
|
@@ -889,30 +898,30 @@ const Dt = {
|
|
|
889
898
|
ref_key: "listItems",
|
|
890
899
|
ref: x
|
|
891
900
|
}, [
|
|
892
|
-
(
|
|
901
|
+
(s(!0), u(O, null, D(_, (nt, N) => (s(), u("p", {
|
|
893
902
|
key: N,
|
|
894
903
|
class: "data-item-cell"
|
|
895
|
-
},
|
|
904
|
+
}, I(nt), 1))), 128))
|
|
896
905
|
], 4))), 128))
|
|
897
906
|
], 512)
|
|
898
907
|
], 4)) : j("", !0)
|
|
899
908
|
], 4));
|
|
900
909
|
}
|
|
901
|
-
}), Y = /* @__PURE__ */ m(
|
|
910
|
+
}), Y = /* @__PURE__ */ m(Tt, [["__scopeId", "data-v-937cc59c"]]);
|
|
902
911
|
Y.install = (e) => {
|
|
903
912
|
e.component(Y.name, Y);
|
|
904
913
|
};
|
|
905
|
-
const
|
|
914
|
+
const Wt = {
|
|
906
915
|
name: "hView"
|
|
907
|
-
},
|
|
916
|
+
}, Bt = /* @__PURE__ */ Object.assign(Wt, {
|
|
908
917
|
props: {
|
|
909
918
|
height: {
|
|
910
919
|
type: String,
|
|
911
|
-
default: "
|
|
920
|
+
default: "200px"
|
|
912
921
|
},
|
|
913
922
|
width: {
|
|
914
923
|
type: String,
|
|
915
|
-
default: "
|
|
924
|
+
default: "100%"
|
|
916
925
|
},
|
|
917
926
|
display: {
|
|
918
927
|
type: String,
|
|
@@ -933,32 +942,47 @@ const Tt = {
|
|
|
933
942
|
flex: {
|
|
934
943
|
type: String,
|
|
935
944
|
default: "0.2"
|
|
945
|
+
},
|
|
946
|
+
position: {
|
|
947
|
+
type: String,
|
|
948
|
+
default: "relative"
|
|
949
|
+
},
|
|
950
|
+
top: {
|
|
951
|
+
type: String,
|
|
952
|
+
default: "auto"
|
|
953
|
+
},
|
|
954
|
+
left: {
|
|
955
|
+
type: String,
|
|
956
|
+
default: "auto"
|
|
936
957
|
}
|
|
937
958
|
},
|
|
938
959
|
setup(e) {
|
|
939
|
-
let t = e, i =
|
|
960
|
+
let t = e, i = h(() => ({
|
|
940
961
|
width: t.width,
|
|
941
962
|
height: t.height,
|
|
942
963
|
display: t.display,
|
|
943
964
|
flexDirection: t.flexDirection,
|
|
944
965
|
rowGap: t.rowGap,
|
|
945
966
|
columnGap: t.columnGap,
|
|
946
|
-
flex: t.flex
|
|
967
|
+
flex: t.flex,
|
|
968
|
+
position: t.position,
|
|
969
|
+
top: t.top,
|
|
970
|
+
left: t.left
|
|
947
971
|
}));
|
|
948
|
-
return (r, l) => (
|
|
972
|
+
return (r, l) => (s(), u("div", {
|
|
949
973
|
class: "h-view",
|
|
950
|
-
style: c(
|
|
974
|
+
style: c(g(i))
|
|
951
975
|
}, [
|
|
952
976
|
b(r.$slots, "default", {}, void 0, !0)
|
|
953
977
|
], 4));
|
|
954
978
|
}
|
|
955
|
-
}), J = /* @__PURE__ */ m(
|
|
979
|
+
}), J = /* @__PURE__ */ m(Bt, [["__scopeId", "data-v-2b1c3083"]]);
|
|
956
980
|
J.install = (e) => {
|
|
957
981
|
e.component(J.name, J);
|
|
958
982
|
};
|
|
959
|
-
const
|
|
983
|
+
const Ft = {
|
|
960
984
|
name: "hDataLabel"
|
|
961
|
-
},
|
|
985
|
+
}, Ht = /* @__PURE__ */ Object.assign(Ft, {
|
|
962
986
|
props: {
|
|
963
987
|
url: {
|
|
964
988
|
type: String,
|
|
@@ -1121,34 +1145,34 @@ const Bt = {
|
|
|
1121
1145
|
lineHeight: t.titlelineHeight,
|
|
1122
1146
|
textAlign: t.titletextAlign
|
|
1123
1147
|
});
|
|
1124
|
-
return (x, p) => (
|
|
1148
|
+
return (x, p) => (s(), u("div", {
|
|
1125
1149
|
class: "h-data-label",
|
|
1126
|
-
style: c(
|
|
1150
|
+
style: c(g(i))
|
|
1127
1151
|
}, [
|
|
1128
|
-
e.show ? (
|
|
1152
|
+
e.show ? (s(), u("span", {
|
|
1129
1153
|
key: 0,
|
|
1130
1154
|
class: "h-data-label-num",
|
|
1131
|
-
style: c(
|
|
1132
|
-
},
|
|
1133
|
-
e.show ? (
|
|
1155
|
+
style: c(g(r))
|
|
1156
|
+
}, I(e.num), 5)) : j("", !0),
|
|
1157
|
+
e.show ? (s(), u("span", {
|
|
1134
1158
|
key: 1,
|
|
1135
1159
|
class: "h-data-label-text",
|
|
1136
|
-
style: c(
|
|
1137
|
-
},
|
|
1138
|
-
e.titleShow ? (
|
|
1160
|
+
style: c(g(l))
|
|
1161
|
+
}, I(e.text), 5)) : j("", !0),
|
|
1162
|
+
e.titleShow ? (s(), u("span", {
|
|
1139
1163
|
key: 2,
|
|
1140
1164
|
class: "h-data-label-title",
|
|
1141
|
-
style: c(
|
|
1142
|
-
},
|
|
1165
|
+
style: c(g(S))
|
|
1166
|
+
}, I(e.someText), 5)) : j("", !0)
|
|
1143
1167
|
], 4));
|
|
1144
1168
|
}
|
|
1145
|
-
}), q = /* @__PURE__ */ m(
|
|
1169
|
+
}), q = /* @__PURE__ */ m(Ht, [["__scopeId", "data-v-f0ce86db"]]);
|
|
1146
1170
|
q.install = (e) => {
|
|
1147
1171
|
e.component(q.name, q);
|
|
1148
1172
|
};
|
|
1149
|
-
const
|
|
1173
|
+
const Lt = {
|
|
1150
1174
|
name: "hButton"
|
|
1151
|
-
},
|
|
1175
|
+
}, Et = /* @__PURE__ */ Object.assign(Lt, {
|
|
1152
1176
|
props: {
|
|
1153
1177
|
url: {
|
|
1154
1178
|
type: String,
|
|
@@ -1199,18 +1223,18 @@ const Ht = {
|
|
|
1199
1223
|
fontWeight: t.fontWeight,
|
|
1200
1224
|
color: t.color
|
|
1201
1225
|
});
|
|
1202
|
-
return (r, l) => (
|
|
1226
|
+
return (r, l) => (s(), u("button", {
|
|
1203
1227
|
class: "h-button",
|
|
1204
|
-
style: c(
|
|
1205
|
-
},
|
|
1228
|
+
style: c(g(i))
|
|
1229
|
+
}, I(g(t).text), 5));
|
|
1206
1230
|
}
|
|
1207
|
-
}), U = /* @__PURE__ */ m(
|
|
1231
|
+
}), U = /* @__PURE__ */ m(Et, [["__scopeId", "data-v-0a183c56"]]);
|
|
1208
1232
|
U.install = (e) => {
|
|
1209
1233
|
e.component(U.name, U);
|
|
1210
1234
|
};
|
|
1211
|
-
const
|
|
1235
|
+
const Rt = {
|
|
1212
1236
|
name: "hGrid"
|
|
1213
|
-
},
|
|
1237
|
+
}, Mt = /* @__PURE__ */ Object.assign(Rt, {
|
|
1214
1238
|
props: {
|
|
1215
1239
|
width: {
|
|
1216
1240
|
type: String,
|
|
@@ -1265,14 +1289,14 @@ const Et = {
|
|
|
1265
1289
|
height: t.iheight,
|
|
1266
1290
|
display: t.idisplay
|
|
1267
1291
|
});
|
|
1268
|
-
return (l, S) => (
|
|
1292
|
+
return (l, S) => (s(), u("div", {
|
|
1269
1293
|
class: "h-grid",
|
|
1270
|
-
style: c(
|
|
1294
|
+
style: c(g(i))
|
|
1271
1295
|
}, [
|
|
1272
|
-
(
|
|
1296
|
+
(s(), u(O, null, D(6, (x) => z("div", {
|
|
1273
1297
|
key: x,
|
|
1274
1298
|
class: "h-grid-item",
|
|
1275
|
-
style: c(
|
|
1299
|
+
style: c(g(r))
|
|
1276
1300
|
}, S[0] || (S[0] = [
|
|
1277
1301
|
z("div", { class: "h-grid-item-left" }, [
|
|
1278
1302
|
z("img", {
|
|
@@ -1285,15 +1309,15 @@ const Et = {
|
|
|
1285
1309
|
b(l.$slots, "default", {}, void 0, !0)
|
|
1286
1310
|
], 4));
|
|
1287
1311
|
}
|
|
1288
|
-
}), K = /* @__PURE__ */ m(
|
|
1312
|
+
}), K = /* @__PURE__ */ m(Mt, [["__scopeId", "data-v-34e7422b"]]);
|
|
1289
1313
|
K.install = (e) => {
|
|
1290
1314
|
e.component(K.name, K);
|
|
1291
1315
|
};
|
|
1292
|
-
const
|
|
1316
|
+
const Pt = {
|
|
1293
1317
|
name: "hCounter",
|
|
1294
1318
|
chineseName: "数字计数器",
|
|
1295
1319
|
description: "支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"
|
|
1296
|
-
},
|
|
1320
|
+
}, Vt = /* @__PURE__ */ Object.assign(Pt, {
|
|
1297
1321
|
props: {
|
|
1298
1322
|
// 数据相关
|
|
1299
1323
|
data: {
|
|
@@ -1433,49 +1457,49 @@ const Mt = {
|
|
|
1433
1457
|
}
|
|
1434
1458
|
},
|
|
1435
1459
|
setup(e, { expose: t }) {
|
|
1436
|
-
const i = e, r = v([]), l = v(!1), S =
|
|
1437
|
-
let
|
|
1438
|
-
i.decimalPlaces >= 0 && typeof
|
|
1439
|
-
let
|
|
1460
|
+
const i = e, r = v([]), l = v(!1), S = h(() => {
|
|
1461
|
+
let y = i.data;
|
|
1462
|
+
i.decimalPlaces >= 0 && typeof y == "number" && (y = y.toFixed(i.decimalPlaces));
|
|
1463
|
+
let o = String(y);
|
|
1440
1464
|
if (i.showSeparator && typeof i.data == "number") {
|
|
1441
|
-
const n =
|
|
1442
|
-
n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, i.separator),
|
|
1465
|
+
const n = o.split(".");
|
|
1466
|
+
n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, i.separator), o = n.join(".");
|
|
1443
1467
|
}
|
|
1444
|
-
return i.prefix && (
|
|
1445
|
-
}), x =
|
|
1468
|
+
return i.prefix && (o = i.prefix + o), i.suffix && (o = o + i.suffix), o.split("");
|
|
1469
|
+
}), x = h(() => i.digitWidth ? i.digitWidth : `${(parseInt(i.digitFontSize) || 32) * 1.2}px`), p = h(() => i.digitHeight ? i.digitHeight : `${(parseInt(i.digitFontSize) || 32) * 1.5}px`), f = () => {
|
|
1446
1470
|
if (!i.enableAnimation) {
|
|
1447
1471
|
r.value = S.value.map(() => 0);
|
|
1448
1472
|
return;
|
|
1449
1473
|
}
|
|
1450
1474
|
l.value = !0, r.value = S.value.map(() => 0);
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
if (isNaN(parseInt(
|
|
1454
|
-
r.value[n] =
|
|
1475
|
+
const y = S.value;
|
|
1476
|
+
y.forEach((o, n) => {
|
|
1477
|
+
if (isNaN(parseInt(o))) {
|
|
1478
|
+
r.value[n] = o;
|
|
1455
1479
|
return;
|
|
1456
1480
|
}
|
|
1457
|
-
const a = parseInt(
|
|
1481
|
+
const a = parseInt(o), d = n * i.digitDelay, _ = i.animationDuration;
|
|
1458
1482
|
setTimeout(() => {
|
|
1459
1483
|
let w = 0;
|
|
1460
1484
|
const nt = _ / (a + 1), N = () => {
|
|
1461
|
-
w <= a && (r.value[n] = w, w++, w <= a ? setTimeout(N, nt) : (n ===
|
|
1485
|
+
w <= a && (r.value[n] = w, w++, w <= a ? setTimeout(N, nt) : (n === y.length - 1 || y.slice(n + 1).every((st) => isNaN(parseInt(st)))) && (l.value = !1));
|
|
1462
1486
|
};
|
|
1463
1487
|
N();
|
|
1464
1488
|
}, d);
|
|
1465
1489
|
});
|
|
1466
|
-
},
|
|
1467
|
-
const
|
|
1468
|
-
if (isNaN(parseInt(
|
|
1490
|
+
}, k = (y) => {
|
|
1491
|
+
const o = r.value[y];
|
|
1492
|
+
if (isNaN(parseInt(o)))
|
|
1469
1493
|
return {
|
|
1470
1494
|
transform: "translateY(0)",
|
|
1471
1495
|
transition: "none"
|
|
1472
1496
|
};
|
|
1473
1497
|
const n = parseInt(p.value) || 60;
|
|
1474
1498
|
return {
|
|
1475
|
-
transform: `translateY(${-parseInt(
|
|
1499
|
+
transform: `translateY(${-parseInt(o) * n}px)`,
|
|
1476
1500
|
transition: `transform ${i.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`
|
|
1477
1501
|
};
|
|
1478
|
-
},
|
|
1502
|
+
}, C = h(() => ({
|
|
1479
1503
|
width: i.width,
|
|
1480
1504
|
height: i.height,
|
|
1481
1505
|
backgroundColor: i.backgroundColor,
|
|
@@ -1491,14 +1515,14 @@ const Mt = {
|
|
|
1491
1515
|
bottom: i.bottom || void 0,
|
|
1492
1516
|
zIndex: i.zIndex,
|
|
1493
1517
|
transform: i.transform || void 0
|
|
1494
|
-
})), A =
|
|
1518
|
+
})), A = h(() => ({
|
|
1495
1519
|
width: x.value,
|
|
1496
1520
|
height: p.value,
|
|
1497
1521
|
overflow: "hidden",
|
|
1498
1522
|
position: "relative",
|
|
1499
1523
|
borderRadius: i.digitBorderRadius,
|
|
1500
1524
|
backgroundColor: i.digitBackgroundColor
|
|
1501
|
-
})), $ =
|
|
1525
|
+
})), $ = h(() => ({
|
|
1502
1526
|
width: "100%",
|
|
1503
1527
|
height: p.value,
|
|
1504
1528
|
color: i.digitColor,
|
|
@@ -1518,36 +1542,36 @@ const Mt = {
|
|
|
1518
1542
|
}), t({
|
|
1519
1543
|
restart: f,
|
|
1520
1544
|
getCurrentValue: () => r.value.join("")
|
|
1521
|
-
}), (
|
|
1545
|
+
}), (y, o) => (s(), u("div", {
|
|
1522
1546
|
class: "h-counter",
|
|
1523
|
-
style: c(
|
|
1547
|
+
style: c(C.value)
|
|
1524
1548
|
}, [
|
|
1525
|
-
(
|
|
1549
|
+
(s(!0), u(O, null, D(S.value, (n, a) => (s(), u("div", {
|
|
1526
1550
|
key: a,
|
|
1527
1551
|
class: "counter-digit",
|
|
1528
1552
|
style: c(A.value)
|
|
1529
1553
|
}, [
|
|
1530
1554
|
z("div", {
|
|
1531
1555
|
class: "digit-scroll",
|
|
1532
|
-
style: c(
|
|
1556
|
+
style: c(k(a))
|
|
1533
1557
|
}, [
|
|
1534
|
-
(
|
|
1558
|
+
(s(), u(O, null, D(10, (d) => z("div", {
|
|
1535
1559
|
key: d - 1,
|
|
1536
1560
|
class: "digit-item",
|
|
1537
1561
|
style: c($.value)
|
|
1538
|
-
},
|
|
1562
|
+
}, I(d - 1), 5)), 64))
|
|
1539
1563
|
], 4)
|
|
1540
1564
|
], 4))), 128)),
|
|
1541
|
-
b(
|
|
1565
|
+
b(y.$slots, "default", {}, void 0, !0)
|
|
1542
1566
|
], 4));
|
|
1543
1567
|
}
|
|
1544
|
-
}), Q = /* @__PURE__ */ m(
|
|
1568
|
+
}), Q = /* @__PURE__ */ m(Vt, [["__scopeId", "data-v-fba32a26"]]);
|
|
1545
1569
|
Q.install = (e) => {
|
|
1546
1570
|
e.component(Q.name, Q);
|
|
1547
1571
|
};
|
|
1548
|
-
const
|
|
1572
|
+
const Yt = {
|
|
1549
1573
|
name: "hButtonGroup"
|
|
1550
|
-
},
|
|
1574
|
+
}, Jt = /* @__PURE__ */ Object.assign(Yt, {
|
|
1551
1575
|
props: {
|
|
1552
1576
|
width: {
|
|
1553
1577
|
type: String,
|
|
@@ -1607,22 +1631,22 @@ const Vt = {
|
|
|
1607
1631
|
columnGap: t.columnGap,
|
|
1608
1632
|
flexWrap: t.flexWrap
|
|
1609
1633
|
});
|
|
1610
|
-
return (r, l) => (
|
|
1634
|
+
return (r, l) => (s(), u("div", {
|
|
1611
1635
|
class: "h-button-group",
|
|
1612
|
-
style: c(
|
|
1636
|
+
style: c(g(i))
|
|
1613
1637
|
}, [
|
|
1614
1638
|
b(r.$slots, "default", {}, void 0, !0)
|
|
1615
1639
|
], 4));
|
|
1616
1640
|
}
|
|
1617
|
-
}), X = /* @__PURE__ */ m(
|
|
1641
|
+
}), X = /* @__PURE__ */ m(Jt, [["__scopeId", "data-v-7bf905ff"]]);
|
|
1618
1642
|
X.install = (e) => {
|
|
1619
1643
|
e.component(X.name, X);
|
|
1620
1644
|
};
|
|
1621
|
-
const
|
|
1645
|
+
const qt = { class: "h-text" }, Ut = {
|
|
1622
1646
|
name: "hText",
|
|
1623
1647
|
chineseName: "文本",
|
|
1624
1648
|
description: "用于显示文本内容"
|
|
1625
|
-
},
|
|
1649
|
+
}, Kt = /* @__PURE__ */ Object.assign(Ut, {
|
|
1626
1650
|
props: {
|
|
1627
1651
|
text: {
|
|
1628
1652
|
type: String,
|
|
@@ -1639,17 +1663,17 @@ const Jt = { class: "h-text" }, qt = {
|
|
|
1639
1663
|
},
|
|
1640
1664
|
setup(e) {
|
|
1641
1665
|
let t = e;
|
|
1642
|
-
return (i, r) => (
|
|
1666
|
+
return (i, r) => (s(), u("span", qt, I(g(t).text), 1));
|
|
1643
1667
|
}
|
|
1644
|
-
}), Z = /* @__PURE__ */ m(
|
|
1668
|
+
}), Z = /* @__PURE__ */ m(Kt, [["__scopeId", "data-v-bc52bf83"]]);
|
|
1645
1669
|
Z.install = (e) => {
|
|
1646
1670
|
e.component(Z.name, Z);
|
|
1647
1671
|
};
|
|
1648
|
-
const
|
|
1672
|
+
const Qt = {
|
|
1649
1673
|
name: "hLayout",
|
|
1650
1674
|
chineseName: "布局",
|
|
1651
1675
|
description: "页面布局容器"
|
|
1652
|
-
},
|
|
1676
|
+
}, Xt = /* @__PURE__ */ Object.assign(Qt, {
|
|
1653
1677
|
props: {
|
|
1654
1678
|
width: {
|
|
1655
1679
|
type: String,
|
|
@@ -1677,7 +1701,7 @@ const Kt = {
|
|
|
1677
1701
|
}
|
|
1678
1702
|
},
|
|
1679
1703
|
setup(e) {
|
|
1680
|
-
let t = e, i =
|
|
1704
|
+
let t = e, i = h(() => ({
|
|
1681
1705
|
width: t.width,
|
|
1682
1706
|
height: t.height,
|
|
1683
1707
|
display: t.display,
|
|
@@ -1685,20 +1709,20 @@ const Kt = {
|
|
|
1685
1709
|
columnGap: t.columnGap,
|
|
1686
1710
|
rowGap: t.rowGap
|
|
1687
1711
|
}));
|
|
1688
|
-
return (r, l) => (
|
|
1712
|
+
return (r, l) => (s(), u("div", {
|
|
1689
1713
|
class: "h-layout",
|
|
1690
|
-
style: c(
|
|
1714
|
+
style: c(g(i))
|
|
1691
1715
|
}, [
|
|
1692
1716
|
b(r.$slots, "default", {}, void 0, !0)
|
|
1693
1717
|
], 4));
|
|
1694
1718
|
}
|
|
1695
|
-
}), tt = /* @__PURE__ */ m(
|
|
1719
|
+
}), tt = /* @__PURE__ */ m(Xt, [["__scopeId", "data-v-957ea318"]]);
|
|
1696
1720
|
tt.install = (e) => {
|
|
1697
1721
|
e.component(tt.name, tt);
|
|
1698
1722
|
};
|
|
1699
|
-
const
|
|
1723
|
+
const Zt = {
|
|
1700
1724
|
name: "hFlex"
|
|
1701
|
-
},
|
|
1725
|
+
}, te = /* @__PURE__ */ Object.assign(Zt, {
|
|
1702
1726
|
props: {
|
|
1703
1727
|
width: {
|
|
1704
1728
|
type: String,
|
|
@@ -1734,7 +1758,7 @@ const Xt = {
|
|
|
1734
1758
|
}
|
|
1735
1759
|
},
|
|
1736
1760
|
setup(e) {
|
|
1737
|
-
let t = e, i =
|
|
1761
|
+
let t = e, i = h(() => ({
|
|
1738
1762
|
display: t.display,
|
|
1739
1763
|
width: t.width,
|
|
1740
1764
|
height: t.height,
|
|
@@ -1744,24 +1768,24 @@ const Xt = {
|
|
|
1744
1768
|
flexDirection: t.flexDirection,
|
|
1745
1769
|
flexWrap: t.flexWrap
|
|
1746
1770
|
}));
|
|
1747
|
-
return (r, l) => (
|
|
1771
|
+
return (r, l) => (s(), u("div", {
|
|
1748
1772
|
class: "h-flex",
|
|
1749
|
-
style: c(
|
|
1773
|
+
style: c(g(i))
|
|
1750
1774
|
}, [
|
|
1751
1775
|
b(r.$slots, "default", {}, void 0, !0)
|
|
1752
1776
|
], 4));
|
|
1753
1777
|
}
|
|
1754
|
-
}), et = /* @__PURE__ */ m(
|
|
1778
|
+
}), et = /* @__PURE__ */ m(te, [["__scopeId", "data-v-c8c463ea"]]);
|
|
1755
1779
|
et.install = (e) => {
|
|
1756
1780
|
e.component(et.name, et);
|
|
1757
1781
|
};
|
|
1758
|
-
const
|
|
1782
|
+
const ee = (e) => {
|
|
1759
1783
|
e.use(T), e.use(W), e.use(tt), e.use(B), e.use(F), e.use(H), e.use(L), e.use(E), e.use(R), e.use(M), e.use(P), e.use(V), e.use(Y), e.use(J), e.use(q), e.use(U), e.use(K), e.use(Q), e.use(X), e.use(Z), e.use(et);
|
|
1760
|
-
},
|
|
1761
|
-
install:
|
|
1784
|
+
}, ae = {
|
|
1785
|
+
install: ee
|
|
1762
1786
|
};
|
|
1763
1787
|
export {
|
|
1764
|
-
|
|
1788
|
+
ae as default,
|
|
1765
1789
|
M as hBottom,
|
|
1766
1790
|
U as hButton,
|
|
1767
1791
|
X as hButtonGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("echarts"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","echarts","@vueuse/core"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.HamsterCharts={},f.Vue,f.echarts,f.VueUse))})(this,function(f,t,U,P){"use strict";function K(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}return e.default=n,Object.freeze(e)}const J=K(U),y=(n,e)=>{const a=n.__vccOpts||n;for(const[l,o]of e)a[l]=o;return a},$=y(Object.assign({name:"hPanel",chineseName:"面板",description:"页面主体容器"},{props:{url:{type:String,default:""},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)}},setup(n){let e=n,a=t.computed(()=>({position:e.position,backgroundImage:e.url?`url(${e.url})`:"none"}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-panel",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-474190fc"]]);$.install=n=>{n.component($.name,$)};const w=y(Object.assign({name:"hHeader",chineseName:"标题",description:"页面标题容器"},{props:{url:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:"70px"},text:{type:String,default:"测试标题"},fontSize:{type:String,default:"26px"},color:{type:String,default:"#fff"},showText:{type:Boolean,default:!0},textPosition:{type:String,default:"absolute",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},textTop:{type:String,default:"50%"},textLeft:{type:String,default:"50%"},textTransform:{type:String,default:"translate(-50%, -50%)"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,backgroundImage:`url( ${e.url})`})),l=t.computed(()=>({color:e.color,fontSize:e.fontSize,position:e.textPosition,top:e.textTop,left:e.textLeft,transform:e.textTransform}));return(o,g)=>(t.openBlock(),t.createElementBlock("div",{class:"h-header",style:t.normalizeStyle(t.unref(a))},[t.unref(e).showText?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(t.unref(l))},t.toDisplayString(t.unref(e).text),5)):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b83cf769"]]);w.install=n=>{n.component(w.name,w)};const B=y(Object.assign({name:"hMain",chineseName:"主内容区",description:"页面主内容工作区"},{props:{height:{type:String,default:"200px"},display:{type:String,default:"flex"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},padding:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({height:e.height!=="auto"||e.height!=="0"?`calc(100% - ${e.height})`:e.height,display:e.display,columnGap:e.columnGap,rowGap:e.rowGap,padding:e.padding}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-main",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-1025786b"]]);B.install=n=>{n.component(B.name,B)};const z=y(Object.assign({name:"hChart"},{props:{height:{type:String,default:"auto"},showChart:{type:Boolean,default:!0},chartsh:{type:String,default:"auto"},url:{type:String,default:""},flex:{type:Number,default:.3},chartsOption:{type:Object,required:!0}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:a}){const l=a,o=n,g=t.computed(()=>({backgroundImage:o.url?`url(${o.url})`:"none",flex:o.flex,height:o.height})),h=t.computed(()=>({height:o.chartsh!=="auto"&&o.chartsh!=="0"?`calc(100% - ${o.chartsh})`:o.chartsh})),d=t.ref(null);let p=null;const b=P.useDebounceFn(()=>{p&&(p.resize(),l("chart-resize",{instance:p}))},100),k=()=>{if(!p)return;["click","dblclick","mouseover","mouseout"].forEach(i=>{p.on(i,c=>{l(`chart-${i}`,c)})})},x=()=>{p&&(["click","dblclick","mouseover","mouseout"].forEach(i=>{p.off(i)}),p.dispose(),p=null)},S=()=>{if(x(),!!d.value)try{const r=u(o.chartsOption);p=J.init(d.value),p.setOption(r,{notMerge:!0}),k(),l("chart-ready",{instance:p,dom:d.value})}catch(r){console.error("ECharts initialization failed:",r)}},u=r=>{if(!r||typeof r!="object")return{series:[]};const i=JSON.parse(JSON.stringify(r));return i.series?Array.isArray(i.series)||(i.series=[i.series]):i.series=[],i.series=i.series.map(c=>{if(!c||typeof c!="object")return{type:"line"};const m={type:"line",...c,type:c.type||"line"};return m.type==="pie"&&m.data&&(m.data=m.data.map(_=>typeof _=="object"&&_!==null?{type:"line",..._,type:_.type||"line"}:_)),m}),i.xAxis?Array.isArray(i.xAxis)?i.xAxis=i.xAxis.map(c=>!c||typeof c!="object"?{type:"category"}:{type:"category",...c,type:c.type||"category"}):typeof i.xAxis=="object"?i.xAxis={type:"category",...i.xAxis,type:i.xAxis.type||"category"}:i.xAxis={type:"category"}:i.xAxis={type:"category"},i.yAxis?Array.isArray(i.yAxis)?i.yAxis=i.yAxis.map(c=>!c||typeof c!="object"?{type:"value"}:{type:"value",...c,type:c.type||"value"}):typeof i.yAxis=="object"?i.yAxis={type:"value",...i.yAxis,type:i.yAxis.type||"value"}:i.yAxis={type:"value"}:i.yAxis={type:"value"},i.legend&&(typeof i.legend=="object"&&!Array.isArray(i.legend)||Array.isArray(i.legend)&&(i.legend={data:i.legend})),i},s=()=>{b()};return t.onMounted(()=>{setTimeout(()=>{S()},0),window.addEventListener("resize",s),P.useResizeObserver(d,r=>{b()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",s),x()}),t.watch(()=>o.chartsOption,(r,i)=>{if(r)try{const c=u(r);if(!p){S();return}p.setOption(c,{notMerge:!0}),l("chart-update",{instance:p,option:c})}catch(c){console.error("更新图表配置时出错:",c),console.error(" 错误堆栈:",c.stack)}},{deep:!0}),t.watch(()=>o.showChart,r=>{p&&setTimeout(()=>{p.resize()},0)}),e({getInstance:()=>p,resize:()=>b(),dispatchAction:r=>p==null?void 0:p.dispatchAction(r),dispose:x}),(r,i)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart",style:t.normalizeStyle(g.value)},[t.renderSlot(r.$slots,"default",{},void 0,!0),t.withDirectives(t.createElementVNode("div",{class:"chart",ref_key:"charts",ref:d,style:t.normalizeStyle(h.value)},null,4),[[t.vShow,o.showChart]])],4))}}),[["__scopeId","data-v-ad5727b9"]]);z.install=n=>{n.component(z.name,z)};const A=y(Object.assign({name:"hLeft"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-left",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-65e91535"]]);A.install=n=>{n.component(A.name,A)};const I=y(Object.assign({name:"hRight"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-right",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-e897c957"]]);I.install=n=>{n.component(I.name,I)};const C=y(Object.assign({name:"hCenter"},{props:{width:{type:String,default:"50%"},height:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-center",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-73b498de"]]);C.install=n=>{n.component(C.name,C)};const E=y(Object.assign({name:"hTop"},{props:{height:{type:String,default:"70%"},display:{type:String,default:"block"},position:{type:String,default:"relative"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,display:e.display,position:e.position}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-top",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-54014ba4"]]);E.install=n=>{n.component(E.name,E)};const G=y(Object.assign({name:"hBottom"},{props:{height:{type:String,default:"30%"},display:{type:String,default:"flex"},gap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},columnGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-bottom",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-086bec2a"]]);G.install=n=>{n.component(G.name,G)};const j=y(Object.assign({name:"hChartTitle"},{props:{fontSize:{type:String,default:"16px"},url:{type:String,default:""},height:{type:String,default:"50px"},paddingLeft:{type:String,default:"auto"},paddingRight:{type:String,default:"auto"},paddingTop:{type:String,default:"auto"},paddingBottom:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart-title",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"title",{},void 0,!0),t.renderSlot(l.$slots,"content",{},void 0,!0)],4))}}),[["__scopeId","data-v-36cebf9b"]]);j.install=n=>{n.component(j.name,j)};const O=y(Object.assign({name:"hItemChart",chineseName:"独立图表",description:"独立的 ECharts 图表容器组件,适用于大屏数据可视化展示"},{props:{height:{type:String,default:"200px"},url:{type:String,default:""},chartsOption:{type:Object,required:!0}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:a}){const l=a,o=n,g=t.computed(()=>({backgroundImage:o.url?`url(${o.url})`:"none",height:o.height})),h=t.ref(null);let d=null;const p=P.useDebounceFn(()=>{d&&(d.resize(),l("chart-resize",{instance:d}))},100),b=()=>{if(!d)return;["click","dblclick","mouseover","mouseout"].forEach(r=>{d.on(r,i=>{l(`chart-${r}`,i)})})},k=()=>{d&&(["click","dblclick","mouseover","mouseout"].forEach(r=>{d.off(r)}),d.dispose(),d=null)},x=()=>{if(k(),!!h.value)try{const s=S(o.chartsOption);d=J.init(h.value),d.setOption(s,{notMerge:!0}),b(),l("chart-ready",{instance:d,dom:h.value})}catch(s){console.error("ECharts initialization failed:",s)}},S=s=>{if(!s||typeof s!="object")return{series:[]};const r=JSON.parse(JSON.stringify(s));return r.series?Array.isArray(r.series)||(r.series=[r.series]):r.series=[],r.series=r.series.map(i=>{if(!i||typeof i!="object")return{type:"line"};const c={type:"line",...i,type:i.type||"line"};return c.type==="pie"&&c.data&&(c.data=c.data.map(m=>typeof m=="object"&&m!==null?{value:m.value||0,name:m.name||""}:m)),c}),r.xAxis?Array.isArray(r.xAxis)?r.xAxis=r.xAxis.map(i=>!i||typeof i!="object"?{type:"category"}:{type:"category",...i,type:i.type||"category"}):typeof r.xAxis=="object"?r.xAxis={type:"category",...r.xAxis,type:r.xAxis.type||"category"}:r.xAxis={type:"category"}:r.xAxis={type:"category"},r.yAxis?Array.isArray(r.yAxis)?r.yAxis=r.yAxis.map(i=>!i||typeof i!="object"?{type:"value"}:{type:"value",...i,type:i.type||"value"}):typeof r.yAxis=="object"?r.yAxis={type:"value",...r.yAxis,type:r.yAxis.type||"value"}:r.yAxis={type:"value"}:r.yAxis={type:"value"},r.legend&&(typeof r.legend=="object"&&!Array.isArray(r.legend)||Array.isArray(r.legend)&&(r.legend={data:r.legend})),r},u=()=>{p()};return t.onMounted(()=>{setTimeout(()=>{x()},0),window.addEventListener("resize",u),P.useResizeObserver(h,s=>{p()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",u),k()}),t.watch(()=>o.chartsOption,s=>{if(s)try{if(!d){x();return}const r=S(s);d.setOption(r,{notMerge:!0}),l("chart-update",{instance:d,option:r})}catch(r){console.error("更新图表配置时出错:",r)}},{deep:!0}),e({getInstance:()=>d,resize:()=>p(),dispatchAction:s=>d==null?void 0:d.dispatchAction(s),dispose:k}),(s,r)=>(t.openBlock(),t.createElementBlock("div",{class:"h-item-chart",ref_key:"itemCharts",ref:h,style:t.normalizeStyle(g.value)},null,4))}}),[["__scopeId","data-v-7c5da244"]]);O.install=n=>{n.component(O.name,O)};const D=y(Object.assign({name:"hList",chineseName:"滚动列表",description:"支持自动滚动的数据列表组件,适用于大屏数据展示"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},backgroundColor:{type:String,default:"transparent"},data:{type:Array,default:()=>[]},header:{type:Array,default:()=>[]},showHeader:{type:Boolean,default:!1},enableScroll:{type:Boolean,default:!0},headerHeight:{type:String,default:"40px"},headerBackground:{type:String,default:"rgba(255, 255, 255, 0.1)"},scrollDuration:{type:Number,default:2e3},scrollSpeed:{type:Number,default:500},highlightStyle:{type:Object,default:()=>({background:"rgba(0, 102, 255, 0.3)",color:"#fff",boxShadow:"0 0 10px rgba(0, 102, 255, 0.5)"})}},setup(n,{expose:e}){const a=n,l=t.ref(0),o=t.ref(null),g=t.ref(0),h=t.ref([]),d=t.ref(null),p=t.computed(()=>({width:a.width,height:a.height,backgroundColor:a.backgroundColor,position:"relative",overflow:"hidden"})),b=t.computed(()=>({height:a.headerHeight,display:"flex",alignItems:"center",background:a.headerBackground,position:"absolute",top:0,left:0,zIndex:10,width:"100%"})),k=t.computed(()=>({transform:`translateY(-${l.value*g.value}px)`,transition:`transform ${a.scrollSpeed}ms ease-in-out`,marginTop:a.showHeader?a.headerHeight:"0"})),x=i=>i===o.value?a.highlightStyle:{};t.watch(l,i=>{if(a.data.length>0){const c=i%a.data.length;o.value=c}});let S=null;const u=()=>{!a.enableScroll||a.data.length===0||(clearInterval(S),S=setInterval(()=>{l.value=(l.value+1)%a.data.length},a.scrollDuration))},s=()=>{S&&(clearInterval(S),S=null)},r=()=>{h.value&&h.value[0]&&(g.value=h.value[0].offsetHeight||40)};return t.onMounted(()=>{r(),u(),window.addEventListener("resize",r)}),t.onBeforeUnmount(()=>{s(),window.removeEventListener("resize",r)}),t.watch(()=>a.data,i=>{i.length>0?(l.value=0,o.value=null,setTimeout(()=>{r(),u()},100)):s()},{deep:!0}),t.watch(()=>a.enableScroll,i=>{i?u():(s(),l.value=0)}),e({startScroll:u,stopScroll:s,getCurrentIndex:()=>l.value,scrollTo:i=>{i>=0&&i<a.data.length&&(l.value=i)}}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{class:"h-list",style:t.normalizeStyle(p.value)},[n.showHeader?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-header",style:t.normalizeStyle(b.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.header,(m,_)=>(t.openBlock(),t.createElementBlock("p",{key:_,class:"header-item"},t.toDisplayString(m),1))),128))],4)):t.createCommentVNode("",!0),n.enableScroll?(t.openBlock(),t.createElementBlock("div",{key:1,class:"scroll-wrapper",style:t.normalizeStyle(k.value)},[t.createElementVNode("div",{class:"data-list",ref_key:"listContainer",ref:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.data,(m,_)=>(t.openBlock(),t.createElementBlock("div",{key:_,class:"data-list-item",style:t.normalizeStyle(x(_)),ref_for:!0,ref_key:"listItems",ref:h},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m,(Y,q)=>(t.openBlock(),t.createElementBlock("p",{key:q,class:"data-item-cell"},t.toDisplayString(Y),1))),128))],4))),128))],512)],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-937cc59c"]]);D.install=n=>{n.component(D.name,D)};const N=y(Object.assign({name:"hView"},{props:{height:{type:String,default:"100%"},width:{type:String,default:"50px"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},flex:{type:String,default:"0.2"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,rowGap:e.rowGap,columnGap:e.columnGap,flex:e.flex}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-view",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-490e5736"]]);N.install=n=>{n.component(N.name,N)};const T=y(Object.assign({name:"hDataLabel"},{props:{url:{type:String,default:""},num:{type:Number,default:12345},text:{type:String,default:"测试"},someText:{type:String,default:"测试"},show:{type:Boolean,default:!0},width:{type:String,default:"230px"},height:{type:String,default:"54px"},position:{type:String,default:"absolute"},left:{type:String,default:"0"},right:{type:String,default:""},top:{type:String,default:"0"},bottom:{type:String,default:""},zIndex:{type:String,default:"1"},display:{type:String,default:""},border:{type:String,default:"none"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},color:{type:String,default:"#fff"},numFontSize:{type:String,default:"20px"},numFontWeight:{type:String,default:"600"},numColor:{type:String,default:"#fff"},textFontSize:{type:String,default:"10px"},textFontWeight:{type:String,default:""},textColor:{type:String,default:"#fff"},titlelineHeight:{type:String,default:""},titletextAlign:{type:String,default:""},titleFontSize:{type:String,default:"10px"},titleFontWeight:{type:String,default:""},titleColor:{type:String,default:"#fff"},titleShow:{type:Boolean,default:!1}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,zIndex:e.zIndex,display:e.display,border:e.border,backgroundImage:`url(${e.url})`,flexDirection:e.flexDirection,justifyContent:e.justifyContent,alignItems:e.alignItems,color:e.color}),l=t.ref({fontSize:e.numFontSize,fontWeight:e.numFontWeight,color:e.numColor}),o=t.ref({fontSize:e.textFontSize,fontWeight:e.textFontWeight,color:e.textColor}),g=t.ref({fontSize:e.titleFontSize,fontWeight:e.titleFontWeight,color:e.titleColor,lineHeight:e.titlelineHeight,textAlign:e.titletextAlign});return(h,d)=>(t.openBlock(),t.createElementBlock("div",{class:"h-data-label",style:t.normalizeStyle(t.unref(a))},[n.show?(t.openBlock(),t.createElementBlock("span",{key:0,class:"h-data-label-num",style:t.normalizeStyle(t.unref(l))},t.toDisplayString(n.num),5)):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("span",{key:1,class:"h-data-label-text",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(n.text),5)):t.createCommentVNode("",!0),n.titleShow?(t.openBlock(),t.createElementBlock("span",{key:2,class:"h-data-label-title",style:t.normalizeStyle(t.unref(g))},t.toDisplayString(n.someText),5)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-f0ce86db"]]);T.install=n=>{n.component(T.name,T)};const F=y(Object.assign({name:"hButton"},{props:{url:{type:String,default:""},padding:{type:String,default:"5px 15px"},margin:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},fontSize:{type:String,default:""},fontWeight:{type:Number,default:400},color:{type:String,default:""},text:{type:String,default:"测试按钮"}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,padding:e.padding,margin:e.margin,border:e.border,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.color});return(l,o)=>(t.openBlock(),t.createElementBlock("button",{class:"h-button",style:t.normalizeStyle(t.unref(a))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-0a183c56"]]);F.install=n=>{n.component(F.name,F)};const L=y(Object.assign({name:"hGrid"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},gridWidth:{type:String,default:"1fr"},gridHeight:{type:String,default:"1fr"},display:{type:String,default:"grid"},gridTemplateColumns:{type:String,default:"3"},gridTemplateRows:{type:String,default:"2"},iwidth:{type:String,default:""},iheight:{type:String,default:""},idisplay:{type:String,default:"flex"}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,display:e.display,gridTemplateColumns:`repeat(${e.gridTemplateColumns}, ${e.gridWidth})`,gridTemplateRows:`repeat(${e.gridTemplateRows}, ${e.gridHeight})`}),l=t.ref({width:e.iwidth,height:e.iheight,display:e.idisplay});return(o,g)=>(t.openBlock(),t.createElementBlock("div",{class:"h-grid",style:t.normalizeStyle(t.unref(a))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,h=>t.createElementVNode("div",{key:h,class:"h-grid-item",style:t.normalizeStyle(t.unref(l))},g[0]||(g[0]=[t.createElementVNode("div",{class:"h-grid-item-left"},[t.createElementVNode("img",{src:"",alt:""})],-1),t.createElementVNode("div",{class:"h-grid-item-right"},null,-1)]),4)),64)),t.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-34e7422b"]]);L.install=n=>{n.component(L.name,L)};const W=y(Object.assign({name:"hCounter",chineseName:"数字计数器",description:"支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"},{props:{data:{type:[Number,String],default:123456},width:{type:String,default:"auto"},height:{type:String,default:"auto"},backgroundColor:{type:String,default:"transparent"},backgroundImage:{type:String,default:""},display:{type:String,default:"flex"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},gap:{type:String,default:"5px"},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},zIndex:{type:Number,default:1},digitWidth:{type:String,default:""},digitHeight:{type:String,default:""},digitBackgroundImage:{type:String,default:""},digitColor:{type:String,default:"#fff"},digitFontSize:{type:String,default:"32px"},digitFontWeight:{type:String,default:"bold"},digitBackgroundColor:{type:String,default:"transparent"},digitBorderRadius:{type:String,default:"4px"},showSeparator:{type:Boolean,default:!1},separator:{type:String,default:","},decimalPlaces:{type:Number,default:-1},prefix:{type:String,default:""},suffix:{type:String,default:""},enableAnimation:{type:Boolean,default:!0},animationDuration:{type:Number,default:2e3},digitDelay:{type:Number,default:100},transform:{type:String,default:"none"}},setup(n,{expose:e}){const a=n,l=t.ref([]),o=t.ref(!1),g=t.computed(()=>{let u=a.data;a.decimalPlaces>=0&&typeof u=="number"&&(u=u.toFixed(a.decimalPlaces));let s=String(u);if(a.showSeparator&&typeof a.data=="number"){const r=s.split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,a.separator),s=r.join(".")}return a.prefix&&(s=a.prefix+s),a.suffix&&(s=s+a.suffix),s.split("")}),h=t.computed(()=>a.digitWidth?a.digitWidth:`${(parseInt(a.digitFontSize)||32)*1.2}px`),d=t.computed(()=>a.digitHeight?a.digitHeight:`${(parseInt(a.digitFontSize)||32)*1.5}px`),p=()=>{if(!a.enableAnimation){l.value=g.value.map(()=>0);return}o.value=!0,l.value=g.value.map(()=>0);const u=g.value;u.forEach((s,r)=>{if(isNaN(parseInt(s))){l.value[r]=s;return}const i=parseInt(s),c=r*a.digitDelay,m=a.animationDuration;setTimeout(()=>{let _=0;const Y=m/(i+1),q=()=>{_<=i&&(l.value[r]=_,_++,_<=i?setTimeout(q,Y):(r===u.length-1||u.slice(r+1).every(Z=>isNaN(parseInt(Z))))&&(o.value=!1))};q()},c)})},b=u=>{const s=l.value[u];if(isNaN(parseInt(s)))return{transform:"translateY(0)",transition:"none"};const r=parseInt(d.value)||60;return{transform:`translateY(${-parseInt(s)*r}px)`,transition:`transform ${a.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`}},k=t.computed(()=>({width:a.width,height:a.height,backgroundColor:a.backgroundColor,backgroundImage:a.backgroundImage?`url(${a.backgroundImage})`:"none",display:a.display,justifyContent:a.justifyContent,alignItems:a.alignItems,gap:a.gap,position:a.position,left:a.left||void 0,right:a.right||void 0,top:a.top||void 0,bottom:a.bottom||void 0,zIndex:a.zIndex,transform:a.transform||void 0})),x=t.computed(()=>({width:h.value,height:d.value,overflow:"hidden",position:"relative",borderRadius:a.digitBorderRadius,backgroundColor:a.digitBackgroundColor})),S=t.computed(()=>({width:"100%",height:d.value,color:a.digitColor,fontSize:a.digitFontSize,fontWeight:a.digitFontWeight,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",flexShrink:0,lineHeight:"1"}));return t.watch(()=>a.data,()=>{p()}),t.onMounted(()=>{p()}),e({restart:p,getCurrentValue:()=>l.value.join("")}),(u,s)=>(t.openBlock(),t.createElementBlock("div",{class:"h-counter",style:t.normalizeStyle(k.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"counter-digit",style:t.normalizeStyle(x.value)},[t.createElementVNode("div",{class:"digit-scroll",style:t.normalizeStyle(b(i))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(10,c=>t.createElementVNode("div",{key:c-1,class:"digit-item",style:t.normalizeStyle(S.value)},t.toDisplayString(c-1),5)),64))],4)],4))),128)),t.renderSlot(u.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-fba32a26"]]);W.install=n=>{n.component(W.name,W)};const H=y(Object.assign({name:"hButtonGroup"},{props:{width:{type:String,default:""},height:{type:String,default:""},rowGap:{type:String,default:"5px"},columnGap:{type:String,default:"5px"},position:{type:String,default:"relative"},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},display:{type:String,default:"flex"},flexWrap:{type:String,default:"nowrap"}},setup(n){let e=n,a=t.ref({position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,flexWrap:e.flexWrap});return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-button-group",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-7bf905ff"]]);H.install=n=>{n.component(H.name,H)};const Q={class:"h-text"},V=y(Object.assign({name:"hText",chineseName:"文本",description:"用于显示文本内容"},{props:{text:{type:String,default:"测试文字"},fontSize:{type:String,default:"16px"},color:{type:String,default:"#fff"}},setup(n){let e=n;return(a,l)=>(t.openBlock(),t.createElementBlock("span",Q,t.toDisplayString(t.unref(e).text),1))}}),[["__scopeId","data-v-bc52bf83"]]);V.install=n=>{n.component(V.name,V)};const R=y(Object.assign({name:"hLayout",chineseName:"布局",description:"页面布局容器"},{props:{width:{type:String,default:"25%"},height:{type:String,default:"100%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-layout",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-957ea318"]]);R.install=n=>{n.component(R.name,R)};const M=y(Object.assign({name:"hFlex"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100px"},url:{type:String,default:""},display:{type:String,default:"flex"},flexDirection:{type:String,default:""},flexWrap:{type:String,default:"wrap"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"}},setup(n){let e=n,a=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",rowGap:e.rowGap,columnGap:e.columnGap,flexDirection:e.flexDirection,flexWrap:e.flexWrap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-flex",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-c8c463ea"]]);M.install=n=>{n.component(M.name,M)};const X={install:n=>{n.use($),n.use(w),n.use(R),n.use(B),n.use(z),n.use(A),n.use(I),n.use(C),n.use(E),n.use(G),n.use(j),n.use(O),n.use(D),n.use(N),n.use(T),n.use(F),n.use(L),n.use(W),n.use(H),n.use(V),n.use(M)}};f.default=X,f.hBottom=G,f.hButton=F,f.hButtonGroup=H,f.hCenter=C,f.hChart=z,f.hChartTitle=j,f.hCounter=W,f.hDataLabel=T,f.hFlex=M,f.hGrid=L,f.hHeader=w,f.hItemChart=O,f.hLayout=R,f.hLeft=A,f.hList=D,f.hMain=B,f.hPanel=$,f.hRight=I,f.hText=V,f.hTop=E,f.hView=N,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("echarts"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","echarts","@vueuse/core"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.HamsterCharts={},f.Vue,f.echarts,f.VueUse))})(this,function(f,t,U,P){"use strict";function K(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}return e.default=n,Object.freeze(e)}const J=K(U),y=(n,e)=>{const a=n.__vccOpts||n;for(const[l,o]of e)a[l]=o;return a},$=y(Object.assign({name:"hPanel",chineseName:"面板",description:"页面主体容器"},{props:{url:{type:String,default:""},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)}},setup(n){let e=n,a=t.computed(()=>({position:e.position,backgroundImage:e.url?`url(${e.url})`:"none"}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-panel",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-474190fc"]]);$.install=n=>{n.component($.name,$)};const w=y(Object.assign({name:"hHeader",chineseName:"标题",description:"页面标题容器"},{props:{url:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:"70px"},text:{type:String,default:"测试标题"},fontSize:{type:String,default:"26px"},color:{type:String,default:"#fff"},showText:{type:Boolean,default:!0},textPosition:{type:String,default:"absolute",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},textTop:{type:String,default:"50%"},textLeft:{type:String,default:"50%"},textTransform:{type:String,default:"translate(-50%, -50%)"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,backgroundImage:`url( ${e.url})`})),l=t.computed(()=>({color:e.color,fontSize:e.fontSize,position:e.textPosition,top:e.textTop,left:e.textLeft,transform:e.textTransform}));return(o,g)=>(t.openBlock(),t.createElementBlock("div",{class:"h-header",style:t.normalizeStyle(t.unref(a))},[t.unref(e).showText?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(t.unref(l))},t.toDisplayString(t.unref(e).text),5)):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b83cf769"]]);w.install=n=>{n.component(w.name,w)};const B=y(Object.assign({name:"hMain",chineseName:"主内容区",description:"页面主内容工作区"},{props:{height:{type:String,default:"200px"},display:{type:String,default:"flex"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},padding:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({height:e.height!=="auto"||e.height!=="0"?`calc(100% - ${e.height})`:e.height,display:e.display,columnGap:e.columnGap,rowGap:e.rowGap,padding:e.padding}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-main",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-1025786b"]]);B.install=n=>{n.component(B.name,B)};const z=y(Object.assign({name:"hChart"},{props:{height:{type:String,default:"auto"},showChart:{type:Boolean,default:!0},chartsh:{type:String,default:"auto"},url:{type:String,default:""},flex:{type:Number,default:.3},chartsOption:{type:Object,required:!0}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:a}){const l=a,o=n,g=t.computed(()=>({backgroundImage:o.url?`url(${o.url})`:"none",flex:o.flex,height:o.height})),h=t.computed(()=>({height:o.chartsh!=="auto"&&o.chartsh!=="0"?`calc(100% - ${o.chartsh})`:o.chartsh})),d=t.ref(null);let p=null;const b=P.useDebounceFn(()=>{p&&(p.resize(),l("chart-resize",{instance:p}))},100),k=()=>{if(!p)return;["click","dblclick","mouseover","mouseout"].forEach(i=>{p.on(i,c=>{l(`chart-${i}`,c)})})},x=()=>{p&&(["click","dblclick","mouseover","mouseout"].forEach(i=>{p.off(i)}),p.dispose(),p=null)},S=()=>{if(x(),!!d.value)try{const r=u(o.chartsOption);p=J.init(d.value),p.setOption(r,{notMerge:!0}),k(),l("chart-ready",{instance:p,dom:d.value})}catch(r){console.error("ECharts initialization failed:",r)}},u=r=>{if(!r||typeof r!="object")return{series:[]};const i=JSON.parse(JSON.stringify(r));return i.series?Array.isArray(i.series)||(i.series=[i.series]):i.series=[],i.series=i.series.map(c=>{if(!c||typeof c!="object")return{type:"line"};const m={type:"line",...c,type:c.type||"line"};return m.type==="pie"&&m.data&&(m.data=m.data.map(_=>typeof _=="object"&&_!==null?{type:"line",..._,type:_.type||"line"}:_)),m}),i.xAxis?Array.isArray(i.xAxis)?i.xAxis=i.xAxis.map(c=>!c||typeof c!="object"?{type:"category"}:{type:"category",...c,type:c.type||"category"}):typeof i.xAxis=="object"?i.xAxis={type:"category",...i.xAxis,type:i.xAxis.type||"category"}:i.xAxis={type:"category"}:i.xAxis={type:"category"},i.yAxis?Array.isArray(i.yAxis)?i.yAxis=i.yAxis.map(c=>!c||typeof c!="object"?{type:"value"}:{type:"value",...c,type:c.type||"value"}):typeof i.yAxis=="object"?i.yAxis={type:"value",...i.yAxis,type:i.yAxis.type||"value"}:i.yAxis={type:"value"}:i.yAxis={type:"value"},i.legend&&(typeof i.legend=="object"&&!Array.isArray(i.legend)||Array.isArray(i.legend)&&(i.legend={data:i.legend})),i},s=()=>{b()};return t.onMounted(()=>{setTimeout(()=>{S()},0),window.addEventListener("resize",s),P.useResizeObserver(d,r=>{b()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",s),x()}),t.watch(()=>o.chartsOption,(r,i)=>{if(r)try{const c=u(r);if(!p){S();return}p.setOption(c,{notMerge:!0}),l("chart-update",{instance:p,option:c})}catch(c){console.error("更新图表配置时出错:",c),console.error(" 错误堆栈:",c.stack)}},{deep:!0}),t.watch(()=>o.showChart,r=>{p&&setTimeout(()=>{p.resize()},0)}),e({getInstance:()=>p,resize:()=>b(),dispatchAction:r=>p==null?void 0:p.dispatchAction(r),dispose:x}),(r,i)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart",style:t.normalizeStyle(g.value)},[t.renderSlot(r.$slots,"default",{},void 0,!0),t.withDirectives(t.createElementVNode("div",{class:"chart",ref_key:"charts",ref:d,style:t.normalizeStyle(h.value)},null,4),[[t.vShow,o.showChart]])],4))}}),[["__scopeId","data-v-ad5727b9"]]);z.install=n=>{n.component(z.name,z)};const A=y(Object.assign({name:"hLeft"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-left",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-65e91535"]]);A.install=n=>{n.component(A.name,A)};const I=y(Object.assign({name:"hRight"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-right",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-e897c957"]]);I.install=n=>{n.component(I.name,I)};const C=y(Object.assign({name:"hCenter"},{props:{width:{type:String,default:"50%"},height:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-center",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-73b498de"]]);C.install=n=>{n.component(C.name,C)};const E=y(Object.assign({name:"hTop"},{props:{height:{type:String,default:"70%"},display:{type:String,default:"block"},position:{type:String,default:"relative"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,display:e.display,position:e.position}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-top",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-54014ba4"]]);E.install=n=>{n.component(E.name,E)};const G=y(Object.assign({name:"hBottom"},{props:{height:{type:String,default:"30%"},display:{type:String,default:"flex"},gap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},columnGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-bottom",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-086bec2a"]]);G.install=n=>{n.component(G.name,G)};const Q={class:"def-text"},j=y(Object.assign({name:"hChartTitle"},{props:{fontSize:{type:String,default:"16px"},url:{type:String,default:""},height:{type:String,default:"50px"},paddingLeft:{type:String,default:"auto"},paddingRight:{type:String,default:"auto"},paddingTop:{type:String,default:"auto"},paddingBottom:{type:String,default:"auto"},color:{type:String,default:"#fff"},text:{type:String,default:"测试标题"}},setup(n){let e=n,a=t.computed(()=>({height:e.height,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,color:e.color}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart-title",style:t.normalizeStyle(t.unref(a))},[t.createElementVNode("span",Q,t.toDisplayString(t.unref(e).text),1),t.renderSlot(l.$slots,"diy",{},void 0,!0)],4))}}),[["__scopeId","data-v-5c9b16aa"]]);j.install=n=>{n.component(j.name,j)};const O=y(Object.assign({name:"hItemChart",chineseName:"独立图表",description:"独立的 ECharts 图表容器组件,适用于大屏数据可视化展示"},{props:{height:{type:String,default:"200px"},url:{type:String,default:""},chartsOption:{type:Object,required:!0}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:a}){const l=a,o=n,g=t.computed(()=>({backgroundImage:o.url?`url(${o.url})`:"none",height:o.height})),h=t.ref(null);let d=null;const p=P.useDebounceFn(()=>{d&&(d.resize(),l("chart-resize",{instance:d}))},100),b=()=>{if(!d)return;["click","dblclick","mouseover","mouseout"].forEach(r=>{d.on(r,i=>{l(`chart-${r}`,i)})})},k=()=>{d&&(["click","dblclick","mouseover","mouseout"].forEach(r=>{d.off(r)}),d.dispose(),d=null)},x=()=>{if(k(),!!h.value)try{const s=S(o.chartsOption);d=J.init(h.value),d.setOption(s,{notMerge:!0}),b(),l("chart-ready",{instance:d,dom:h.value})}catch(s){console.error("ECharts initialization failed:",s)}},S=s=>{if(!s||typeof s!="object")return{series:[]};const r=JSON.parse(JSON.stringify(s));return r.series?Array.isArray(r.series)||(r.series=[r.series]):r.series=[],r.series=r.series.map(i=>{if(!i||typeof i!="object")return{type:"line"};const c={type:"line",...i,type:i.type||"line"};return c.type==="pie"&&c.data&&(c.data=c.data.map(m=>typeof m=="object"&&m!==null?{value:m.value||0,name:m.name||""}:m)),c}),r.xAxis?Array.isArray(r.xAxis)?r.xAxis=r.xAxis.map(i=>!i||typeof i!="object"?{type:"category"}:{type:"category",...i,type:i.type||"category"}):typeof r.xAxis=="object"?r.xAxis={type:"category",...r.xAxis,type:r.xAxis.type||"category"}:r.xAxis={type:"category"}:r.xAxis={type:"category"},r.yAxis?Array.isArray(r.yAxis)?r.yAxis=r.yAxis.map(i=>!i||typeof i!="object"?{type:"value"}:{type:"value",...i,type:i.type||"value"}):typeof r.yAxis=="object"?r.yAxis={type:"value",...r.yAxis,type:r.yAxis.type||"value"}:r.yAxis={type:"value"}:r.yAxis={type:"value"},r.legend&&(typeof r.legend=="object"&&!Array.isArray(r.legend)||Array.isArray(r.legend)&&(r.legend={data:r.legend})),r},u=()=>{p()};return t.onMounted(()=>{setTimeout(()=>{x()},0),window.addEventListener("resize",u),P.useResizeObserver(h,s=>{p()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",u),k()}),t.watch(()=>o.chartsOption,s=>{if(s)try{if(!d){x();return}const r=S(s);d.setOption(r,{notMerge:!0}),l("chart-update",{instance:d,option:r})}catch(r){console.error("更新图表配置时出错:",r)}},{deep:!0}),e({getInstance:()=>d,resize:()=>p(),dispatchAction:s=>d==null?void 0:d.dispatchAction(s),dispose:k}),(s,r)=>(t.openBlock(),t.createElementBlock("div",{class:"h-item-chart",ref_key:"itemCharts",ref:h,style:t.normalizeStyle(g.value)},null,4))}}),[["__scopeId","data-v-7c5da244"]]);O.install=n=>{n.component(O.name,O)};const D=y(Object.assign({name:"hList",chineseName:"滚动列表",description:"支持自动滚动的数据列表组件,适用于大屏数据展示"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},backgroundColor:{type:String,default:"transparent"},data:{type:Array,default:()=>[]},header:{type:Array,default:()=>[]},showHeader:{type:Boolean,default:!1},enableScroll:{type:Boolean,default:!0},headerHeight:{type:String,default:"40px"},headerBackground:{type:String,default:"rgba(255, 255, 255, 0.1)"},scrollDuration:{type:Number,default:2e3},scrollSpeed:{type:Number,default:500},highlightStyle:{type:Object,default:()=>({background:"rgba(0, 102, 255, 0.3)",color:"#fff",boxShadow:"0 0 10px rgba(0, 102, 255, 0.5)"})}},setup(n,{expose:e}){const a=n,l=t.ref(0),o=t.ref(null),g=t.ref(0),h=t.ref([]),d=t.ref(null),p=t.computed(()=>({width:a.width,height:a.height,backgroundColor:a.backgroundColor,position:"relative",overflow:"hidden"})),b=t.computed(()=>({height:a.headerHeight,display:"flex",alignItems:"center",background:a.headerBackground,position:"absolute",top:0,left:0,zIndex:10,width:"100%"})),k=t.computed(()=>({transform:`translateY(-${l.value*g.value}px)`,transition:`transform ${a.scrollSpeed}ms ease-in-out`,marginTop:a.showHeader?a.headerHeight:"0"})),x=i=>i===o.value?a.highlightStyle:{};t.watch(l,i=>{if(a.data.length>0){const c=i%a.data.length;o.value=c}});let S=null;const u=()=>{!a.enableScroll||a.data.length===0||(clearInterval(S),S=setInterval(()=>{l.value=(l.value+1)%a.data.length},a.scrollDuration))},s=()=>{S&&(clearInterval(S),S=null)},r=()=>{h.value&&h.value[0]&&(g.value=h.value[0].offsetHeight||40)};return t.onMounted(()=>{r(),u(),window.addEventListener("resize",r)}),t.onBeforeUnmount(()=>{s(),window.removeEventListener("resize",r)}),t.watch(()=>a.data,i=>{i.length>0?(l.value=0,o.value=null,setTimeout(()=>{r(),u()},100)):s()},{deep:!0}),t.watch(()=>a.enableScroll,i=>{i?u():(s(),l.value=0)}),e({startScroll:u,stopScroll:s,getCurrentIndex:()=>l.value,scrollTo:i=>{i>=0&&i<a.data.length&&(l.value=i)}}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{class:"h-list",style:t.normalizeStyle(p.value)},[n.showHeader?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-header",style:t.normalizeStyle(b.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.header,(m,_)=>(t.openBlock(),t.createElementBlock("p",{key:_,class:"header-item"},t.toDisplayString(m),1))),128))],4)):t.createCommentVNode("",!0),n.enableScroll?(t.openBlock(),t.createElementBlock("div",{key:1,class:"scroll-wrapper",style:t.normalizeStyle(k.value)},[t.createElementVNode("div",{class:"data-list",ref_key:"listContainer",ref:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.data,(m,_)=>(t.openBlock(),t.createElementBlock("div",{key:_,class:"data-list-item",style:t.normalizeStyle(x(_)),ref_for:!0,ref_key:"listItems",ref:h},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m,(Y,q)=>(t.openBlock(),t.createElementBlock("p",{key:q,class:"data-item-cell"},t.toDisplayString(Y),1))),128))],4))),128))],512)],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-937cc59c"]]);D.install=n=>{n.component(D.name,D)};const N=y(Object.assign({name:"hView"},{props:{height:{type:String,default:"200px"},width:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},flex:{type:String,default:"0.2"},position:{type:String,default:"relative"},top:{type:String,default:"auto"},left:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,rowGap:e.rowGap,columnGap:e.columnGap,flex:e.flex,position:e.position,top:e.top,left:e.left}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-view",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-2b1c3083"]]);N.install=n=>{n.component(N.name,N)};const T=y(Object.assign({name:"hDataLabel"},{props:{url:{type:String,default:""},num:{type:Number,default:12345},text:{type:String,default:"测试"},someText:{type:String,default:"测试"},show:{type:Boolean,default:!0},width:{type:String,default:"230px"},height:{type:String,default:"54px"},position:{type:String,default:"absolute"},left:{type:String,default:"0"},right:{type:String,default:""},top:{type:String,default:"0"},bottom:{type:String,default:""},zIndex:{type:String,default:"1"},display:{type:String,default:""},border:{type:String,default:"none"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},color:{type:String,default:"#fff"},numFontSize:{type:String,default:"20px"},numFontWeight:{type:String,default:"600"},numColor:{type:String,default:"#fff"},textFontSize:{type:String,default:"10px"},textFontWeight:{type:String,default:""},textColor:{type:String,default:"#fff"},titlelineHeight:{type:String,default:""},titletextAlign:{type:String,default:""},titleFontSize:{type:String,default:"10px"},titleFontWeight:{type:String,default:""},titleColor:{type:String,default:"#fff"},titleShow:{type:Boolean,default:!1}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,zIndex:e.zIndex,display:e.display,border:e.border,backgroundImage:`url(${e.url})`,flexDirection:e.flexDirection,justifyContent:e.justifyContent,alignItems:e.alignItems,color:e.color}),l=t.ref({fontSize:e.numFontSize,fontWeight:e.numFontWeight,color:e.numColor}),o=t.ref({fontSize:e.textFontSize,fontWeight:e.textFontWeight,color:e.textColor}),g=t.ref({fontSize:e.titleFontSize,fontWeight:e.titleFontWeight,color:e.titleColor,lineHeight:e.titlelineHeight,textAlign:e.titletextAlign});return(h,d)=>(t.openBlock(),t.createElementBlock("div",{class:"h-data-label",style:t.normalizeStyle(t.unref(a))},[n.show?(t.openBlock(),t.createElementBlock("span",{key:0,class:"h-data-label-num",style:t.normalizeStyle(t.unref(l))},t.toDisplayString(n.num),5)):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("span",{key:1,class:"h-data-label-text",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(n.text),5)):t.createCommentVNode("",!0),n.titleShow?(t.openBlock(),t.createElementBlock("span",{key:2,class:"h-data-label-title",style:t.normalizeStyle(t.unref(g))},t.toDisplayString(n.someText),5)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-f0ce86db"]]);T.install=n=>{n.component(T.name,T)};const F=y(Object.assign({name:"hButton"},{props:{url:{type:String,default:""},padding:{type:String,default:"5px 15px"},margin:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},fontSize:{type:String,default:""},fontWeight:{type:Number,default:400},color:{type:String,default:""},text:{type:String,default:"测试按钮"}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,padding:e.padding,margin:e.margin,border:e.border,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.color});return(l,o)=>(t.openBlock(),t.createElementBlock("button",{class:"h-button",style:t.normalizeStyle(t.unref(a))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-0a183c56"]]);F.install=n=>{n.component(F.name,F)};const L=y(Object.assign({name:"hGrid"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},gridWidth:{type:String,default:"1fr"},gridHeight:{type:String,default:"1fr"},display:{type:String,default:"grid"},gridTemplateColumns:{type:String,default:"3"},gridTemplateRows:{type:String,default:"2"},iwidth:{type:String,default:""},iheight:{type:String,default:""},idisplay:{type:String,default:"flex"}},setup(n){let e=n,a=t.ref({width:e.width,height:e.height,display:e.display,gridTemplateColumns:`repeat(${e.gridTemplateColumns}, ${e.gridWidth})`,gridTemplateRows:`repeat(${e.gridTemplateRows}, ${e.gridHeight})`}),l=t.ref({width:e.iwidth,height:e.iheight,display:e.idisplay});return(o,g)=>(t.openBlock(),t.createElementBlock("div",{class:"h-grid",style:t.normalizeStyle(t.unref(a))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,h=>t.createElementVNode("div",{key:h,class:"h-grid-item",style:t.normalizeStyle(t.unref(l))},g[0]||(g[0]=[t.createElementVNode("div",{class:"h-grid-item-left"},[t.createElementVNode("img",{src:"",alt:""})],-1),t.createElementVNode("div",{class:"h-grid-item-right"},null,-1)]),4)),64)),t.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-34e7422b"]]);L.install=n=>{n.component(L.name,L)};const W=y(Object.assign({name:"hCounter",chineseName:"数字计数器",description:"支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"},{props:{data:{type:[Number,String],default:123456},width:{type:String,default:"auto"},height:{type:String,default:"auto"},backgroundColor:{type:String,default:"transparent"},backgroundImage:{type:String,default:""},display:{type:String,default:"flex"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},gap:{type:String,default:"5px"},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},zIndex:{type:Number,default:1},digitWidth:{type:String,default:""},digitHeight:{type:String,default:""},digitBackgroundImage:{type:String,default:""},digitColor:{type:String,default:"#fff"},digitFontSize:{type:String,default:"32px"},digitFontWeight:{type:String,default:"bold"},digitBackgroundColor:{type:String,default:"transparent"},digitBorderRadius:{type:String,default:"4px"},showSeparator:{type:Boolean,default:!1},separator:{type:String,default:","},decimalPlaces:{type:Number,default:-1},prefix:{type:String,default:""},suffix:{type:String,default:""},enableAnimation:{type:Boolean,default:!0},animationDuration:{type:Number,default:2e3},digitDelay:{type:Number,default:100},transform:{type:String,default:"none"}},setup(n,{expose:e}){const a=n,l=t.ref([]),o=t.ref(!1),g=t.computed(()=>{let u=a.data;a.decimalPlaces>=0&&typeof u=="number"&&(u=u.toFixed(a.decimalPlaces));let s=String(u);if(a.showSeparator&&typeof a.data=="number"){const r=s.split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,a.separator),s=r.join(".")}return a.prefix&&(s=a.prefix+s),a.suffix&&(s=s+a.suffix),s.split("")}),h=t.computed(()=>a.digitWidth?a.digitWidth:`${(parseInt(a.digitFontSize)||32)*1.2}px`),d=t.computed(()=>a.digitHeight?a.digitHeight:`${(parseInt(a.digitFontSize)||32)*1.5}px`),p=()=>{if(!a.enableAnimation){l.value=g.value.map(()=>0);return}o.value=!0,l.value=g.value.map(()=>0);const u=g.value;u.forEach((s,r)=>{if(isNaN(parseInt(s))){l.value[r]=s;return}const i=parseInt(s),c=r*a.digitDelay,m=a.animationDuration;setTimeout(()=>{let _=0;const Y=m/(i+1),q=()=>{_<=i&&(l.value[r]=_,_++,_<=i?setTimeout(q,Y):(r===u.length-1||u.slice(r+1).every(v=>isNaN(parseInt(v))))&&(o.value=!1))};q()},c)})},b=u=>{const s=l.value[u];if(isNaN(parseInt(s)))return{transform:"translateY(0)",transition:"none"};const r=parseInt(d.value)||60;return{transform:`translateY(${-parseInt(s)*r}px)`,transition:`transform ${a.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`}},k=t.computed(()=>({width:a.width,height:a.height,backgroundColor:a.backgroundColor,backgroundImage:a.backgroundImage?`url(${a.backgroundImage})`:"none",display:a.display,justifyContent:a.justifyContent,alignItems:a.alignItems,gap:a.gap,position:a.position,left:a.left||void 0,right:a.right||void 0,top:a.top||void 0,bottom:a.bottom||void 0,zIndex:a.zIndex,transform:a.transform||void 0})),x=t.computed(()=>({width:h.value,height:d.value,overflow:"hidden",position:"relative",borderRadius:a.digitBorderRadius,backgroundColor:a.digitBackgroundColor})),S=t.computed(()=>({width:"100%",height:d.value,color:a.digitColor,fontSize:a.digitFontSize,fontWeight:a.digitFontWeight,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",flexShrink:0,lineHeight:"1"}));return t.watch(()=>a.data,()=>{p()}),t.onMounted(()=>{p()}),e({restart:p,getCurrentValue:()=>l.value.join("")}),(u,s)=>(t.openBlock(),t.createElementBlock("div",{class:"h-counter",style:t.normalizeStyle(k.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"counter-digit",style:t.normalizeStyle(x.value)},[t.createElementVNode("div",{class:"digit-scroll",style:t.normalizeStyle(b(i))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(10,c=>t.createElementVNode("div",{key:c-1,class:"digit-item",style:t.normalizeStyle(S.value)},t.toDisplayString(c-1),5)),64))],4)],4))),128)),t.renderSlot(u.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-fba32a26"]]);W.install=n=>{n.component(W.name,W)};const H=y(Object.assign({name:"hButtonGroup"},{props:{width:{type:String,default:""},height:{type:String,default:""},rowGap:{type:String,default:"5px"},columnGap:{type:String,default:"5px"},position:{type:String,default:"relative"},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},display:{type:String,default:"flex"},flexWrap:{type:String,default:"nowrap"}},setup(n){let e=n,a=t.ref({position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,flexWrap:e.flexWrap});return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-button-group",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-7bf905ff"]]);H.install=n=>{n.component(H.name,H)};const X={class:"h-text"},V=y(Object.assign({name:"hText",chineseName:"文本",description:"用于显示文本内容"},{props:{text:{type:String,default:"测试文字"},fontSize:{type:String,default:"16px"},color:{type:String,default:"#fff"}},setup(n){let e=n;return(a,l)=>(t.openBlock(),t.createElementBlock("span",X,t.toDisplayString(t.unref(e).text),1))}}),[["__scopeId","data-v-bc52bf83"]]);V.install=n=>{n.component(V.name,V)};const R=y(Object.assign({name:"hLayout",chineseName:"布局",description:"页面布局容器"},{props:{width:{type:String,default:"25%"},height:{type:String,default:"100%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,a=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-layout",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-957ea318"]]);R.install=n=>{n.component(R.name,R)};const M=y(Object.assign({name:"hFlex"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100px"},url:{type:String,default:""},display:{type:String,default:"flex"},flexDirection:{type:String,default:""},flexWrap:{type:String,default:"wrap"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"}},setup(n){let e=n,a=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",rowGap:e.rowGap,columnGap:e.columnGap,flexDirection:e.flexDirection,flexWrap:e.flexWrap}));return(l,o)=>(t.openBlock(),t.createElementBlock("div",{class:"h-flex",style:t.normalizeStyle(t.unref(a))},[t.renderSlot(l.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-c8c463ea"]]);M.install=n=>{n.component(M.name,M)};const Z={install:n=>{n.use($),n.use(w),n.use(R),n.use(B),n.use(z),n.use(A),n.use(I),n.use(C),n.use(E),n.use(G),n.use(j),n.use(O),n.use(D),n.use(N),n.use(T),n.use(F),n.use(L),n.use(W),n.use(H),n.use(V),n.use(M)}};f.default=Z,f.hBottom=G,f.hButton=F,f.hButtonGroup=H,f.hCenter=C,f.hChart=z,f.hChartTitle=j,f.hCounter=W,f.hDataLabel=T,f.hFlex=M,f.hGrid=L,f.hHeader=w,f.hItemChart=O,f.hLayout=R,f.hLeft=A,f.hList=D,f.hMain=B,f.hPanel=$,f.hRight=I,f.hText=V,f.hTop=E,f.hView=N,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hamster-charts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.
|
|
5
|
-
"description": "HamsterCharts
|
|
4
|
+
"version": "0.4.7",
|
|
5
|
+
"description": "HamsterCharts-更新了-修复了一些东西",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/hamster-charts.umd.cjs",
|
|
8
8
|
"module": "./dist/hamster-charts.js",
|