hamster-charts 0.6.0 → 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.
@@ -1,16 +1,16 @@
1
- import { computed as c, openBlock as s, createElementBlock as d, normalizeStyle as h, unref as S, renderSlot as A, toDisplayString as G, createCommentVNode as T, createElementVNode as j, ref as k, useSlots as Ot, watch as N, onMounted as X, onBeforeUnmount as wt, createBlock as Gt, normalizeProps as Lt, mergeProps as Nt, withDirectives as Bt, vShow as Ht, Fragment as U, renderList as K, nextTick as Tt, Teleport as Wt, createVNode as Ft, Transition as Et, withCtx as Mt } from "vue";
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
- import { useDebounceFn as kt, useResizeObserver as At, useIntersectionObserver as zt } from "@vueuse/core";
3
+ import { useDebounceFn as $t, useResizeObserver as At, useIntersectionObserver as zt } from "@vueuse/core";
4
4
  const x = (e, t) => {
5
5
  const n = e.__vccOpts || e;
6
6
  for (const [a, i] of t)
7
7
  n[a] = i;
8
8
  return n;
9
- }, Rt = {
9
+ }, Et = {
10
10
  name: "hPanel",
11
11
  chineseName: "面板",
12
12
  description: "页面主体容器"
13
- }, Pt = /* @__PURE__ */ Object.assign(Rt, {
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
- A(a.$slots, "default", {}, void 0, !0)
34
+ T(a.$slots, "default", {}, void 0, !0)
35
35
  ], 4));
36
36
  }
37
- }), tt = /* @__PURE__ */ x(Pt, [["__scopeId", "data-v-474190fc"]]);
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 Jt = {
41
+ const Rt = {
42
42
  name: "hHeader",
43
43
  chineseName: "标题",
44
44
  description: "页面标题容器"
45
- }, Vt = /* @__PURE__ */ Object.assign(Jt, {
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)) : T("", !0),
114
- A(i.$slots, "default", {}, void 0, !0)
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(Vt, [["__scopeId", "data-v-b83cf769"]]);
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 Yt = {
121
+ const Jt = {
122
122
  name: "hMain",
123
123
  chineseName: "主内容区",
124
124
  description: "页面主内容工作区"
125
- }, qt = /* @__PURE__ */ Object.assign(Yt, {
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
- A(a.$slots, "default", {}, void 0, !0)
160
+ T(a.$slots, "default", {}, void 0, !0)
161
161
  ], 4));
162
162
  }
