hamster-charts 0.6.1 → 0.6.2
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 +213 -215
- package/dist/hamster-charts.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/hamster-charts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as c, openBlock as s, createElementBlock as d, normalizeStyle as h, unref as S, renderSlot as
|
|
1
|
+
import { computed as c, openBlock as s, createElementBlock as d, normalizeStyle as h, unref as S, renderSlot as T, toDisplayString as G, createCommentVNode as A, createElementVNode as F, ref as $, useSlots as Ot, watch as L, onMounted as X, onBeforeUnmount as wt, createBlock as Gt, normalizeProps as Lt, mergeProps as Nt, Fragment as U, renderList as K, nextTick as Tt, Teleport as Bt, createVNode as Ht, Transition as Wt, withCtx as Ft } from "vue";
|
|
2
2
|
import * as bt from "echarts";
|
|
3
3
|
import { useDebounceFn as $t, useResizeObserver as At, useIntersectionObserver as zt } from "@vueuse/core";
|
|
4
4
|
const x = (e, t) => {
|
|
@@ -6,11 +6,11 @@ const x = (e, t) => {
|
|
|
6
6
|
for (const [a, i] of t)
|
|
7
7
|
n[a] = i;
|
|
8
8
|
return n;
|
|
9
|
-
},
|
|
9
|
+
}, Et = {
|
|
10
10
|
name: "hPanel",
|
|
11
11
|
chineseName: "面板",
|
|
12
12
|
description: "页面主体容器"
|
|
13
|
-
},
|
|
13
|
+
}, Mt = /* @__PURE__ */ Object.assign(Et, {
|
|
14
14
|
props: {
|
|
15
15
|
url: {
|
|
16
16
|
type: String,
|
|
@@ -31,18 +31,18 @@ const x = (e, t) => {
|
|
|
31
31
|
class: "h-panel",
|
|
32
32
|
style: h(S(n))
|
|
33
33
|
}, [
|
|
34
|
-
|
|
34
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
35
35
|
], 4));
|
|
36
36
|
}
|
|
37
|
-
}), tt = /* @__PURE__ */ x(
|
|
37
|
+
}), tt = /* @__PURE__ */ x(Mt, [["__scopeId", "data-v-474190fc"]]);
|
|
38
38
|
tt.install = (e) => {
|
|
39
39
|
e.component(tt.name, tt);
|
|
40
40
|
};
|
|
41
|
-
const
|
|
41
|
+
const Rt = {
|
|
42
42
|
name: "hHeader",
|
|
43
43
|
chineseName: "标题",
|
|
44
44
|
description: "页面标题容器"
|
|
45
|
-
},
|
|
45
|
+
}, Pt = /* @__PURE__ */ Object.assign(Rt, {
|
|
46
46
|
props: {
|
|
47
47
|
url: {
|
|
48
48
|
type: String,
|
|
@@ -110,19 +110,19 @@ const Jt = {
|
|
|
110
110
|
S(t).showText ? (s(), d("span", {
|
|
111
111
|
key: 0,
|
|
112
112
|
style: h(S(a))
|
|
113
|
-
}, G(S(t).text), 5)) :
|
|
114
|
-
|
|
113
|
+
}, G(S(t).text), 5)) : A("", !0),
|
|
114
|
+
T(i.$slots, "default", {}, void 0, !0)
|
|
115
115
|
], 4));
|
|
116
116
|
}
|
|
117
|
-
}), et = /* @__PURE__ */ x(
|
|
117
|
+
}), et = /* @__PURE__ */ x(Pt, [["__scopeId", "data-v-b83cf769"]]);
|
|
118
118
|
et.install = (e) => {
|
|
119
119
|
e.component(et.name, et);
|
|
120
120
|
};
|
|
121
|
-
const
|
|
121
|
+
const Jt = {
|
|
122
122
|
name: "hMain",
|
|
123
123
|
chineseName: "主内容区",
|
|
124
124
|
description: "页面主内容工作区"
|
|
125
|
-
},
|
|
125
|
+
}, Vt = /* @__PURE__ */ Object.assign(Jt, {
|
|
126
126
|
props: {
|
|
127
127
|
height: {
|
|
128
128
|
type: String,
|
|
@@ -157,18 +157,18 @@ const Yt = {
|
|
|
157
157
|
class: "h-main",
|
|
158
158
|
style: h(S(n))
|
|
159
159
|
}, [
|
|
160
|
-
|
|
160
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
161
161
|
], 4));
|
|
162
162
|
}
|
|
163
|
-
}), nt = /* @__PURE__ */ x(
|
|
163
|
+
}), nt = /* @__PURE__ */ x(Vt, [["__scopeId", "data-v-1025786b"]]);
|
|
164
164
|
nt.install = (e) => {
|
|
165
165
|
e.component(nt.name, nt);
|
|
166
166
|
};
|
|
167
|
-
const
|
|
167
|
+
const Yt = { class: "def-text" }, qt = {
|
|
168
168
|
name: "hChartTitle",
|
|
169
169
|
chineseName: "图表标题",
|
|
170
170
|
description: "图表标题组件"
|
|
171
|
-
},
|
|
171
|
+
}, Ut = /* @__PURE__ */ Object.assign(qt, {
|
|
172
172
|
props: {
|
|
173
173
|
fontSize: {
|
|
174
174
|
type: String,
|
|
@@ -247,18 +247,18 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
247
247
|
class: "h-chart-title",
|
|
248
248
|
style: h(S(n))
|
|
249
249
|
}, [
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
F("span", Yt, G(S(t).text), 1),
|
|
251
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
252
252
|
], 4));
|
|
253
253
|
}
|
|
254
|
-
}), Q = /* @__PURE__ */ x(
|
|
254
|
+
}), Q = /* @__PURE__ */ x(Ut, [["__scopeId", "data-v-412bbd72"]]), It = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780631644175'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1701'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M923.851581%20338.007247c-20.012799-47.313585-47.717791-90.324168-82.448804-128.128169%206.875594-13.544481%2010.753925-28.866445%2010.753925-45.096081%200-55.099922-44.667316-99.767238-99.767238-99.767238-29.051663%200-55.19816%2012.420891-73.431429%2032.237215-53.058426-21.390169-109.183701-32.237215-166.958546-32.237215-60.334133%200-118.873388%2011.821233-173.98866%2035.134195-53.232388%2022.51376-101.031021%2054.741765-142.073786%2095.78453-41.045835%2041.043788-73.272817%2088.844467-95.785553%20142.073786C76.837504%20393.126612%2065.014224%20451.665867%2065.014224%20512.001023c0%2060.33311%2011.82328%20118.873388%2035.134195%20173.989683%2022.51376%2053.230342%2054.741765%20101.029998%2095.785553%20142.073786%2041.041742%2041.043788%2088.841398%2073.27077%20142.073786%2095.785553%2055.116295%2023.311939%20113.65555%2035.134195%20173.989683%2035.134195s118.873388-11.822257%20173.992753-35.134195c53.229319-22.514783%20101.029998-54.742788%20142.072763-95.785553%2041.045835-41.043788%2073.272817-88.843444%2095.785553-142.073786%2023.309892-55.116295%2035.134195-113.656573%2035.134195-173.989683C958.985776%20451.665867%20947.161473%20393.127635%20923.851581%20338.007247zM887.891578%20670.783353c-20.545942%2048.575322-49.960879%2092.203982-87.430258%20129.676431-37.473473%2037.470403-81.100086%2066.88841-129.679501%2087.432305-50.28015%2021.263279-103.702873%2032.047904-158.783353%2032.047904-55.07741%200-108.500133-10.782577-158.785399-32.047904-48.575322-20.545942-92.203982-49.961902-129.676431-87.432305-37.47245-37.47245-66.88841-81.101109-87.430258-129.676431-21.267373-50.28015-32.050973-103.703897-32.050973-158.784376s10.783601-108.503203%2032.050973-158.783353c20.541849-48.575322%2049.958832-92.206028%2087.430258-129.676431%2037.47245-37.470403%2081.101109-66.887386%20129.676431-87.433328%2050.285267-21.266349%20103.70799-32.04995%20158.785399-32.04995%2050.600445%200%2099.797937%209.107425%20146.447397%2027.074635-3.767813%2010.514471-5.824659%2021.842471-5.824659%2033.653471%200%2055.099922%2044.667316%2099.767238%2099.767238%2099.767238%2024.573675%200%2047.065945-8.889461%2064.452941-23.620977%2029.737278%2033.372062%2053.603849%2071.037916%2071.050196%20112.285343%2021.266349%2050.28015%2032.04995%20103.702873%2032.04995%20158.783353S909.15895%20620.503203%20887.891578%20670.783353z'%20fill='%230066ff'%20p-id='1702'%3e%3c/path%3e%3c/svg%3e", Kt = ["src"], Qt = {
|
|
255
255
|
key: 0,
|
|
256
256
|
class: "loading-text"
|
|
257
|
-
},
|
|
257
|
+
}, Xt = {
|
|
258
258
|
name: "hChart",
|
|
259
259
|
chineseName: "图表",
|
|
260
260
|
description: "基于 ECharts 的图表容器组件,支持自适应和事件交互"
|
|
261
|
-
},
|
|
261
|
+
}, Zt = /* @__PURE__ */ Object.assign(Xt, {
|
|
262
262
|
props: {
|
|
263
263
|
height: {
|
|
264
264
|
type: String,
|
|
@@ -346,9 +346,9 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
346
346
|
height: i.height
|
|
347
347
|
})), p = $(null);
|
|
348
348
|
let o = null;
|
|
349
|
-
const k = Ot(),
|
|
349
|
+
const k = Ot(), N = c(() => !!k.default), W = c(() => i.title ? typeof i.title == "string" ? { text: i.title } : i.title : null), w = $(!1);
|
|
350
350
|
let I = 0;
|
|
351
|
-
|
|
351
|
+
L(() => i.loading, (l) => {
|
|
352
352
|
if (l)
|
|
353
353
|
w.value = !0, I = Date.now();
|
|
354
354
|
else {
|
|
@@ -370,7 +370,7 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
370
370
|
pauseOnHover: l.pauseOnHover ?? !0
|
|
371
371
|
};
|
|
372
372
|
});
|
|
373
|
-
let v = null, y = 0, z = !1,
|
|
373
|
+
let v = null, y = 0, z = !1, j = !0;
|
|
374
374
|
const C = () => {
|
|
375
375
|
var l, r;
|
|
376
376
|
try {
|
|
@@ -382,12 +382,12 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
382
382
|
return 0;
|
|
383
383
|
}
|
|
384
384
|
}, E = () => {
|
|
385
|
-
if (!o || !u.value || z || !
|
|
385
|
+
if (!o || !u.value || z || !j) return;
|
|
386
386
|
const l = C();
|
|
387
|
-
l !== 0 && (o.dispatchAction({ type: "showTip", seriesIndex: u.value.seriesIndex, dataIndex: y }), y++, y >= l && (u.value.loop ? y = 0 :
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
},
|
|
387
|
+
l !== 0 && (o.dispatchAction({ type: "showTip", seriesIndex: u.value.seriesIndex, dataIndex: y }), y++, y >= l && (u.value.loop ? y = 0 : B()));
|
|
388
|
+
}, D = () => {
|
|
389
|
+
B(), !(!u.value || C() === 0) && (y = 0, v = setInterval(E, u.value.interval));
|
|
390
|
+
}, B = () => {
|
|
391
391
|
v && (clearInterval(v), v = null), o && o.dispatchAction({ type: "hideTip" });
|
|
392
392
|
}, V = () => {
|
|
393
393
|
z = !0;
|
|
@@ -408,7 +408,7 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
408
408
|
M();
|
|
409
409
|
}));
|
|
410
410
|
}, J = () => {
|
|
411
|
-
o && (
|
|
411
|
+
o && (B(), ["click", "dblclick", "mouseover", "mouseout"].forEach((r) => {
|
|
412
412
|
o.off(r);
|
|
413
413
|
}), o.dispose(), o = null);
|
|
414
414
|
}, m = () => {
|
|
@@ -418,7 +418,7 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
418
418
|
o = bt.init(p.value), o.setOption(l, { notMerge: !0 }), Z(), a("chart-ready", {
|
|
419
419
|
instance: o,
|
|
420
420
|
dom: p.value
|
|
421
|
-
}),
|
|
421
|
+
}), D();
|
|
422
422
|
} catch (l) {
|
|
423
423
|
console.error("ECharts initialization failed:", l);
|
|
424
424
|
}
|
|
@@ -458,20 +458,20 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
458
458
|
} : r.yAxis = { type: "value" } : r.yAxis = { type: "value" }, r.legend && (typeof r.legend == "object" && !Array.isArray(r.legend) || Array.isArray(r.legend) && (r.legend = {
|
|
459
459
|
data: r.legend
|
|
460
460
|
})), r;
|
|
461
|
-
},
|
|
461
|
+
}, H = () => {
|
|
462
462
|
P();
|
|
463
463
|
};
|
|
464
464
|
return X(() => {
|
|
465
465
|
setTimeout(() => {
|
|
466
466
|
m();
|
|
467
|
-
}, 0), window.addEventListener("resize",
|
|
467
|
+
}, 0), window.addEventListener("resize", H), At(p, (l) => {
|
|
468
468
|
P();
|
|
469
469
|
}), i.tooltipLoop && zt(p, ([l]) => {
|
|
470
|
-
|
|
470
|
+
j = l.isIntersecting, j ? M() : V();
|
|
471
471
|
});
|
|
472
472
|
}), wt(() => {
|
|
473
|
-
window.removeEventListener("resize",
|
|
474
|
-
}),
|
|
473
|
+
window.removeEventListener("resize", H), B(), J();
|
|
474
|
+
}), L(() => i.option, (l, r) => {
|
|
475
475
|
if (l)
|
|
476
476
|
try {
|
|
477
477
|
const g = f(l);
|
|
@@ -479,14 +479,14 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
479
479
|
m();
|
|
480
480
|
return;
|
|
481
481
|
}
|
|
482
|
-
o.clear(), o.setOption(g, { notMerge: !0 }),
|
|
482
|
+
o.clear(), o.setOption(g, { notMerge: !0 }), D(), a("chart-update", {
|
|
483
483
|
instance: o,
|
|
484
484
|
option: g
|
|
485
485
|
});
|
|
486
486
|
} catch (g) {
|
|
487
487
|
console.error("更新图表配置时出错:", g), console.error(" 错误堆栈:", g.stack);
|
|
488
488
|
}
|
|
489
|
-
}, { deep: !0 }),
|
|
489
|
+
}, { deep: !0 }), L(() => i.showChart, (l) => {
|
|
490
490
|
o && setTimeout(() => {
|
|
491
491
|
o.resize();
|
|
492
492
|
}, 0);
|
|
@@ -496,47 +496,45 @@ const Ut = { class: "def-text" }, Kt = {
|
|
|
496
496
|
dispatchAction: (l) => o == null ? void 0 : o.dispatchAction(l),
|
|
497
497
|
dispose: J,
|
|
498
498
|
// tooltip 轮播控制
|
|
499
|
-
startLoop:
|
|
500
|
-
stopLoop:
|
|
499
|
+
startLoop: D,
|
|
500
|
+
stopLoop: B,
|
|
501
501
|
pauseLoop: V,
|
|
502
502
|
resumeLoop: M
|
|
503
503
|
}), (l, r) => (s(), d("div", {
|
|
504
504
|
class: "h-chart",
|
|
505
505
|
style: h(b.value)
|
|
506
506
|
}, [
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
[Ht, i.showChart]
|
|
515
|
-
]),
|
|
507
|
+
N.value ? T(l.$slots, "default", { key: 0 }, void 0, !0) : W.value && i.showTitle ? (s(), Gt(Q, Lt(Nt({ key: 1 }, W.value)), null, 16)) : A("", !0),
|
|
508
|
+
i.showChart ? (s(), d("div", {
|
|
509
|
+
key: 2,
|
|
510
|
+
class: "chart",
|
|
511
|
+
ref_key: "charts",
|
|
512
|
+
ref: p
|
|
513
|
+
}, [
|
|
516
514
|
w.value ? (s(), d("div", {
|
|
517
515
|
key: 0,
|
|
518
516
|
class: "chart-loading",
|
|
519
517
|
style: h(_.value)
|
|
520
518
|
}, [
|
|
521
|
-
|
|
519
|
+
F("img", {
|
|
522
520
|
src: i.loadingIcon || S(It),
|
|
523
521
|
class: "loading-icon",
|
|
524
522
|
alt: "loading"
|
|
525
|
-
}, null, 8,
|
|
526
|
-
i.loadingText ? (s(), d("span",
|
|
527
|
-
], 4)) :
|
|
528
|
-
])
|
|
523
|
+
}, null, 8, Kt),
|
|
524
|
+
i.loadingText ? (s(), d("span", Qt, G(i.loadingText), 1)) : A("", !0)
|
|
525
|
+
], 4)) : A("", !0)
|
|
526
|
+
], 512)) : A("", !0)
|
|
529
527
|
], 4));
|
|
530
528
|
}
|
|
531
|
-
}), it = /* @__PURE__ */ x(
|
|
529
|
+
}), it = /* @__PURE__ */ x(Zt, [["__scopeId", "data-v-0af49945"]]);
|
|
532
530
|
it.install = (e) => {
|
|
533
531
|
e.component(it.name, it);
|
|
534
532
|
};
|
|
535
|
-
const
|
|
533
|
+
const te = {
|
|
536
534
|
name: "hLeft",
|
|
537
535
|
chineseName: "左侧",
|
|
538
536
|
description: "页面左侧容器"
|
|
539
|
-
},
|
|
537
|
+
}, ee = /* @__PURE__ */ Object.assign(te, {
|
|
540
538
|
props: {
|
|
541
539
|
width: {
|
|
542
540
|
type: String,
|
|
@@ -571,18 +569,18 @@ const ie = {
|
|
|
571
569
|
class: "h-left",
|
|
572
570
|
style: h(S(n))
|
|
573
571
|
}, [
|
|
574
|
-
|
|
572
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
575
573
|
], 4));
|
|
576
574
|
}
|
|
577
|
-
}), at = /* @__PURE__ */ x(
|
|
575
|
+
}), at = /* @__PURE__ */ x(ee, [["__scopeId", "data-v-7d94e3d8"]]);
|
|
578
576
|
at.install = (e) => {
|
|
579
577
|
e.component(at.name, at);
|
|
580
578
|
};
|
|
581
|
-
const
|
|
579
|
+
const ne = {
|
|
582
580
|
name: "hRight",
|
|
583
581
|
chineseName: "右侧",
|
|
584
582
|
description: "页面右侧容器"
|
|
585
|
-
},
|
|
583
|
+
}, ie = /* @__PURE__ */ Object.assign(ne, {
|
|
586
584
|
props: {
|
|
587
585
|
width: {
|
|
588
586
|
type: String,
|
|
@@ -617,18 +615,18 @@ const oe = {
|
|
|
617
615
|
class: "h-right",
|
|
618
616
|
style: h(S(n))
|
|
619
617
|
}, [
|
|
620
|
-
|
|
618
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
621
619
|
], 4));
|
|
622
620
|
}
|
|
623
|
-
}), ot = /* @__PURE__ */ x(
|
|
621
|
+
}), ot = /* @__PURE__ */ x(ie, [["__scopeId", "data-v-8ef316d0"]]);
|
|
624
622
|
ot.install = (e) => {
|
|
625
623
|
e.component(ot.name, ot);
|
|
626
624
|
};
|
|
627
|
-
const
|
|
625
|
+
const ae = {
|
|
628
626
|
name: "hCenter",
|
|
629
627
|
chineseName: "居中布局",
|
|
630
628
|
description: "水平居中布局容器"
|
|
631
|
-
},
|
|
629
|
+
}, oe = /* @__PURE__ */ Object.assign(ae, {
|
|
632
630
|
props: {
|
|
633
631
|
width: {
|
|
634
632
|
type: String,
|
|
@@ -668,18 +666,18 @@ const le = {
|
|
|
668
666
|
class: "h-center",
|
|
669
667
|
style: h(S(n))
|
|
670
668
|
}, [
|
|
671
|
-
|
|
669
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
672
670
|
], 4));
|
|
673
671
|
}
|
|
674
|
-
}), rt = /* @__PURE__ */ x(
|
|
672
|
+
}), rt = /* @__PURE__ */ x(oe, [["__scopeId", "data-v-69a501ea"]]);
|
|
675
673
|
rt.install = (e) => {
|
|
676
674
|
e.component(rt.name, rt);
|
|
677
675
|
};
|
|
678
|
-
const
|
|
676
|
+
const re = {
|
|
679
677
|
name: "hTop",
|
|
680
678
|
chineseName: "顶部",
|
|
681
679
|
description: "页面顶部容器"
|
|
682
|
-
},
|
|
680
|
+
}, le = /* @__PURE__ */ Object.assign(re, {
|
|
683
681
|
props: {
|
|
684
682
|
height: {
|
|
685
683
|
type: String,
|
|
@@ -704,18 +702,18 @@ const ue = {
|
|
|
704
702
|
class: "h-top",
|
|
705
703
|
style: h(S(n))
|
|
706
704
|
}, [
|
|
707
|
-
|
|
705
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
708
706
|
], 4));
|
|
709
707
|
}
|
|
710
|
-
}), lt = /* @__PURE__ */ x(
|
|
708
|
+
}), lt = /* @__PURE__ */ x(le, [["__scopeId", "data-v-ee9ecf79"]]);
|
|
711
709
|
lt.install = (e) => {
|
|
712
710
|
e.component(lt.name, lt);
|
|
713
711
|
};
|
|
714
|
-
const
|
|
712
|
+
const se = {
|
|
715
713
|
name: "hBottom",
|
|
716
714
|
chineseName: "底部",
|
|
717
715
|
description: "页面底部容器"
|
|
718
|
-
},
|
|
716
|
+
}, ue = /* @__PURE__ */ Object.assign(se, {
|
|
719
717
|
props: {
|
|
720
718
|
height: {
|
|
721
719
|
type: String,
|
|
@@ -750,24 +748,24 @@ const pe = {
|
|
|
750
748
|
class: "h-bottom",
|
|
751
749
|
style: h(S(n))
|
|
752
750
|
}, [
|
|
753
|
-
|
|
751
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
754
752
|
], 4));
|
|
755
753
|
}
|
|
756
|
-
}), st = /* @__PURE__ */ x(
|
|
754
|
+
}), st = /* @__PURE__ */ x(ue, [["__scopeId", "data-v-9fc5eff9"]]);
|
|
757
755
|
st.install = (e) => {
|
|
758
756
|
e.component(st.name, st);
|
|
759
757
|
};
|
|
760
758
|
Q.install = (e) => {
|
|
761
759
|
e.component(Q.name, Q);
|
|
762
760
|
};
|
|
763
|
-
const
|
|
761
|
+
const de = ["src"], pe = {
|
|
764
762
|
key: 0,
|
|
765
763
|
class: "h-item-chart-loading-text"
|
|
766
|
-
},
|
|
764
|
+
}, ce = {
|
|
767
765
|
name: "hItemChart",
|
|
768
766
|
chineseName: "独立图表",
|
|
769
767
|
description: "独立的 ECharts 图表容器组件,支持 loading、tooltip 轮播,适用于大屏数据可视化展示"
|
|
770
|
-
},
|
|
768
|
+
}, fe = /* @__PURE__ */ Object.assign(ce, {
|
|
771
769
|
props: {
|
|
772
770
|
height: { type: String, default: "200px" },
|
|
773
771
|
url: { type: String, default: "" },
|
|
@@ -797,18 +795,18 @@ const fe = ["src"], ge = {
|
|
|
797
795
|
})), p = $(null);
|
|
798
796
|
let o = null;
|
|
799
797
|
const k = $(!1);
|
|
800
|
-
let
|
|
801
|
-
|
|
798
|
+
let N = 0;
|
|
799
|
+
L(() => i.loading, (m) => {
|
|
802
800
|
if (m)
|
|
803
|
-
k.value = !0,
|
|
801
|
+
k.value = !0, N = Date.now();
|
|
804
802
|
else {
|
|
805
|
-
const f = (i.loadingMinDuration || 0) - (Date.now() -
|
|
803
|
+
const f = (i.loadingMinDuration || 0) - (Date.now() - N);
|
|
806
804
|
f <= 0 ? k.value = !1 : setTimeout(() => {
|
|
807
805
|
k.value = !1;
|
|
808
806
|
}, f);
|
|
809
807
|
}
|
|
810
808
|
}, { immediate: !0 });
|
|
811
|
-
const
|
|
809
|
+
const W = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = c(() => {
|
|
812
810
|
if (!i.tooltipLoop) return null;
|
|
813
811
|
if (i.tooltipLoop === !0) return { interval: 2e3, seriesIndex: 0, loop: !0, pauseOnHover: !0 };
|
|
814
812
|
const m = i.tooltipLoop;
|
|
@@ -816,12 +814,12 @@ const fe = ["src"], ge = {
|
|
|
816
814
|
});
|
|
817
815
|
let I = null, _ = 0, u = !1, v = !0;
|
|
818
816
|
const y = () => {
|
|
819
|
-
var m, f,
|
|
817
|
+
var m, f, H;
|
|
820
818
|
try {
|
|
821
819
|
const l = (m = i.option) == null ? void 0 : m.series;
|
|
822
820
|
if (!l || !Array.isArray(l)) return 0;
|
|
823
821
|
const r = l[((f = w.value) == null ? void 0 : f.seriesIndex) ?? 0];
|
|
824
|
-
return ((
|
|
822
|
+
return ((H = r == null ? void 0 : r.data) == null ? void 0 : H.length) ?? 0;
|
|
825
823
|
} catch {
|
|
826
824
|
return 0;
|
|
827
825
|
}
|
|
@@ -829,26 +827,26 @@ const fe = ["src"], ge = {
|
|
|
829
827
|
if (!o || !w.value || u || !v) return;
|
|
830
828
|
const m = y();
|
|
831
829
|
m !== 0 && (o.dispatchAction({ type: "showTip", seriesIndex: w.value.seriesIndex, dataIndex: _ }), _++, _ >= m && (w.value.loop ? _ = 0 : C()));
|
|
832
|
-
},
|
|
830
|
+
}, j = () => {
|
|
833
831
|
C(), !(!w.value || y() === 0) && (_ = 0, I = setInterval(z, w.value.interval));
|
|
834
832
|
}, C = () => {
|
|
835
833
|
I && (clearInterval(I), I = null), o && o.dispatchAction({ type: "hideTip" });
|
|
836
834
|
}, E = () => {
|
|
837
835
|
u = !0;
|
|
838
|
-
},
|
|
836
|
+
}, D = () => {
|
|
839
837
|
u = !1;
|
|
840
|
-
},
|
|
838
|
+
}, B = $t(() => {
|
|
841
839
|
o && (o.resize(), a("chart-resize", { instance: o }));
|
|
842
840
|
}, 100), V = () => {
|
|
843
841
|
var f;
|
|
844
842
|
if (!o) return;
|
|
845
|
-
["click", "dblclick", "mouseover", "mouseout"].forEach((
|
|
843
|
+
["click", "dblclick", "mouseover", "mouseout"].forEach((H) => o.on(H, (l) => a(`chart-${H}`, l))), (f = w.value) != null && f.pauseOnHover && (o.on("mouseover", () => E()), o.on("mouseout", () => D()));
|
|
846
844
|
}, M = () => {
|
|
847
845
|
o && (C(), ["click", "dblclick", "mouseover", "mouseout"].forEach((f) => o.off(f)), o.dispose(), o = null);
|
|
848
846
|
}, P = () => {
|
|
849
847
|
if (M(), !!p.value)
|
|
850
848
|
try {
|
|
851
|
-
o = bt.init(p.value), o.setOption(Z(i.option), { notMerge: !0 }), V(), a("chart-ready", { instance: o, dom: p.value }),
|
|
849
|
+
o = bt.init(p.value), o.setOption(Z(i.option), { notMerge: !0 }), V(), a("chart-ready", { instance: o, dom: p.value }), j();
|
|
852
850
|
} catch (m) {
|
|
853
851
|
console.error("[hItemChart] init:", m);
|
|
854
852
|
}
|
|
@@ -860,37 +858,37 @@ const fe = ["src"], ge = {
|
|
|
860
858
|
const r = { type: "line", ...l, type: l.type || "line" };
|
|
861
859
|
return r.type === "pie" && r.data && (r.data = r.data.map((g) => typeof g == "object" && g !== null ? { value: g.value || 0, name: g.name || "" } : g)), r;
|
|
862
860
|
});
|
|
863
|
-
const
|
|
861
|
+
const H = (l, r) => {
|
|
864
862
|
f[l] ? Array.isArray(f[l]) ? f[l] = f[l].map((g) => ({ type: r, ...g, type: g.type || r })) : typeof f[l] == "object" ? f[l] = { type: r, ...f[l], type: f[l].type || r } : f[l] = { type: r } : f[l] = { type: r };
|
|
865
863
|
};
|
|
866
|
-
return
|
|
867
|
-
}, J = () =>
|
|
864
|
+
return H("xAxis", "category"), H("yAxis", "value"), f.legend && Array.isArray(f.legend) && (f.legend = { data: f.legend }), f;
|
|
865
|
+
}, J = () => B();
|
|
868
866
|
return X(() => {
|
|
869
|
-
setTimeout(() => P(), 0), window.addEventListener("resize", J), At(p, () =>
|
|
870
|
-
v = m.isIntersecting, v ?
|
|
867
|
+
setTimeout(() => P(), 0), window.addEventListener("resize", J), At(p, () => B()), i.tooltipLoop && zt(p, ([m]) => {
|
|
868
|
+
v = m.isIntersecting, v ? D() : E();
|
|
871
869
|
});
|
|
872
870
|
}), wt(() => {
|
|
873
871
|
window.removeEventListener("resize", J), C(), M();
|
|
874
|
-
}),
|
|
872
|
+
}), L(() => i.option, (m) => {
|
|
875
873
|
if (m)
|
|
876
874
|
try {
|
|
877
875
|
if (!o) {
|
|
878
876
|
P();
|
|
879
877
|
return;
|
|
880
878
|
}
|
|
881
|
-
o.clear(), o.setOption(Z(m), { notMerge: !0 }),
|
|
879
|
+
o.clear(), o.setOption(Z(m), { notMerge: !0 }), j(), a("chart-update", { instance: o, option: m });
|
|
882
880
|
} catch (f) {
|
|
883
881
|
console.error("[hItemChart] update:", f);
|
|
884
882
|
}
|
|
885
883
|
}, { deep: !0 }), t({
|
|
886
884
|
getInstance: () => o,
|
|
887
|
-
resize: () =>
|
|
885
|
+
resize: () => B(),
|
|
888
886
|
dispatchAction: (m) => o == null ? void 0 : o.dispatchAction(m),
|
|
889
887
|
dispose: M,
|
|
890
|
-
startLoop:
|
|
888
|
+
startLoop: j,
|
|
891
889
|
stopLoop: C,
|
|
892
890
|
pauseLoop: E,
|
|
893
|
-
resumeLoop:
|
|
891
|
+
resumeLoop: D
|
|
894
892
|
}), (m, f) => (s(), d("div", {
|
|
895
893
|
class: "h-item-chart",
|
|
896
894
|
ref_key: "itemCharts",
|
|
@@ -900,26 +898,26 @@ const fe = ["src"], ge = {
|
|
|
900
898
|
k.value ? (s(), d("div", {
|
|
901
899
|
key: 0,
|
|
902
900
|
class: "h-item-chart-loading",
|
|
903
|
-
style: h(
|
|
901
|
+
style: h(W.value)
|
|
904
902
|
}, [
|
|
905
|
-
|
|
903
|
+
F("img", {
|
|
906
904
|
src: i.loadingIcon || S(It),
|
|
907
905
|
class: "h-item-chart-loading-icon",
|
|
908
906
|
alt: "loading"
|
|
909
|
-
}, null, 8,
|
|
910
|
-
i.loadingText ? (s(), d("span",
|
|
911
|
-
], 4)) :
|
|
907
|
+
}, null, 8, de),
|
|
908
|
+
i.loadingText ? (s(), d("span", pe, G(i.loadingText), 1)) : A("", !0)
|
|
909
|
+
], 4)) : A("", !0)
|
|
912
910
|
], 4));
|
|
913
911
|
}
|
|
914
|
-
}), ut = /* @__PURE__ */ x(
|
|
912
|
+
}), ut = /* @__PURE__ */ x(fe, [["__scopeId", "data-v-477585e0"]]);
|
|
915
913
|
ut.install = (e) => {
|
|
916
914
|
e.component(ut.name, ut);
|
|
917
915
|
};
|
|
918
|
-
const
|
|
916
|
+
const ge = {
|
|
919
917
|
name: "hList",
|
|
920
918
|
chineseName: "滚动列表",
|
|
921
919
|
description: "支持自动滚动的数据列表组件,适用于大屏数据展示"
|
|
922
|
-
},
|
|
920
|
+
}, he = /* @__PURE__ */ Object.assign(ge, {
|
|
923
921
|
props: {
|
|
924
922
|
// 容器样式
|
|
925
923
|
width: {
|
|
@@ -987,7 +985,7 @@ const me = {
|
|
|
987
985
|
backgroundColor: n.backgroundColor,
|
|
988
986
|
position: "relative",
|
|
989
987
|
overflow: "hidden"
|
|
990
|
-
})),
|
|
988
|
+
})), N = c(() => ({
|
|
991
989
|
height: n.headerHeight,
|
|
992
990
|
display: "flex",
|
|
993
991
|
alignItems: "center",
|
|
@@ -997,12 +995,12 @@ const me = {
|
|
|
997
995
|
left: 0,
|
|
998
996
|
zIndex: 10,
|
|
999
997
|
width: "100%"
|
|
1000
|
-
})),
|
|
998
|
+
})), W = c(() => ({
|
|
1001
999
|
transform: `translateY(-${a.value * b.value}px)`,
|
|
1002
1000
|
transition: `transform ${n.scrollSpeed}ms ease-in-out`,
|
|
1003
1001
|
marginTop: n.showHeader ? n.headerHeight : "0"
|
|
1004
1002
|
})), w = (y) => y === i.value ? n.highlightStyle : {};
|
|
1005
|
-
|
|
1003
|
+
L(a, (y) => {
|
|
1006
1004
|
if (n.data.length > 0) {
|
|
1007
1005
|
const z = y % n.data.length;
|
|
1008
1006
|
i.value = z;
|
|
@@ -1022,11 +1020,11 @@ const me = {
|
|
|
1022
1020
|
v(), _(), window.addEventListener("resize", v);
|
|
1023
1021
|
}), wt(() => {
|
|
1024
1022
|
u(), window.removeEventListener("resize", v);
|
|
1025
|
-
}),
|
|
1023
|
+
}), L(() => n.data, (y) => {
|
|
1026
1024
|
y.length > 0 ? (a.value = 0, i.value = null, setTimeout(() => {
|
|
1027
1025
|
v(), _();
|
|
1028
1026
|
}, 100)) : u();
|
|
1029
|
-
}, { deep: !0 }),
|
|
1027
|
+
}, { deep: !0 }), L(() => n.enableScroll, (y) => {
|
|
1030
1028
|
y ? _() : (u(), a.value = 0);
|
|
1031
1029
|
}), t({
|
|
1032
1030
|
startScroll: _,
|
|
@@ -1042,24 +1040,24 @@ const me = {
|
|
|
1042
1040
|
e.showHeader ? (s(), d("div", {
|
|
1043
1041
|
key: 0,
|
|
1044
1042
|
class: "list-header",
|
|
1045
|
-
style: h(
|
|
1043
|
+
style: h(N.value)
|
|
1046
1044
|
}, [
|
|
1047
|
-
(s(!0), d(U, null, K(e.header, (
|
|
1045
|
+
(s(!0), d(U, null, K(e.header, (j, C) => (s(), d("p", {
|
|
1048
1046
|
key: C,
|
|
1049
1047
|
class: "header-item"
|
|
1050
|
-
}, G(
|
|
1051
|
-
], 4)) :
|
|
1048
|
+
}, G(j), 1))), 128))
|
|
1049
|
+
], 4)) : A("", !0),
|
|
1052
1050
|
e.enableScroll ? (s(), d("div", {
|
|
1053
1051
|
key: 1,
|
|
1054
1052
|
class: "scroll-wrapper",
|
|
1055
|
-
style: h(
|
|
1053
|
+
style: h(W.value)
|
|
1056
1054
|
}, [
|
|
1057
|
-
|
|
1055
|
+
F("div", {
|
|
1058
1056
|
class: "data-list",
|
|
1059
1057
|
ref_key: "listContainer",
|
|
1060
1058
|
ref: o
|
|
1061
1059
|
}, [
|
|
1062
|
-
(s(!0), d(U, null, K(e.data, (
|
|
1060
|
+
(s(!0), d(U, null, K(e.data, (j, C) => (s(), d("div", {
|
|
1063
1061
|
key: C,
|
|
1064
1062
|
class: "data-list-item",
|
|
1065
1063
|
style: h(w(C)),
|
|
@@ -1067,24 +1065,24 @@ const me = {
|
|
|
1067
1065
|
ref_key: "listItems",
|
|
1068
1066
|
ref: p
|
|
1069
1067
|
}, [
|
|
1070
|
-
(s(!0), d(U, null, K(
|
|
1071
|
-
key:
|
|
1068
|
+
(s(!0), d(U, null, K(j, (E, D) => (s(), d("p", {
|
|
1069
|
+
key: D,
|
|
1072
1070
|
class: "data-item-cell"
|
|
1073
1071
|
}, G(E), 1))), 128))
|
|
1074
1072
|
], 4))), 128))
|
|
1075
1073
|
], 512)
|
|
1076
|
-
], 4)) :
|
|
1074
|
+
], 4)) : A("", !0)
|
|
1077
1075
|
], 4));
|
|
1078
1076
|
}
|
|
1079
|
-
}), dt = /* @__PURE__ */ x(
|
|
1077
|
+
}), dt = /* @__PURE__ */ x(he, [["__scopeId", "data-v-937cc59c"]]);
|
|
1080
1078
|
dt.install = (e) => {
|
|
1081
1079
|
e.component(dt.name, dt);
|
|
1082
1080
|
};
|
|
1083
|
-
const
|
|
1081
|
+
const ye = {
|
|
1084
1082
|
name: "hView",
|
|
1085
1083
|
chineseName: "视图",
|
|
1086
1084
|
description: "通用视图容器组件"
|
|
1087
|
-
},
|
|
1085
|
+
}, me = /* @__PURE__ */ Object.assign(ye, {
|
|
1088
1086
|
props: {
|
|
1089
1087
|
url: {
|
|
1090
1088
|
type: String,
|
|
@@ -1164,18 +1162,18 @@ const ve = {
|
|
|
1164
1162
|
class: "h-view",
|
|
1165
1163
|
style: h(S(n))
|
|
1166
1164
|
}, [
|
|
1167
|
-
|
|
1165
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
1168
1166
|
], 4));
|
|
1169
1167
|
}
|
|
1170
|
-
}), pt = /* @__PURE__ */ x(
|
|
1168
|
+
}), pt = /* @__PURE__ */ x(me, [["__scopeId", "data-v-c79a990c"]]);
|
|
1171
1169
|
pt.install = (e) => {
|
|
1172
1170
|
e.component(pt.name, pt);
|
|
1173
1171
|
};
|
|
1174
|
-
const
|
|
1172
|
+
const Se = {
|
|
1175
1173
|
name: "hDataLabel",
|
|
1176
1174
|
chineseName: "数据标签",
|
|
1177
1175
|
description: "数值与文本标签展示组件"
|
|
1178
|
-
},
|
|
1176
|
+
}, ve = /* @__PURE__ */ Object.assign(Se, {
|
|
1179
1177
|
props: {
|
|
1180
1178
|
url: {
|
|
1181
1179
|
type: String,
|
|
@@ -1342,28 +1340,28 @@ const xe = {
|
|
|
1342
1340
|
key: 0,
|
|
1343
1341
|
class: "h-data-label-num",
|
|
1344
1342
|
style: h(S(a))
|
|
1345
|
-
}, G(e.num), 5)) :
|
|
1343
|
+
}, G(e.num), 5)) : A("", !0),
|
|
1346
1344
|
e.show ? (s(), d("span", {
|
|
1347
1345
|
key: 1,
|
|
1348
1346
|
class: "h-data-label-text",
|
|
1349
1347
|
style: h(S(i))
|
|
1350
|
-
}, G(e.text), 5)) :
|
|
1348
|
+
}, G(e.text), 5)) : A("", !0),
|
|
1351
1349
|
e.titleShow ? (s(), d("span", {
|
|
1352
1350
|
key: 2,
|
|
1353
1351
|
class: "h-data-label-title",
|
|
1354
1352
|
style: h(S(b))
|
|
1355
|
-
}, G(e.someText), 5)) :
|
|
1353
|
+
}, G(e.someText), 5)) : A("", !0)
|
|
1356
1354
|
], 4));
|
|
1357
1355
|
}
|
|
1358
|
-
}), ct = /* @__PURE__ */ x(
|
|
1356
|
+
}), ct = /* @__PURE__ */ x(ve, [["__scopeId", "data-v-5b0fbecc"]]);
|
|
1359
1357
|
ct.install = (e) => {
|
|
1360
1358
|
e.component(ct.name, ct);
|
|
1361
1359
|
};
|
|
1362
|
-
const
|
|
1360
|
+
const _e = {
|
|
1363
1361
|
name: "hButton",
|
|
1364
1362
|
chineseName: "按钮",
|
|
1365
1363
|
description: "可自定义样式的按钮组件"
|
|
1366
|
-
},
|
|
1364
|
+
}, xe = /* @__PURE__ */ Object.assign(_e, {
|
|
1367
1365
|
props: {
|
|
1368
1366
|
url: {
|
|
1369
1367
|
type: String,
|
|
@@ -1423,15 +1421,15 @@ const we = {
|
|
|
1423
1421
|
style: h(S(n))
|
|
1424
1422
|
}, G(S(t).text), 5));
|
|
1425
1423
|
}
|
|
1426
|
-
}), ft = /* @__PURE__ */ x(
|
|
1424
|
+
}), ft = /* @__PURE__ */ x(xe, [["__scopeId", "data-v-533f0ead"]]);
|
|
1427
1425
|
ft.install = (e) => {
|
|
1428
1426
|
e.component(ft.name, ft);
|
|
1429
1427
|
};
|
|
1430
|
-
const
|
|
1428
|
+
const be = {
|
|
1431
1429
|
name: "hGrid",
|
|
1432
1430
|
chineseName: "网格布局",
|
|
1433
1431
|
description: "基于 CSS Grid 的网格布局容器"
|
|
1434
|
-
},
|
|
1432
|
+
}, we = /* @__PURE__ */ Object.assign(be, {
|
|
1435
1433
|
props: {
|
|
1436
1434
|
width: {
|
|
1437
1435
|
type: String,
|
|
@@ -1530,18 +1528,18 @@ const Ce = {
|
|
|
1530
1528
|
class: "h-grid",
|
|
1531
1529
|
style: h(S(n))
|
|
1532
1530
|
}, [
|
|
1533
|
-
|
|
1531
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
1534
1532
|
], 4));
|
|
1535
1533
|
}
|
|
1536
|
-
}), gt = /* @__PURE__ */ x(
|
|
1534
|
+
}), gt = /* @__PURE__ */ x(we, [["__scopeId", "data-v-d4038f65"]]);
|
|
1537
1535
|
gt.install = (e) => {
|
|
1538
1536
|
e.component(gt.name, gt);
|
|
1539
1537
|
};
|
|
1540
|
-
const
|
|
1538
|
+
const Ie = {
|
|
1541
1539
|
name: "hCounter",
|
|
1542
1540
|
chineseName: "数字计数器",
|
|
1543
1541
|
description: "支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"
|
|
1544
|
-
},
|
|
1542
|
+
}, Ce = /* @__PURE__ */ Object.assign(Ie, {
|
|
1545
1543
|
props: {
|
|
1546
1544
|
// 数据相关
|
|
1547
1545
|
data: {
|
|
@@ -1702,16 +1700,16 @@ const $e = {
|
|
|
1702
1700
|
a.value[v] = u;
|
|
1703
1701
|
return;
|
|
1704
1702
|
}
|
|
1705
|
-
const y = parseInt(u), z = v * n.digitDelay,
|
|
1703
|
+
const y = parseInt(u), z = v * n.digitDelay, j = n.animationDuration;
|
|
1706
1704
|
setTimeout(() => {
|
|
1707
1705
|
let C = 0;
|
|
1708
|
-
const E =
|
|
1709
|
-
C <= y && (a.value[v] = C, C++, C <= y ? setTimeout(
|
|
1706
|
+
const E = j / (y + 1), D = () => {
|
|
1707
|
+
C <= y && (a.value[v] = C, C++, C <= y ? setTimeout(D, E) : (v === _.length - 1 || _.slice(v + 1).every((B) => isNaN(parseInt(B)))) && (i.value = !1));
|
|
1710
1708
|
};
|
|
1711
|
-
|
|
1709
|
+
D();
|
|
1712
1710
|
}, z);
|
|
1713
1711
|
});
|
|
1714
|
-
},
|
|
1712
|
+
}, N = (_) => {
|
|
1715
1713
|
const u = a.value[_];
|
|
1716
1714
|
if (isNaN(parseInt(u)))
|
|
1717
1715
|
return {
|
|
@@ -1723,7 +1721,7 @@ const $e = {
|
|
|
1723
1721
|
transform: `translateY(${-parseInt(u) * v}px)`,
|
|
1724
1722
|
transition: `transform ${n.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`
|
|
1725
1723
|
};
|
|
1726
|
-
},
|
|
1724
|
+
}, W = c(() => ({
|
|
1727
1725
|
width: n.width,
|
|
1728
1726
|
height: n.height,
|
|
1729
1727
|
backgroundColor: n.backgroundColor,
|
|
@@ -1759,7 +1757,7 @@ const $e = {
|
|
|
1759
1757
|
flexShrink: 0,
|
|
1760
1758
|
lineHeight: "1"
|
|
1761
1759
|
}));
|
|
1762
|
-
return
|
|
1760
|
+
return L(() => n.data, () => {
|
|
1763
1761
|
k();
|
|
1764
1762
|
}), X(() => {
|
|
1765
1763
|
k();
|
|
@@ -1768,36 +1766,36 @@ const $e = {
|
|
|
1768
1766
|
getCurrentValue: () => a.value.join("")
|
|
1769
1767
|
}), (_, u) => (s(), d("div", {
|
|
1770
1768
|
class: "h-counter",
|
|
1771
|
-
style: h(
|
|
1769
|
+
style: h(W.value)
|
|
1772
1770
|
}, [
|
|
1773
1771
|
(s(!0), d(U, null, K(b.value, (v, y) => (s(), d("div", {
|
|
1774
1772
|
key: y,
|
|
1775
1773
|
class: "counter-digit",
|
|
1776
1774
|
style: h(w.value)
|
|
1777
1775
|
}, [
|
|
1778
|
-
|
|
1776
|
+
F("div", {
|
|
1779
1777
|
class: "digit-scroll",
|
|
1780
|
-
style: h(
|
|
1778
|
+
style: h(N(y))
|
|
1781
1779
|
}, [
|
|
1782
|
-
(s(), d(U, null, K(10, (z) =>
|
|
1780
|
+
(s(), d(U, null, K(10, (z) => F("div", {
|
|
1783
1781
|
key: z - 1,
|
|
1784
1782
|
class: "digit-item",
|
|
1785
1783
|
style: h(I.value)
|
|
1786
1784
|
}, G(z - 1), 5)), 64))
|
|
1787
1785
|
], 4)
|
|
1788
1786
|
], 4))), 128)),
|
|
1789
|
-
|
|
1787
|
+
T(_.$slots, "default", {}, void 0, !0)
|
|
1790
1788
|
], 4));
|
|
1791
1789
|
}
|
|
1792
|
-
}), ht = /* @__PURE__ */ x(
|
|
1790
|
+
}), ht = /* @__PURE__ */ x(Ce, [["__scopeId", "data-v-fba32a26"]]);
|
|
1793
1791
|
ht.install = (e) => {
|
|
1794
1792
|
e.component(ht.name, ht);
|
|
1795
1793
|
};
|
|
1796
|
-
const
|
|
1794
|
+
const ke = {
|
|
1797
1795
|
name: "hButtonGroup",
|
|
1798
1796
|
chineseName: "按钮组",
|
|
1799
1797
|
description: "按钮组容器,支持 flex 布局排列"
|
|
1800
|
-
},
|
|
1798
|
+
}, $e = /* @__PURE__ */ Object.assign(ke, {
|
|
1801
1799
|
props: {
|
|
1802
1800
|
width: {
|
|
1803
1801
|
type: String,
|
|
@@ -1867,18 +1865,18 @@ const Te = {
|
|
|
1867
1865
|
class: "h-button-group",
|
|
1868
1866
|
style: h(S(n))
|
|
1869
1867
|
}, [
|
|
1870
|
-
|
|
1868
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
1871
1869
|
], 4));
|
|
1872
1870
|
}
|
|
1873
|
-
}), yt = /* @__PURE__ */ x(
|
|
1871
|
+
}), yt = /* @__PURE__ */ x($e, [["__scopeId", "data-v-f90f2b62"]]);
|
|
1874
1872
|
yt.install = (e) => {
|
|
1875
1873
|
e.component(yt.name, yt);
|
|
1876
1874
|
};
|
|
1877
|
-
const
|
|
1875
|
+
const Ae = {
|
|
1878
1876
|
name: "hText",
|
|
1879
1877
|
chineseName: "文本",
|
|
1880
1878
|
description: "用于显示文本内容"
|
|
1881
|
-
},
|
|
1879
|
+
}, Te = /* @__PURE__ */ Object.assign(Ae, {
|
|
1882
1880
|
props: {
|
|
1883
1881
|
text: {
|
|
1884
1882
|
type: String,
|
|
@@ -1903,15 +1901,15 @@ const ze = {
|
|
|
1903
1901
|
style: h(S(n))
|
|
1904
1902
|
}, G(S(t).text), 5));
|
|
1905
1903
|
}
|
|
1906
|
-
}), mt = /* @__PURE__ */ x(
|
|
1904
|
+
}), mt = /* @__PURE__ */ x(Te, [["__scopeId", "data-v-7fb2fc92"]]);
|
|
1907
1905
|
mt.install = (e) => {
|
|
1908
1906
|
e.component(mt.name, mt);
|
|
1909
1907
|
};
|
|
1910
|
-
const
|
|
1908
|
+
const Ge = {
|
|
1911
1909
|
name: "hLayout",
|
|
1912
1910
|
chineseName: "布局",
|
|
1913
1911
|
description: "页面布局容器"
|
|
1914
|
-
},
|
|
1912
|
+
}, ze = /* @__PURE__ */ Object.assign(Ge, {
|
|
1915
1913
|
props: {
|
|
1916
1914
|
width: {
|
|
1917
1915
|
type: String,
|
|
@@ -1951,18 +1949,18 @@ const je = {
|
|
|
1951
1949
|
class: "h-layout",
|
|
1952
1950
|
style: h(S(n))
|
|
1953
1951
|
}, [
|
|
1954
|
-
|
|
1952
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
1955
1953
|
], 4));
|
|
1956
1954
|
}
|
|
1957
|
-
}), St = /* @__PURE__ */ x(
|
|
1955
|
+
}), St = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-957ea318"]]);
|
|
1958
1956
|
St.install = (e) => {
|
|
1959
1957
|
e.component(St.name, St);
|
|
1960
1958
|
};
|
|
1961
|
-
const
|
|
1959
|
+
const je = {
|
|
1962
1960
|
name: "hFlex",
|
|
1963
1961
|
chineseName: "弹性布局",
|
|
1964
1962
|
description: "基于 CSS Flexbox 的弹性布局容器"
|
|
1965
|
-
},
|
|
1963
|
+
}, De = /* @__PURE__ */ Object.assign(je, {
|
|
1966
1964
|
props: {
|
|
1967
1965
|
width: {
|
|
1968
1966
|
type: String,
|
|
@@ -2017,21 +2015,21 @@ const Le = {
|
|
|
2017
2015
|
class: "h-flex",
|
|
2018
2016
|
style: h(S(n))
|
|
2019
2017
|
}, [
|
|
2020
|
-
|
|
2018
|
+
T(a.$slots, "default", {}, void 0, !0)
|
|
2021
2019
|
], 4));
|
|
2022
2020
|
}
|
|
2023
|
-
}), vt = /* @__PURE__ */ x(
|
|
2021
|
+
}), vt = /* @__PURE__ */ x(De, [["__scopeId", "data-v-6ecd9f03"]]);
|
|
2024
2022
|
vt.install = (e) => {
|
|
2025
2023
|
e.component(vt.name, vt);
|
|
2026
2024
|
};
|
|
2027
|
-
const
|
|
2025
|
+
const Oe = { class: "h-map-wrapper" }, Le = ["src"], Ne = {
|
|
2028
2026
|
key: 0,
|
|
2029
2027
|
class: "h-map-loading-text"
|
|
2030
|
-
},
|
|
2028
|
+
}, Be = {
|
|
2031
2029
|
name: "hMap",
|
|
2032
2030
|
chineseName: "地图",
|
|
2033
2031
|
description: "基于 ECharts 的高自定义地图组件,支持 GeoJSON 注册、多层 geo 叠加、散点标记等"
|
|
2034
|
-
},
|
|
2032
|
+
}, He = /* @__PURE__ */ Object.assign(Be, {
|
|
2035
2033
|
props: {
|
|
2036
2034
|
// 地图注册名,如 'xinjiang'
|
|
2037
2035
|
mapName: {
|
|
@@ -2088,18 +2086,18 @@ const Be = { class: "h-map-wrapper" }, He = ["src"], We = {
|
|
|
2088
2086
|
backgroundSize: "100% 100%",
|
|
2089
2087
|
backgroundRepeat: "no-repeat"
|
|
2090
2088
|
})), k = $(!1);
|
|
2091
|
-
let
|
|
2092
|
-
|
|
2089
|
+
let N = 0;
|
|
2090
|
+
L(() => i.loading, (u) => {
|
|
2093
2091
|
if (u)
|
|
2094
|
-
k.value = !0,
|
|
2092
|
+
k.value = !0, N = Date.now();
|
|
2095
2093
|
else {
|
|
2096
|
-
const v = Date.now() -
|
|
2094
|
+
const v = Date.now() - N, y = (i.loadingMinDuration || 0) - v;
|
|
2097
2095
|
y <= 0 ? k.value = !1 : setTimeout(() => {
|
|
2098
2096
|
k.value = !1;
|
|
2099
2097
|
}, y);
|
|
2100
2098
|
}
|
|
2101
2099
|
}, { immediate: !0 });
|
|
2102
|
-
const
|
|
2100
|
+
const W = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = $t(() => {
|
|
2103
2101
|
p && !p.isDisposed() && p.resize();
|
|
2104
2102
|
}, 100), I = () => {
|
|
2105
2103
|
p && (p.isDisposed() || (p.off("click"), p.off("dblclick"), p.dispose()), p = null);
|
|
@@ -2118,11 +2116,11 @@ const Be = { class: "h-map-wrapper" }, He = ["src"], We = {
|
|
|
2118
2116
|
console.error("[h-map] 初始化失败:", u);
|
|
2119
2117
|
}
|
|
2120
2118
|
};
|
|
2121
|
-
return
|
|
2119
|
+
return L(() => i.mapJson, () => {
|
|
2122
2120
|
Tt(() => {
|
|
2123
2121
|
_();
|
|
2124
2122
|
});
|
|
2125
|
-
}),
|
|
2123
|
+
}), L(() => i.option, (u) => {
|
|
2126
2124
|
if (!(!u || !p || p.isDisposed()))
|
|
2127
2125
|
try {
|
|
2128
2126
|
p.setOption(u, { notMerge: !0 });
|
|
@@ -2142,8 +2140,8 @@ const Be = { class: "h-map-wrapper" }, He = ["src"], We = {
|
|
|
2142
2140
|
resize: () => w(),
|
|
2143
2141
|
dispatchAction: (u) => p == null ? void 0 : p.dispatchAction(u),
|
|
2144
2142
|
dispose: I
|
|
2145
|
-
}), (u, v) => (s(), d("div",
|
|
2146
|
-
|
|
2143
|
+
}), (u, v) => (s(), d("div", Oe, [
|
|
2144
|
+
F("div", {
|
|
2147
2145
|
class: "h-map",
|
|
2148
2146
|
ref_key: "mapContainer",
|
|
2149
2147
|
ref: b,
|
|
@@ -2152,30 +2150,30 @@ const Be = { class: "h-map-wrapper" }, He = ["src"], We = {
|
|
|
2152
2150
|
k.value ? (s(), d("div", {
|
|
2153
2151
|
key: 0,
|
|
2154
2152
|
class: "h-map-loading",
|
|
2155
|
-
style: h(
|
|
2153
|
+
style: h(W.value)
|
|
2156
2154
|
}, [
|
|
2157
|
-
|
|
2155
|
+
F("img", {
|
|
2158
2156
|
src: i.loadingIcon || S(It),
|
|
2159
2157
|
class: "h-map-loading-icon",
|
|
2160
2158
|
alt: "loading"
|
|
2161
|
-
}, null, 8,
|
|
2162
|
-
i.loadingText ? (s(), d("span",
|
|
2163
|
-
], 4)) :
|
|
2159
|
+
}, null, 8, Le),
|
|
2160
|
+
i.loadingText ? (s(), d("span", Ne, G(i.loadingText), 1)) : A("", !0)
|
|
2161
|
+
], 4)) : A("", !0)
|
|
2164
2162
|
]));
|
|
2165
2163
|
}
|
|
2166
|
-
}), _t = /* @__PURE__ */ x(
|
|
2164
|
+
}), _t = /* @__PURE__ */ x(He, [["__scopeId", "data-v-7350dc12"]]);
|
|
2167
2165
|
_t.install = (e) => {
|
|
2168
2166
|
e.component(_t.name, _t);
|
|
2169
2167
|
};
|
|
2170
|
-
const q = $(!1), Ct = $(""),
|
|
2171
|
-
let R = null,
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2168
|
+
const q = $(!1), Ct = $(""), jt = $(""), kt = $("");
|
|
2169
|
+
let R = null, Dt = 0;
|
|
2170
|
+
function Ye(e) {
|
|
2171
|
+
Dt = e;
|
|
2174
2172
|
}
|
|
2175
|
-
function
|
|
2173
|
+
function qe() {
|
|
2176
2174
|
function e(n = {}) {
|
|
2177
|
-
Ct.value = n.text ?? "加载中...",
|
|
2178
|
-
const a = n.duration !== void 0 ? n.duration :
|
|
2175
|
+
Ct.value = n.text ?? "加载中...", jt.value = n.icon ?? "", kt.value = n.bgColor ?? "", q.value = !0, R && clearTimeout(R);
|
|
2176
|
+
const a = n.duration !== void 0 ? n.duration : Dt;
|
|
2179
2177
|
a > 0 && (R = setTimeout(() => {
|
|
2180
2178
|
q.value = !1, R = null;
|
|
2181
2179
|
}, a));
|
|
@@ -2185,49 +2183,49 @@ function Qe() {
|
|
|
2185
2183
|
}
|
|
2186
2184
|
return { show: e, hide: t, visible: q };
|
|
2187
2185
|
}
|
|
2188
|
-
const
|
|
2186
|
+
const We = { class: "h-loading-box" }, Fe = ["src"], Ee = {
|
|
2189
2187
|
key: 0,
|
|
2190
2188
|
class: "h-loading-text"
|
|
2191
|
-
},
|
|
2189
|
+
}, Me = {
|
|
2192
2190
|
name: "hLoading",
|
|
2193
2191
|
chineseName: "全局加载",
|
|
2194
2192
|
description: "页面级全屏 loading 遮罩,支持 router 跳转、页面刷新等场景,通过 useLoading() 全局控制"
|
|
2195
|
-
},
|
|
2193
|
+
}, Re = /* @__PURE__ */ Object.assign(Me, {
|
|
2196
2194
|
setup(e) {
|
|
2197
|
-
const t = c(() =>
|
|
2198
|
-
return (a, i) => (s(), Gt(
|
|
2199
|
-
|
|
2200
|
-
default:
|
|
2195
|
+
const t = c(() => jt.value || It), n = c(() => kt.value ? { background: kt.value } : {});
|
|
2196
|
+
return (a, i) => (s(), Gt(Bt, { to: "body" }, [
|
|
2197
|
+
Ht(Wt, { name: "h-loading-fade" }, {
|
|
2198
|
+
default: Ft(() => [
|
|
2201
2199
|
S(q) ? (s(), d("div", {
|
|
2202
2200
|
key: 0,
|
|
2203
2201
|
class: "h-loading",
|
|
2204
2202
|
style: h(n.value)
|
|
2205
2203
|
}, [
|
|
2206
|
-
|
|
2207
|
-
|
|
2204
|
+
F("div", We, [
|
|
2205
|
+
F("img", {
|
|
2208
2206
|
src: t.value,
|
|
2209
2207
|
class: "h-loading-icon",
|
|
2210
2208
|
alt: "loading"
|
|
2211
|
-
}, null, 8,
|
|
2212
|
-
S(Ct) ? (s(), d("span",
|
|
2209
|
+
}, null, 8, Fe),
|
|
2210
|
+
S(Ct) ? (s(), d("span", Ee, G(S(Ct)), 1)) : A("", !0)
|
|
2213
2211
|
])
|
|
2214
|
-
], 4)) :
|
|
2212
|
+
], 4)) : A("", !0)
|
|
2215
2213
|
]),
|
|
2216
2214
|
_: 1
|
|
2217
2215
|
})
|
|
2218
2216
|
]));
|
|
2219
2217
|
}
|
|
2220
|
-
}), xt = /* @__PURE__ */ x(
|
|
2218
|
+
}), xt = /* @__PURE__ */ x(Re, [["__scopeId", "data-v-ae6739ea"]]);
|
|
2221
2219
|
xt.install = (e) => {
|
|
2222
2220
|
e.component(xt.name, xt);
|
|
2223
2221
|
};
|
|
2224
|
-
const
|
|
2222
|
+
const Pe = (e) => {
|
|
2225
2223
|
e.use(tt), e.use(et), e.use(St), e.use(nt), e.use(it), e.use(at), e.use(ot), e.use(rt), e.use(lt), e.use(st), e.use(Q), e.use(ut), e.use(dt), e.use(pt), e.use(ct), e.use(ft), e.use(gt), e.use(ht), e.use(yt), e.use(mt), e.use(vt), e.use(_t), e.use(xt);
|
|
2226
|
-
},
|
|
2227
|
-
install:
|
|
2224
|
+
}, Ue = {
|
|
2225
|
+
install: Pe
|
|
2228
2226
|
};
|
|
2229
2227
|
export {
|
|
2230
|
-
|
|
2228
|
+
Ue as default,
|
|
2231
2229
|
st as hBottom,
|
|
2232
2230
|
ft as hButton,
|
|
2233
2231
|
yt as hButtonGroup,
|
|
@@ -2251,6 +2249,6 @@ export {
|
|
|
2251
2249
|
mt as hText,
|
|
2252
2250
|
lt as hTop,
|
|
2253
2251
|
pt as hView,
|
|
2254
|
-
|
|
2255
|
-
|
|
2252
|
+
Ye as setDefaultDuration,
|
|
2253
|
+
qe as useLoading
|
|
2256
2254
|
};
|