163
- }), nt = /* @__PURE__ */ x(qt, [["__scopeId", "data-v-1025786b"]]);
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 Ut = { class: "def-text" }, Kt = {
167
+ const Yt = { class: "def-text" }, qt = {
168
168
  name: "hChartTitle",
169
169
  chineseName: "图表标题",
170
170
  description: "图表标题组件"
171
- }, Qt = /* @__PURE__ */ Object.assign(Kt, {
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
- j("span", Ut, G(S(t).text), 1),
251
- A(a.$slots, "default", {}, void 0, !0)
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(Qt, [["__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", Xt = { class: "chart-wrapper" }, Zt = ["src"], te = {
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
- }, ee = {
257
+ }, Xt = {
258
258
  name: "hChart",
259
259
  chineseName: "图表",
260
260
  description: "基于 ECharts 的图表容器组件,支持自适应和事件交互"
261
- }, ne = /* @__PURE__ */ Object.assign(ee, {
261
+ }, Zt = /* @__PURE__ */ Object.assign(Xt, {
262
262
  props: {
263
263
  height: {
264
264
  type: String,
@@ -344,11 +344,11 @@ const Ut = { class: "def-text" }, Kt = {
344
344
  backgroundImage: i.url ? `url(${i.url})` : "none",
345
345
  flex: i.flex,
346
346
  height: i.height
347
- })), p = k(null);
347
+ })), p = $(null);
348
348
  let o = null;
349
- const $ = Ot(), B = c(() => !!$.default), F = c(() => i.title ? typeof i.title == "string" ? { text: i.title } : i.title : null), w = k(!1);
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
- N(() => i.loading, (l) => {
351
+ L(() => i.loading, (l) => {
352
352
  if (l)
353
353
  w.value = !0, I = Date.now();
354
354
  else {
@@ -370,37 +370,37 @@ const Ut = { class: "def-text" }, Kt = {
370
370
  pauseOnHover: l.pauseOnHover ?? !0
371
371
  };
372
372
  });
373
- let v = null, y = 0, z = !1, D = !0;
373
+ let v = null, y = 0, z = !1, j = !0;
374
374
  const C = () => {
375
375
  var l, r;
376
376
  try {
377
377
  const g = (l = i.option) == null ? void 0 : l.series;
378
378
  if (!g || !Array.isArray(g)) return 0;
379
- const L = g[((r = u.value) == null ? void 0 : r.seriesIndex) ?? 0];
380
- return L != null && L.data ? L.data.length : 0;
379
+ const O = g[((r = u.value) == null ? void 0 : r.seriesIndex) ?? 0];
380
+ return O != null && O.data ? O.data.length : 0;
381
381
  } catch {
382
382
  return 0;
383
383
  }
384
384
  }, E = () => {
385
- if (!o || !u.value || z || !D) return;
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 : H()));
388
- }, O = () => {
389
- H(), !(!u.value || C() === 0) && (y = 0, v = setInterval(E, u.value.interval));
390
- }, H = () => {
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;
394
394
  }, M = () => {
395
395
  z = !1;
396
- }, P = kt(() => {
396
+ }, P = $t(() => {
397
397
  o && (o.resize(), a("chart-resize", { instance: o }));
398
398
  }, 100), Z = () => {
399
399
  var r;
400
400
  if (!o) return;
401
401
  ["click", "dblclick", "mouseover", "mouseout"].forEach((g) => {
402
- o.on(g, (L) => {
403
- a(`chart-${g}`, L);
402
+ o.on(g, (O) => {
403
+ a(`chart-${g}`, O);
404
404
  });
405
405
  }), (r = u.value) != null && r.pauseOnHover && (o.on("mouseover", () => {
406
406
  V();
@@ -408,7 +408,7 @@ const Ut = { class: "def-text" }, Kt = {
408
408
  M();
409
409
  }));
410
410
  }, J = () => {
411
- o && (H(), ["click", "dblclick", "mouseover", "mouseout"].forEach((r) => {
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
- }), O();
421
+ }), D();
422
422
  } catch (l) {
423
423
  console.error("ECharts initialization failed:", l);
424
424
  }
@@ -429,16 +429,16 @@ const Ut = { class: "def-text" }, Kt = {
429
429
  return r.series ? Array.isArray(r.series) || (r.series = [r.series]) : r.series = [], r.series = r.series.map((g) => {
430
430
  if (!g || typeof g != "object")
431
431
  return { type: "line" };
432
- const L = {
432
+ const O = {
433
433
  type: "line",
434
434
  ...g,
435
435
  type: g.type || "line"
436
436
  };
437
- return L.type === "pie" && L.data && (L.data = L.data.map((Y) => typeof Y == "object" && Y !== null ? {
437
+ return O.type === "pie" && O.data && (O.data = O.data.map((Y) => typeof Y == "object" && Y !== null ? {
438
438
  type: "line",
439
439
  ...Y,
440
440
  type: Y.type || "line"
441
- } : Y)), L;
441
+ } : Y)), O;
442
442
  }), r.xAxis ? Array.isArray(r.xAxis) ? r.xAxis = r.xAxis.map((g) => !g || typeof g != "object" ? { type: "category" } : {
443
443
  type: "category",
444
444
  ...g,
@@ -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
- }, W = () => {
461
+ }, H = () => {
462
462
  P();
463
463
  };
464
464
  return X(() => {
465
465
  setTimeout(() => {
466
466
  m();
467
- }, 0), window.addEventListener("resize", W), At(p, (l) => {
467
+ }, 0), window.addEventListener("resize", H), At(p, (l) => {
468
468
  P();
469
469
  }), i.tooltipLoop && zt(p, ([l]) => {
470
- D = l.isIntersecting, D ? M() : V();
470
+ j = l.isIntersecting, j ? M() : V();
471
471
  });
472
472
  }), wt(() => {
473
- window.removeEventListener("resize", W), H(), J();
474
- }), N(() => i.option, (l, r) => {
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 }), O(), a("chart-update", {
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 }), N(() => i.showChart, (l) => {
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: O,
500
- stopLoop: H,
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
- B.value ? A(l.$slots, "default", { key: 0 }, void 0, !0) : F.value && i.showTitle ? (s(), Gt(Q, Lt(Nt({ key: 1 }, F.value)), null, 16)) : T("", !0),
508
- j("div", Xt, [
509
- Bt(j("div", {
510
- class: "chart",
511
- ref_key: "charts",
512
- ref: p
513
- }, null, 512), [
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
- j("img", {
519
+ F("img", {
522
520
  src: i.loadingIcon || S(It),
523
521
  class: "loading-icon",
524
522
  alt: "loading"
525
- }, null, 8, Zt),
526
- i.loadingText ? (s(), d("span", te, G(i.loadingText), 1)) : T("", !0)
527
- ], 4)) : T("", !0)
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(ne, [["__scopeId", "data-v-c9b75a2f"]]);
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 ie = {
533
+ const te = {
536
534
  name: "hLeft",
537
535
  chineseName: "左侧",
538
536
  description: "页面左侧容器"
539
- }, ae = /* @__PURE__ */ Object.assign(ie, {
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
- A(a.$slots, "default", {}, void 0, !0)
572
+ T(a.$slots, "default", {}, void 0, !0)
575
573
  ], 4));
576
574
  }
577
- }), at = /* @__PURE__ */ x(ae, [["__scopeId", "data-v-7d94e3d8"]]);
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 oe = {
579
+ const ne = {
582
580
  name: "hRight",
583
581
  chineseName: "右侧",
584
582
  description: "页面右侧容器"
585
- }, re = /* @__PURE__ */ Object.assign(oe, {
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
- A(a.$slots, "default", {}, void 0, !0)
618
+ T(a.$slots, "default", {}, void 0, !0)
621
619
  ], 4));
622
620
  }
623
- }), ot = /* @__PURE__ */ x(re, [["__scopeId", "data-v-8ef316d0"]]);
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 le = {
625
+ const ae = {
628
626
  name: "hCenter",
629
627
  chineseName: "居中布局",
630
628
  description: "水平居中布局容器"
631
- }, se = /* @__PURE__ */ Object.assign(le, {
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
- A(a.$slots, "default", {}, void 0, !0)
669
+ T(a.$slots, "default", {}, void 0, !0)
672
670
  ], 4));
673
671
  }
674
- }), rt = /* @__PURE__ */ x(se, [["__scopeId", "data-v-69a501ea"]]);
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 ue = {
676
+ const re = {
679
677
  name: "hTop",
680
678
  chineseName: "顶部",
681
679
  description: "页面顶部容器"
682
- }, de = /* @__PURE__ */ Object.assign(ue, {
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
- A(a.$slots, "default", {}, void 0, !0)
705
+ T(a.$slots, "default", {}, void 0, !0)
708
706
  ], 4));
709
707
  }
710
- }), lt = /* @__PURE__ */ x(de, [["__scopeId", "data-v-ee9ecf79"]]);
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 pe = {
712
+ const se = {
715
713
  name: "hBottom",
716
714
  chineseName: "底部",
717
715
  description: "页面底部容器"
718
- }, ce = /* @__PURE__ */ Object.assign(pe, {
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
- A(a.$slots, "default", {}, void 0, !0)
751
+ T(a.$slots, "default", {}, void 0, !0)
754
752
  ], 4));
755
753
  }
756
- }), st = /* @__PURE__ */ x(ce, [["__scopeId", "data-v-9fc5eff9"]]);
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 fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
761
+ const de = ["src"], pe = {
764
762
  key: 0,
765
763
  class: "h-item-chart-loading-text"
766
- }, ye = {
764
+ }, ce = {
767
765
  name: "hItemChart",
768
766
  chineseName: "独立图表",
769
767
  description: "独立的 ECharts 图表容器组件,支持 loading、tooltip 轮播,适用于大屏数据可视化展示"
770
- }, me = /* @__PURE__ */ Object.assign(ye, {
768
+ }, fe = /* @__PURE__ */ Object.assign(ce, {
771
769
  props: {
772
770
  height: { type: String, default: "200px" },
773
771
  url: { type: String, default: "" },
@@ -794,21 +792,21 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
794
792
  const a = n, i = e, b = c(() => ({
795
793
  backgroundImage: i.url ? `url(${i.url})` : "none",
796
794
  height: i.height
797
- })), p = k(null);
795
+ })), p = $(null);
798
796
  let o = null;
799
- const $ = k(!1);
800
- let B = 0;
801
- N(() => i.loading, (m) => {
797
+ const k = $(!1);
798
+ let N = 0;
799
+ L(() => i.loading, (m) => {
802
800
  if (m)
803
- $.value = !0, B = Date.now();
801
+ k.value = !0, N = Date.now();
804
802
  else {
805
- const f = (i.loadingMinDuration || 0) - (Date.now() - B);
806
- f <= 0 ? $.value = !1 : setTimeout(() => {
807
- $.value = !1;
803
+ const f = (i.loadingMinDuration || 0) - (Date.now() - N);
804
+ f <= 0 ? k.value = !1 : setTimeout(() => {
805
+ k.value = !1;
808
806
  }, f);
809
807
  }
810
808
  }, { immediate: !0 });
811
- const F = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = c(() => {
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 = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
816
814
  });
817
815
  let I = null, _ = 0, u = !1, v = !0;
818
816
  const y = () => {
819
- var m, f, W;
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 ((W = r == null ? void 0 : r.data) == null ? void 0 : W.length) ?? 0;
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 = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
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
- }, D = () => {
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
- }, O = () => {
836
+ }, D = () => {
839
837
  u = !1;
840
- }, H = kt(() => {
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((W) => o.on(W, (l) => a(`chart-${W}`, l))), (f = w.value) != null && f.pauseOnHover && (o.on("mouseover", () => E()), o.on("mouseout", () => O()));
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 }), D();
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,67 +858,66 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
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 W = (l, r) => {
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 W("xAxis", "category"), W("yAxis", "value"), f.legend && Array.isArray(f.legend) && (f.legend = { data: f.legend }), f;
867
- }, J = () => H();
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, () => H()), i.tooltipLoop && zt(p, ([m]) => {
870
- v = m.isIntersecting, v ? O() : E();
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
- }), N(() => i.option, (m) => {
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 }), D(), a("chart-update", { instance: o, option: m });
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: () => H(),
885
+ resize: () => B(),
888
886
  dispatchAction: (m) => o == null ? void 0 : o.dispatchAction(m),
889
887
  dispose: M,
890
- startLoop: D,
888
+ startLoop: j,
891
889
  stopLoop: C,
892
890
  pauseLoop: E,
893
- resumeLoop: O
894
- }), (m, f) => (s(), d("div", fe, [
895
- j("div", {
896
- class: "h-item-chart",
897
- ref_key: "itemCharts",
898
- ref: p,
899
- style: h(b.value)
900
- }, null, 4),
901
- $.value ? (s(), d("div", {
891
+ resumeLoop: D
892
+ }), (m, f) => (s(), d("div", {
893
+ class: "h-item-chart",
894
+ ref_key: "itemCharts",
895
+ ref: p,
896
+ style: h(b.value)
897
+ }, [
898
+ k.value ? (s(), d("div", {
902
899
  key: 0,
903
900
  class: "h-item-chart-loading",
904
- style: h(F.value)
901
+ style: h(W.value)
905
902
  }, [
906
- j("img", {
903
+ F("img", {
907
904
  src: i.loadingIcon || S(It),
908
905
  class: "h-item-chart-loading-icon",
909
906
  alt: "loading"
910
- }, null, 8, ge),
911
- i.loadingText ? (s(), d("span", he, G(i.loadingText), 1)) : T("", !0)
912
- ], 4)) : T("", !0)
913
- ]));
907
+ }, null, 8, de),
908
+ i.loadingText ? (s(), d("span", pe, G(i.loadingText), 1)) : A("", !0)
909
+ ], 4)) : A("", !0)
910
+ ], 4));
914
911
  }
915
- }), ut = /* @__PURE__ */ x(me, [["__scopeId", "data-v-4585b2db"]]);
912
+ }), ut = /* @__PURE__ */ x(fe, [["__scopeId", "data-v-477585e0"]]);
916
913
  ut.install = (e) => {
917
914
  e.component(ut.name, ut);
918
915
  };
919
- const Se = {
916
+ const ge = {
920
917
  name: "hList",
921
918
  chineseName: "滚动列表",
922
919
  description: "支持自动滚动的数据列表组件,适用于大屏数据展示"
923
- }, ve = /* @__PURE__ */ Object.assign(Se, {
920
+ }, he = /* @__PURE__ */ Object.assign(ge, {
924
921
  props: {
925
922
  // 容器样式
926
923
  width: {
@@ -982,13 +979,13 @@ const Se = {
982
979
  }
983
980
  },
984
981
  setup(e, { expose: t }) {
985
- const n = e, a = k(0), i = k(null), b = k(0), p = k([]), o = k(null), $ = c(() => ({
982
+ const n = e, a = $(0), i = $(null), b = $(0), p = $([]), o = $(null), k = c(() => ({
986
983
  width: n.width,
987
984
  height: n.height,
988
985
  backgroundColor: n.backgroundColor,
989
986
  position: "relative",
990
987
  overflow: "hidden"
991
- })), B = c(() => ({
988
+ })), N = c(() => ({
992
989
  height: n.headerHeight,
993
990
  display: "flex",
994
991
  alignItems: "center",
@@ -998,12 +995,12 @@ const Se = {
998
995
  left: 0,
999
996
  zIndex: 10,
1000
997
  width: "100%"
1001
- })), F = c(() => ({
998
+ })), W = c(() => ({
1002
999
  transform: `translateY(-${a.value * b.value}px)`,
1003
1000
  transition: `transform ${n.scrollSpeed}ms ease-in-out`,
1004
1001
  marginTop: n.showHeader ? n.headerHeight : "0"
1005
1002
  })), w = (y) => y === i.value ? n.highlightStyle : {};
1006
- N(a, (y) => {
1003
+ L(a, (y) => {
1007
1004
  if (n.data.length > 0) {
1008
1005
  const z = y % n.data.length;
1009
1006
  i.value = z;
@@ -1023,11 +1020,11 @@ const Se = {
1023
1020
  v(), _(), window.addEventListener("resize", v);
1024
1021
  }), wt(() => {
1025
1022
  u(), window.removeEventListener("resize", v);
1026
- }), N(() => n.data, (y) => {
1023
+ }), L(() => n.data, (y) => {
1027
1024
  y.length > 0 ? (a.value = 0, i.value = null, setTimeout(() => {
1028
1025
  v(), _();
1029
1026
  }, 100)) : u();
1030
- }, { deep: !0 }), N(() => n.enableScroll, (y) => {
1027
+ }, { deep: !0 }), L(() => n.enableScroll, (y) => {
1031
1028
  y ? _() : (u(), a.value = 0);
1032
1029
  }), t({
1033
1030
  startScroll: _,
@@ -1038,29 +1035,29 @@ const Se = {
1038
1035
  }
1039
1036
  }), (y, z) => (s(), d("div", {
1040
1037
  class: "h-list",
1041
- style: h($.value)
1038
+ style: h(k.value)
1042
1039
  }, [
1043
1040
  e.showHeader ? (s(), d("div", {
1044
1041
  key: 0,
1045
1042
  class: "list-header",
1046
- style: h(B.value)
1043
+ style: h(N.value)
1047
1044
  }, [
1048
- (s(!0), d(U, null, K(e.header, (D, C) => (s(), d("p", {
1045
+ (s(!0), d(U, null, K(e.header, (j, C) => (s(), d("p", {
1049
1046
  key: C,
1050
1047
  class: "header-item"
1051
- }, G(D), 1))), 128))
1052
- ], 4)) : T("", !0),
1048
+ }, G(j), 1))), 128))
1049
+ ], 4)) : A("", !0),
1053
1050
  e.enableScroll ? (s(), d("div", {
1054
1051
  key: 1,
1055
1052
  class: "scroll-wrapper",
1056
- style: h(F.value)
1053
+ style: h(W.value)
1057
1054
  }, [
1058
- j("div", {
1055
+ F("div", {
1059
1056
  class: "data-list",
1060
1057
  ref_key: "listContainer",
1061
1058
  ref: o
1062
1059
  }, [
1063
- (s(!0), d(U, null, K(e.data, (D, C) => (s(), d("div", {
1060
+ (s(!0), d(U, null, K(e.data, (j, C) => (s(), d("div", {
1064
1061
  key: C,
1065
1062
  class: "data-list-item",
1066
1063
  style: h(w(C)),
@@ -1068,24 +1065,24 @@ const Se = {
1068
1065
  ref_key: "listItems",
1069
1066
  ref: p
1070
1067
  }, [
1071
- (s(!0), d(U, null, K(D, (E, O) => (s(), d("p", {
1072
- key: O,
1068
+ (s(!0), d(U, null, K(j, (E, D) => (s(), d("p", {
1069
+ key: D,
1073
1070
  class: "data-item-cell"
1074
1071
  }, G(E), 1))), 128))
1075
1072
  ], 4))), 128))
1076
1073
  ], 512)
1077
- ], 4)) : T("", !0)
1074
+ ], 4)) : A("", !0)
1078
1075
  ], 4));
1079
1076
  }
1080
- }), dt = /* @__PURE__ */ x(ve, [["__scopeId", "data-v-937cc59c"]]);
1077
+ }), dt = /* @__PURE__ */ x(he, [["__scopeId", "data-v-937cc59c"]]);
1081
1078
  dt.install = (e) => {
1082
1079
  e.component(dt.name, dt);
1083
1080
  };
1084
- const _e = {
1081
+ const ye = {
1085
1082
  name: "hView",
1086
1083
  chineseName: "视图",
1087
1084
  description: "通用视图容器组件"
1088
- }, xe = /* @__PURE__ */ Object.assign(_e, {
1085
+ }, me = /* @__PURE__ */ Object.assign(ye, {
1089
1086
  props: {
1090
1087
  url: {
1091
1088
  type: String,
@@ -1165,18 +1162,18 @@ const _e = {
1165
1162
  class: "h-view",
1166
1163
  style: h(S(n))
1167
1164
  }, [
1168
- A(a.$slots, "default", {}, void 0, !0)
1165
+ T(a.$slots, "default", {}, void 0, !0)
1169
1166
  ], 4));
1170
1167
  }
1171
- }), pt = /* @__PURE__ */ x(xe, [["__scopeId", "data-v-c79a990c"]]);
1168
+ }), pt = /* @__PURE__ */ x(me, [["__scopeId", "data-v-c79a990c"]]);
1172
1169
  pt.install = (e) => {
1173
1170
  e.component(pt.name, pt);
1174
1171
  };
1175
- const be = {
1172
+ const Se = {
1176
1173
  name: "hDataLabel",
1177
1174
  chineseName: "数据标签",
1178
1175
  description: "数值与文本标签展示组件"
1179
- }, we = /* @__PURE__ */ Object.assign(be, {
1176
+ }, ve = /* @__PURE__ */ Object.assign(Se, {
1180
1177
  props: {
1181
1178
  url: {
1182
1179
  type: String,
@@ -1343,28 +1340,28 @@ const be = {
1343
1340
  key: 0,
1344
1341
  class: "h-data-label-num",
1345
1342
  style: h(S(a))
1346
- }, G(e.num), 5)) : T("", !0),
1343
+ }, G(e.num), 5)) : A("", !0),
1347
1344
  e.show ? (s(), d("span", {
1348
1345
  key: 1,
1349
1346
  class: "h-data-label-text",
1350
1347
  style: h(S(i))
1351
- }, G(e.text), 5)) : T("", !0),
1348
+ }, G(e.text), 5)) : A("", !0),
1352
1349
  e.titleShow ? (s(), d("span", {
1353
1350
  key: 2,
1354
1351
  class: "h-data-label-title",
1355
1352
  style: h(S(b))
1356
- }, G(e.someText), 5)) : T("", !0)
1353
+ }, G(e.someText), 5)) : A("", !0)
1357
1354
  ], 4));
1358
1355
  }
1359
- }), ct = /* @__PURE__ */ x(we, [["__scopeId", "data-v-5b0fbecc"]]);
1356
+ }), ct = /* @__PURE__ */ x(ve, [["__scopeId", "data-v-5b0fbecc"]]);
1360
1357
  ct.install = (e) => {
1361
1358
  e.component(ct.name, ct);
1362
1359
  };
1363
- const Ie = {
1360
+ const _e = {
1364
1361
  name: "hButton",
1365
1362
  chineseName: "按钮",
1366
1363
  description: "可自定义样式的按钮组件"
1367
- }, Ce = /* @__PURE__ */ Object.assign(Ie, {
1364
+ }, xe = /* @__PURE__ */ Object.assign(_e, {
1368
1365
  props: {
1369
1366
  url: {
1370
1367
  type: String,
@@ -1424,15 +1421,15 @@ const Ie = {
1424
1421
  style: h(S(n))
1425
1422
  }, G(S(t).text), 5));
1426
1423
  }
1427
- }), ft = /* @__PURE__ */ x(Ce, [["__scopeId", "data-v-533f0ead"]]);
1424
+ }), ft = /* @__PURE__ */ x(xe, [["__scopeId", "data-v-533f0ead"]]);
1428
1425
  ft.install = (e) => {
1429
1426
  e.component(ft.name, ft);
1430
1427
  };
1431
- const $e = {
1428
+ const be = {
1432
1429
  name: "hGrid",
1433
1430
  chineseName: "网格布局",
1434
1431
  description: "基于 CSS Grid 的网格布局容器"
1435
- }, ke = /* @__PURE__ */ Object.assign($e, {
1432
+ }, we = /* @__PURE__ */ Object.assign(be, {
1436
1433
  props: {
1437
1434
  width: {
1438
1435
  type: String,
@@ -1531,18 +1528,18 @@ const $e = {
1531
1528
  class: "h-grid",
1532
1529
  style: h(S(n))
1533
1530
  }, [
1534
- A(a.$slots, "default", {}, void 0, !0)
1531
+ T(a.$slots, "default", {}, void 0, !0)
1535
1532
  ], 4));
1536
1533
  }
1537
- }), gt = /* @__PURE__ */ x(ke, [["__scopeId", "data-v-d4038f65"]]);
1534
+ }), gt = /* @__PURE__ */ x(we, [["__scopeId", "data-v-d4038f65"]]);
1538
1535
  gt.install = (e) => {
1539
1536
  e.component(gt.name, gt);
1540
1537
  };
1541
- const Ae = {
1538
+ const Ie = {
1542
1539
  name: "hCounter",
1543
1540
  chineseName: "数字计数器",
1544
1541
  description: "支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"
1545
- }, Te = /* @__PURE__ */ Object.assign(Ae, {
1542
+ }, Ce = /* @__PURE__ */ Object.assign(Ie, {
1546
1543
  props: {
1547
1544
  // 数据相关
1548
1545
  data: {
@@ -1682,7 +1679,7 @@ const Ae = {
1682
1679
  }
1683
1680
  },
1684
1681
  setup(e, { expose: t }) {
1685
- const n = e, a = k([]), i = k(!1), b = c(() => {
1682
+ const n = e, a = $([]), i = $(!1), b = c(() => {
1686
1683
  let _ = n.data;
1687
1684
  n.decimalPlaces >= 0 && typeof _ == "number" && (_ = _.toFixed(n.decimalPlaces));
1688
1685
  let u = String(_);
@@ -1691,7 +1688,7 @@ const Ae = {
1691
1688
  v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, n.separator), u = v.join(".");
1692
1689
  }
1693
1690
  return n.prefix && (u = n.prefix + u), n.suffix && (u = u + n.suffix), u.split("");
1694
- }), p = c(() => n.digitWidth ? n.digitWidth : `${(parseInt(n.digitFontSize) || 32) * 1.2}px`), o = c(() => n.digitHeight ? n.digitHeight : `${(parseInt(n.digitFontSize) || 32) * 1.5}px`), $ = () => {
1691
+ }), p = c(() => n.digitWidth ? n.digitWidth : `${(parseInt(n.digitFontSize) || 32) * 1.2}px`), o = c(() => n.digitHeight ? n.digitHeight : `${(parseInt(n.digitFontSize) || 32) * 1.5}px`), k = () => {
1695
1692
  if (!n.enableAnimation) {
1696
1693
  a.value = b.value.map(() => 0);
1697
1694
  return;
@@ -1703,16 +1700,16 @@ const Ae = {
1703
1700
  a.value[v] = u;
1704
1701
  return;
1705
1702
  }
1706
- const y = parseInt(u), z = v * n.digitDelay, D = n.animationDuration;
1703
+ const y = parseInt(u), z = v * n.digitDelay, j = n.animationDuration;
1707
1704
  setTimeout(() => {
1708
1705
  let C = 0;
1709
- const E = D / (y + 1), O = () => {
1710
- C <= y && (a.value[v] = C, C++, C <= y ? setTimeout(O, E) : (v === _.length - 1 || _.slice(v + 1).every((H) => isNaN(parseInt(H)))) && (i.value = !1));
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));
1711
1708
  };
1712
- O();
1709
+ D();
1713
1710
  }, z);
1714
1711
  });
1715
- }, B = (_) => {
1712
+ }, N = (_) => {
1716
1713
  const u = a.value[_];
1717
1714
  if (isNaN(parseInt(u)))
1718
1715
  return {
@@ -1724,7 +1721,7 @@ const Ae = {
1724
1721
  transform: `translateY(${-parseInt(u) * v}px)`,
1725
1722
  transition: `transform ${n.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`
1726
1723
  };
1727
- }, F = c(() => ({
1724
+ }, W = c(() => ({
1728
1725
  width: n.width,
1729
1726
  height: n.height,
1730
1727
  backgroundColor: n.backgroundColor,
@@ -1760,45 +1757,45 @@ const Ae = {
1760
1757
  flexShrink: 0,
1761
1758
  lineHeight: "1"
1762
1759
  }));
1763
- return N(() => n.data, () => {
1764
- $();
1760
+ return L(() => n.data, () => {
1761
+ k();
1765
1762
  }), X(() => {
1766
- $();
1763
+ k();
1767
1764
  }), t({
1768
- restart: $,
1765
+ restart: k,
1769
1766
  getCurrentValue: () => a.value.join("")
1770
1767
  }), (_, u) => (s(), d("div", {
1771
1768
  class: "h-counter",
1772
- style: h(F.value)
1769
+ style: h(W.value)
1773
1770
  }, [
1774
1771
  (s(!0), d(U, null, K(b.value, (v, y) => (s(), d("div", {
1775
1772
  key: y,
1776
1773
  class: "counter-digit",
1777
1774
  style: h(w.value)
1778
1775
  }, [
1779
- j("div", {
1776
+ F("div", {
1780
1777
  class: "digit-scroll",
1781
- style: h(B(y))
1778
+ style: h(N(y))
1782
1779
  }, [
1783
- (s(), d(U, null, K(10, (z) => j("div", {
1780
+ (s(), d(U, null, K(10, (z) => F("div", {
1784
1781
  key: z - 1,
1785
1782
  class: "digit-item",
1786
1783
  style: h(I.value)
1787
1784
  }, G(z - 1), 5)), 64))
1788
1785
  ], 4)
1789
1786
  ], 4))), 128)),
1790
- A(_.$slots, "default", {}, void 0, !0)
1787
+ T(_.$slots, "default", {}, void 0, !0)
1791
1788
  ], 4));
1792
1789
  }
1793
- }), ht = /* @__PURE__ */ x(Te, [["__scopeId", "data-v-fba32a26"]]);
1790
+ }), ht = /* @__PURE__ */ x(Ce, [["__scopeId", "data-v-fba32a26"]]);
1794
1791
  ht.install = (e) => {
1795
1792
  e.component(ht.name, ht);
1796
1793
  };
1797
- const Ge = {
1794
+ const ke = {
1798
1795
  name: "hButtonGroup",
1799
1796
  chineseName: "按钮组",
1800
1797
  description: "按钮组容器,支持 flex 布局排列"
1801
- }, ze = /* @__PURE__ */ Object.assign(Ge, {
1798
+ }, $e = /* @__PURE__ */ Object.assign(ke, {
1802
1799
  props: {
1803
1800
  width: {
1804
1801
  type: String,
@@ -1868,18 +1865,18 @@ const Ge = {
1868
1865
  class: "h-button-group",
1869
1866
  style: h(S(n))
1870
1867
  }, [
1871
- A(a.$slots, "default", {}, void 0, !0)
1868
+ T(a.$slots, "default", {}, void 0, !0)
1872
1869
  ], 4));
1873
1870
  }
1874
- }), yt = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-f90f2b62"]]);
1871
+ }), yt = /* @__PURE__ */ x($e, [["__scopeId", "data-v-f90f2b62"]]);
1875
1872
  yt.install = (e) => {
1876
1873
  e.component(yt.name, yt);
1877
1874
  };
1878
- const De = {
1875
+ const Ae = {
1879
1876
  name: "hText",
1880
1877
  chineseName: "文本",
1881
1878
  description: "用于显示文本内容"
1882
- }, je = /* @__PURE__ */ Object.assign(De, {
1879
+ }, Te = /* @__PURE__ */ Object.assign(Ae, {
1883
1880
  props: {
1884
1881
  text: {
1885
1882
  type: String,
@@ -1904,15 +1901,15 @@ const De = {
1904
1901
  style: h(S(n))
1905
1902
  }, G(S(t).text), 5));
1906
1903
  }
1907
- }), mt = /* @__PURE__ */ x(je, [["__scopeId", "data-v-7fb2fc92"]]);
1904
+ }), mt = /* @__PURE__ */ x(Te, [["__scopeId", "data-v-7fb2fc92"]]);
1908
1905
  mt.install = (e) => {
1909
1906
  e.component(mt.name, mt);
1910
1907
  };
1911
- const Oe = {
1908
+ const Ge = {
1912
1909
  name: "hLayout",
1913
1910
  chineseName: "布局",
1914
1911
  description: "页面布局容器"
1915
- }, Le = /* @__PURE__ */ Object.assign(Oe, {
1912
+ }, ze = /* @__PURE__ */ Object.assign(Ge, {
1916
1913
  props: {
1917
1914
  width: {
1918
1915
  type: String,
@@ -1952,18 +1949,18 @@ const Oe = {
1952
1949
  class: "h-layout",
1953
1950
  style: h(S(n))
1954
1951
  }, [
1955
- A(a.$slots, "default", {}, void 0, !0)
1952
+ T(a.$slots, "default", {}, void 0, !0)
1956
1953
  ], 4));
1957
1954
  }
1958
- }), St = /* @__PURE__ */ x(Le, [["__scopeId", "data-v-957ea318"]]);
1955
+ }), St = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-957ea318"]]);
1959
1956
  St.install = (e) => {
1960
1957
  e.component(St.name, St);
1961
1958
  };
1962
- const Ne = {
1959
+ const je = {
1963
1960
  name: "hFlex",
1964
1961
  chineseName: "弹性布局",
1965
1962
  description: "基于 CSS Flexbox 的弹性布局容器"
1966
- }, Be = /* @__PURE__ */ Object.assign(Ne, {
1963
+ }, De = /* @__PURE__ */ Object.assign(je, {
1967
1964
  props: {
1968
1965
  width: {
1969
1966
  type: String,
@@ -2018,21 +2015,21 @@ const Ne = {
2018
2015
  class: "h-flex",
2019
2016
  style: h(S(n))
2020
2017
  }, [
2021
- A(a.$slots, "default", {}, void 0, !0)
2018
+ T(a.$slots, "default", {}, void 0, !0)
2022
2019
  ], 4));
2023
2020
  }
2024
- }), vt = /* @__PURE__ */ x(Be, [["__scopeId", "data-v-6ecd9f03"]]);
2021
+ }), vt = /* @__PURE__ */ x(De, [["__scopeId", "data-v-6ecd9f03"]]);
2025
2022
  vt.install = (e) => {
2026
2023
  e.component(vt.name, vt);
2027
2024
  };
2028
- const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2025
+ const Oe = { class: "h-map-wrapper" }, Le = ["src"], Ne = {
2029
2026
  key: 0,
2030
2027
  class: "h-map-loading-text"
2031
- }, Ee = {
2028
+ }, Be = {
2032
2029
  name: "hMap",
2033
2030
  chineseName: "地图",
2034
2031
  description: "基于 ECharts 的高自定义地图组件,支持 GeoJSON 注册、多层 geo 叠加、散点标记等"
2035
- }, Me = /* @__PURE__ */ Object.assign(Ee, {
2032
+ }, He = /* @__PURE__ */ Object.assign(Be, {
2036
2033
  props: {
2037
2034
  // 地图注册名,如 'xinjiang'
2038
2035
  mapName: {
@@ -2080,7 +2077,7 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2080
2077
  "chart-dblclick"
2081
2078
  ],
2082
2079
  setup(e, { expose: t, emit: n }) {
2083
- const a = n, i = e, b = k(null);
2080
+ const a = n, i = e, b = $(null);
2084
2081
  let p = null;
2085
2082
  const o = c(() => ({
2086
2083
  width: i.width,
@@ -2088,19 +2085,19 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2088
2085
  backgroundImage: i.url ? `url(${i.url})` : "none",
2089
2086
  backgroundSize: "100% 100%",
2090
2087
  backgroundRepeat: "no-repeat"
2091
- })), $ = k(!1);
2092
- let B = 0;
2093
- N(() => i.loading, (u) => {
2088
+ })), k = $(!1);
2089
+ let N = 0;
2090
+ L(() => i.loading, (u) => {
2094
2091
  if (u)
2095
- $.value = !0, B = Date.now();
2092
+ k.value = !0, N = Date.now();
2096
2093
  else {
2097
- const v = Date.now() - B, y = (i.loadingMinDuration || 0) - v;
2098
- y <= 0 ? $.value = !1 : setTimeout(() => {
2099
- $.value = !1;
2094
+ const v = Date.now() - N, y = (i.loadingMinDuration || 0) - v;
2095
+ y <= 0 ? k.value = !1 : setTimeout(() => {
2096
+ k.value = !1;
2100
2097
  }, y);
2101
2098
  }
2102
2099
  }, { immediate: !0 });
2103
- const F = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = kt(() => {
2100
+ const W = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = $t(() => {
2104
2101
  p && !p.isDisposed() && p.resize();
2105
2102
  }, 100), I = () => {
2106
2103
  p && (p.isDisposed() || (p.off("click"), p.off("dblclick"), p.dispose()), p = null);
@@ -2119,11 +2116,11 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2119
2116
  console.error("[h-map] 初始化失败:", u);
2120
2117
  }
2121
2118
  };
2122
- return N(() => i.mapJson, () => {
2119
+ return L(() => i.mapJson, () => {
2123
2120
  Tt(() => {
2124
2121
  _();
2125
2122
  });
2126
- }), N(() => i.option, (u) => {
2123
+ }), L(() => i.option, (u) => {
2127
2124
  if (!(!u || !p || p.isDisposed()))
2128
2125
  try {
2129
2126
  p.setOption(u, { notMerge: !0 });
@@ -2143,40 +2140,40 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2143
2140
  resize: () => w(),
2144
2141
  dispatchAction: (u) => p == null ? void 0 : p.dispatchAction(u),
2145
2142
  dispose: I
2146
- }), (u, v) => (s(), d("div", He, [
2147
- j("div", {
2143
+ }), (u, v) => (s(), d("div", Oe, [
2144
+ F("div", {
2148
2145
  class: "h-map",
2149
2146
  ref_key: "mapContainer",
2150
2147
  ref: b,
2151
2148
  style: h(o.value)
2152
2149
  }, null, 4),
2153
- $.value ? (s(), d("div", {
2150
+ k.value ? (s(), d("div", {
2154
2151
  key: 0,
2155
2152
  class: "h-map-loading",
2156
- style: h(F.value)
2153
+ style: h(W.value)
2157
2154
  }, [
2158
- j("img", {
2155
+ F("img", {
2159
2156
  src: i.loadingIcon || S(It),
2160
2157
  class: "h-map-loading-icon",
2161
2158
  alt: "loading"
2162
- }, null, 8, We),
2163
- i.loadingText ? (s(), d("span", Fe, G(i.loadingText), 1)) : T("", !0)
2164
- ], 4)) : T("", !0)
2159
+ }, null, 8, Le),
2160
+ i.loadingText ? (s(), d("span", Ne, G(i.loadingText), 1)) : A("", !0)
2161
+ ], 4)) : A("", !0)
2165
2162
  ]));
2166
2163
  }
2167
- }), _t = /* @__PURE__ */ x(Me, [["__scopeId", "data-v-7350dc12"]]);
2164
+ }), _t = /* @__PURE__ */ x(He, [["__scopeId", "data-v-7350dc12"]]);
2168
2165
  _t.install = (e) => {
2169
2166
  e.component(_t.name, _t);
2170
2167
  };
2171
- const q = k(!1), Ct = k(""), Dt = k(""), $t = k("");
2172
- let R = null, jt = 0;
2173
- function Qe(e) {
2174
- jt = e;
2168
+ const q = $(!1), Ct = $(""), jt = $(""), kt = $("");
2169
+ let R = null, Dt = 0;
2170
+ function Ye(e) {
2171
+ Dt = e;
2175
2172
  }
2176
- function Xe() {
2173
+ function qe() {
2177
2174
  function e(n = {}) {
2178
- Ct.value = n.text ?? "加载中...", Dt.value = n.icon ?? "", $t.value = n.bgColor ?? "", q.value = !0, R && clearTimeout(R);
2179
- const a = n.duration !== void 0 ? n.duration : jt;
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;
2180
2177
  a > 0 && (R = setTimeout(() => {
2181
2178
  q.value = !1, R = null;
2182
2179
  }, a));
@@ -2186,49 +2183,49 @@ function Xe() {
2186
2183
  }
2187
2184
  return { show: e, hide: t, visible: q };
2188
2185
  }
2189
- const Re = { class: "h-loading-box" }, Pe = ["src"], Je = {
2186
+ const We = { class: "h-loading-box" }, Fe = ["src"], Ee = {
2190
2187
  key: 0,
2191
2188
  class: "h-loading-text"
2192
- }, Ve = {
2189
+ }, Me = {
2193
2190
  name: "hLoading",
2194
2191
  chineseName: "全局加载",
2195
2192
  description: "页面级全屏 loading 遮罩,支持 router 跳转、页面刷新等场景,通过 useLoading() 全局控制"
2196
- }, Ye = /* @__PURE__ */ Object.assign(Ve, {
2193
+ }, Re = /* @__PURE__ */ Object.assign(Me, {
2197
2194
  setup(e) {
2198
- const t = c(() => Dt.value || It), n = c(() => $t.value ? { background: $t.value } : {});
2199
- return (a, i) => (s(), Gt(Wt, { to: "body" }, [
2200
- Ft(Et, { name: "h-loading-fade" }, {
2201
- default: Mt(() => [
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(() => [
2202
2199
  S(q) ? (s(), d("div", {
2203
2200
  key: 0,
2204
2201
  class: "h-loading",
2205
2202
  style: h(n.value)
2206
2203
  }, [
2207
- j("div", Re, [
2208
- j("img", {
2204
+ F("div", We, [
2205
+ F("img", {
2209
2206
  src: t.value,
2210
2207
  class: "h-loading-icon",
2211
2208
  alt: "loading"
2212
- }, null, 8, Pe),
2213
- S(Ct) ? (s(), d("span", Je, G(S(Ct)), 1)) : T("", !0)
2209
+ }, null, 8, Fe),
2210
+ S(Ct) ? (s(), d("span", Ee, G(S(Ct)), 1)) : A("", !0)
2214
2211
  ])
2215
- ], 4)) : T("", !0)
2212
+ ], 4)) : A("", !0)
2216
2213
  ]),
2217
2214
  _: 1
2218
2215
  })
2219
2216
  ]));
2220
2217
  }
2221
- }), xt = /* @__PURE__ */ x(Ye, [["__scopeId", "data-v-ae6739ea"]]);
2218
+ }), xt = /* @__PURE__ */ x(Re, [["__scopeId", "data-v-ae6739ea"]]);
2222
2219
  xt.install = (e) => {
2223
2220
  e.component(xt.name, xt);
2224
2221
  };
2225
- const qe = (e) => {
2222
+ const Pe = (e) => {
2226
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);
2227
- }, Ze = {
2228
- install: qe
2224
+ }, Ue = {
2225
+ install: Pe
2229
2226
  };
2230
2227
  export {
2231
- Ze as default,
2228
+ Ue as default,
2232
2229
  st as hBottom,
2233
2230
  ft as hButton,
2234
2231
  yt as hButtonGroup,
@@ -2252,6 +2249,6 @@ export {
2252
2249
  mt as hText,
2253
2250
  lt as hTop,
2254
2251
  pt as hView,
2255
- Qe as setDefaultDuration,
2256
- Xe as useLoading
2252
+ Ye as setDefaultDuration,
2253
+ qe as useLoading
2257
2254
  };