hamster-charts 0.6.0 → 0.6.1

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 +1 @@
1
- .h-panel[data-v-474190fc]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-header[data-v-b83cf769]{background-size:100% 100%;background-repeat:no-repeat;position:relative}.h-main[data-v-1025786b]{width:100%}.h-chart-title[data-v-412bbd72]{width:100%;background-size:100% 100%;background-repeat:no-repeat}.h-chart[data-v-c9b75a2f]{display:flex;flex-direction:column;background-size:100% 100%;background-repeat:no-repeat}.chart-wrapper[data-v-c9b75a2f]{flex:1;position:relative;min-height:0}.chart-wrapper .chart[data-v-c9b75a2f]{width:100%;height:100%}.chart-loading[data-v-c9b75a2f]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.loading-icon[data-v-c9b75a2f]{width:36px;height:36px;animation:h-chart-spin-c9b75a2f 1s linear infinite}.loading-text[data-v-c9b75a2f]{color:#fff;font-size:13px;opacity:.8}@keyframes h-chart-spin-c9b75a2f{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.h-left[data-v-7d94e3d8],.h-right[data-v-8ef316d0]{height:100%}.h-top[data-v-ee9ecf79],.h-bottom[data-v-9fc5eff9]{width:100%}.h-item-chart-wrapper[data-v-4585b2db]{position:relative;width:100%;height:100%}.h-item-chart[data-v-4585b2db]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-item-chart-loading[data-v-4585b2db]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.h-item-chart-loading-icon[data-v-4585b2db]{width:36px;height:36px;animation:h-item-chart-spin-4585b2db 1s linear infinite}.h-item-chart-loading-text[data-v-4585b2db]{color:#fff;font-size:13px;opacity:.8}@keyframes h-item-chart-spin-4585b2db{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-v-937cc59c]::-webkit-scrollbar{width:0px}[data-v-937cc59c]::-webkit-scrollbar-track{background:#31313181}[data-v-937cc59c]::-webkit-scrollbar-thumb{background:#444;border-radius:10px}[data-v-937cc59c]::-webkit-scrollbar-thumb:hover{background:#555}.h-list[data-v-937cc59c]{position:relative;overflow:hidden}.list-header[data-v-937cc59c]{display:flex;align-items:center;width:100%}.header-item[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;font-weight:700}.scroll-wrapper[data-v-937cc59c]{position:relative;width:100%;will-change:transform}.data-list[data-v-937cc59c]{width:100%}.data-list-item[data-v-937cc59c]{display:flex;transition:all .3s ease;border-bottom:1px solid rgba(255,255,255,.1)}.data-list-item[data-v-937cc59c]:hover{background:#ffffff0d}.data-item-cell[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;padding:8px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.h-view[data-v-c79a990c]{background-size:100% 100%;background-repeat:no-repeat}.h-data-label[data-v-5b0fbecc]{background-repeat:no-repeat;background-size:100% 100%}.h-button[data-v-533f0ead]{outline:none;background-repeat:no-repeat;background-size:100% 100%;border-radius:2px;border:none}.h-grid[data-v-d4038f65]{background-size:100% 100%;background-repeat:no-repeat}.h-counter[data-v-fba32a26]{display:flex;align-items:center}.counter-digit[data-v-fba32a26]{position:relative;overflow:hidden}.digit-scroll[data-v-fba32a26]{display:flex;flex-direction:column;will-change:transform}.digit-item[data-v-fba32a26]{flex-shrink:0}.h-layout[data-v-957ea318]{height:100%}.h-flex[data-v-6ecd9f03]{background-size:100% 100%;background-repeat:no-repeat}.h-map-wrapper[data-v-7350dc12]{position:relative;width:100%;height:100%}.h-map[data-v-7350dc12]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden}.h-map-loading[data-v-7350dc12]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.h-map-loading-icon[data-v-7350dc12]{width:36px;height:36px;animation:h-map-spin-7350dc12 1s linear infinite}.h-map-loading-text[data-v-7350dc12]{color:#fff;font-size:13px;opacity:.8}@keyframes h-map-spin-7350dc12{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.h-loading[data-v-ae6739ea]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#0a0a1e}.h-loading-box[data-v-ae6739ea]{display:flex;flex-direction:column;align-items:center;gap:14px}.h-loading-icon[data-v-ae6739ea]{width:48px;height:48px;animation:h-loading-spin-ae6739ea 1s linear infinite}.h-loading-text[data-v-ae6739ea]{color:#fff;font-size:14px;letter-spacing:1px;opacity:.85}.h-loading-fade-enter-active[data-v-ae6739ea],.h-loading-fade-leave-active[data-v-ae6739ea]{transition:opacity .25s ease}.h-loading-fade-enter-from[data-v-ae6739ea],.h-loading-fade-leave-to[data-v-ae6739ea]{opacity:0}@keyframes h-loading-spin-ae6739ea{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
1
+ .h-panel[data-v-474190fc]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-header[data-v-b83cf769]{background-size:100% 100%;background-repeat:no-repeat;position:relative}.h-main[data-v-1025786b]{width:100%}.h-chart-title[data-v-412bbd72]{width:100%;background-size:100% 100%;background-repeat:no-repeat}.h-chart[data-v-c9b75a2f]{display:flex;flex-direction:column;background-size:100% 100%;background-repeat:no-repeat}.chart-wrapper[data-v-c9b75a2f]{flex:1;position:relative;min-height:0}.chart-wrapper .chart[data-v-c9b75a2f]{width:100%;height:100%}.chart-loading[data-v-c9b75a2f]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.loading-icon[data-v-c9b75a2f]{width:36px;height:36px;animation:h-chart-spin-c9b75a2f 1s linear infinite}.loading-text[data-v-c9b75a2f]{color:#fff;font-size:13px;opacity:.8}@keyframes h-chart-spin-c9b75a2f{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.h-left[data-v-7d94e3d8],.h-right[data-v-8ef316d0]{height:100%}.h-top[data-v-ee9ecf79],.h-bottom[data-v-9fc5eff9]{width:100%}.h-item-chart[data-v-477585e0]{position:relative;width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.h-item-chart-loading[data-v-477585e0]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.h-item-chart-loading-icon[data-v-477585e0]{width:36px;height:36px;animation:h-item-chart-spin-477585e0 1s linear infinite}.h-item-chart-loading-text[data-v-477585e0]{color:#fff;font-size:13px;opacity:.8}@keyframes h-item-chart-spin-477585e0{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-v-937cc59c]::-webkit-scrollbar{width:0px}[data-v-937cc59c]::-webkit-scrollbar-track{background:#31313181}[data-v-937cc59c]::-webkit-scrollbar-thumb{background:#444;border-radius:10px}[data-v-937cc59c]::-webkit-scrollbar-thumb:hover{background:#555}.h-list[data-v-937cc59c]{position:relative;overflow:hidden}.list-header[data-v-937cc59c]{display:flex;align-items:center;width:100%}.header-item[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;font-weight:700}.scroll-wrapper[data-v-937cc59c]{position:relative;width:100%;will-change:transform}.data-list[data-v-937cc59c]{width:100%}.data-list-item[data-v-937cc59c]{display:flex;transition:all .3s ease;border-bottom:1px solid rgba(255,255,255,.1)}.data-list-item[data-v-937cc59c]:hover{background:#ffffff0d}.data-item-cell[data-v-937cc59c]{flex:1;display:flex;justify-content:center;align-items:center;padding:8px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.h-view[data-v-c79a990c]{background-size:100% 100%;background-repeat:no-repeat}.h-data-label[data-v-5b0fbecc]{background-repeat:no-repeat;background-size:100% 100%}.h-button[data-v-533f0ead]{outline:none;background-repeat:no-repeat;background-size:100% 100%;border-radius:2px;border:none}.h-grid[data-v-d4038f65]{background-size:100% 100%;background-repeat:no-repeat}.h-counter[data-v-fba32a26]{display:flex;align-items:center}.counter-digit[data-v-fba32a26]{position:relative;overflow:hidden}.digit-scroll[data-v-fba32a26]{display:flex;flex-direction:column;will-change:transform}.digit-item[data-v-fba32a26]{flex-shrink:0}.h-layout[data-v-957ea318]{height:100%}.h-flex[data-v-6ecd9f03]{background-size:100% 100%;background-repeat:no-repeat}.h-map-wrapper[data-v-7350dc12]{position:relative;width:100%;height:100%}.h-map[data-v-7350dc12]{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden}.h-map-loading[data-v-7350dc12]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#00000080;z-index:10;gap:10px}.h-map-loading-icon[data-v-7350dc12]{width:36px;height:36px;animation:h-map-spin-7350dc12 1s linear infinite}.h-map-loading-text[data-v-7350dc12]{color:#fff;font-size:13px;opacity:.8}@keyframes h-map-spin-7350dc12{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.h-loading[data-v-ae6739ea]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#0a0a1e}.h-loading-box[data-v-ae6739ea]{display:flex;flex-direction:column;align-items:center;gap:14px}.h-loading-icon[data-v-ae6739ea]{width:48px;height:48px;animation:h-loading-spin-ae6739ea 1s linear infinite}.h-loading-text[data-v-ae6739ea]{color:#fff;font-size:14px;letter-spacing:1px;opacity:.85}.h-loading-fade-enter-active[data-v-ae6739ea],.h-loading-fade-leave-active[data-v-ae6739ea]{transition:opacity .25s ease}.h-loading-fade-enter-from[data-v-ae6739ea],.h-loading-fade-leave-to[data-v-ae6739ea]{opacity:0}@keyframes h-loading-spin-ae6739ea{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
@@ -1,6 +1,6 @@
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 A, toDisplayString as G, createCommentVNode as T, createElementVNode as L, ref as $, 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";
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)
@@ -247,7 +247,7 @@ 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),
250
+ L("span", Ut, G(S(t).text), 1),
251
251
  A(a.$slots, "default", {}, void 0, !0)
252
252
  ], 4));
253
253
  }
@@ -344,9 +344,9 @@ 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(), B = c(() => !!k.default), F = c(() => i.title ? typeof i.title == "string" ? { text: i.title } : i.title : null), w = $(!1);
350
350
  let I = 0;
351
351
  N(() => i.loading, (l) => {
352
352
  if (l)
@@ -376,8 +376,8 @@ const Ut = { class: "def-text" }, Kt = {
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
  }
@@ -385,7 +385,7 @@ const Ut = { class: "def-text" }, Kt = {
385
385
  if (!o || !u.value || z || !D) return;
386
386
  const l = C();
387
387
  l !== 0 && (o.dispatchAction({ type: "showTip", seriesIndex: u.value.seriesIndex, dataIndex: y }), y++, y >= l && (u.value.loop ? y = 0 : H()));
388
- }, O = () => {
388
+ }, j = () => {
389
389
  H(), !(!u.value || C() === 0) && (y = 0, v = setInterval(E, u.value.interval));
390
390
  }, H = () => {
391
391
  v && (clearInterval(v), v = null), o && o.dispatchAction({ type: "hideTip" });
@@ -393,14 +393,14 @@ const Ut = { class: "def-text" }, Kt = {
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();
@@ -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
+ }), j();
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,
@@ -479,7 +479,7 @@ 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 }), j(), a("chart-update", {
483
483
  instance: o,
484
484
  option: g
485
485
  });
@@ -496,7 +496,7 @@ 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,
499
+ startLoop: j,
500
500
  stopLoop: H,
501
501
  pauseLoop: V,
502
502
  resumeLoop: M
@@ -505,8 +505,8 @@ const Ut = { class: "def-text" }, Kt = {
505
505
  style: h(b.value)
506
506
  }, [
507
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", {
508
+ L("div", Xt, [
509
+ Bt(L("div", {
510
510
  class: "chart",
511
511
  ref_key: "charts",
512
512
  ref: p
@@ -518,7 +518,7 @@ const Ut = { class: "def-text" }, Kt = {
518
518
  class: "chart-loading",
519
519
  style: h(_.value)
520
520
  }, [
521
- j("img", {
521
+ L("img", {
522
522
  src: i.loadingIcon || S(It),
523
523
  class: "loading-icon",
524
524
  alt: "loading"
@@ -760,14 +760,14 @@ st.install = (e) => {
760
760
  Q.install = (e) => {
761
761
  e.component(Q.name, Q);
762
762
  };
763
- const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
763
+ const fe = ["src"], ge = {
764
764
  key: 0,
765
765
  class: "h-item-chart-loading-text"
766
- }, ye = {
766
+ }, he = {
767
767
  name: "hItemChart",
768
768
  chineseName: "独立图表",
769
769
  description: "独立的 ECharts 图表容器组件,支持 loading、tooltip 轮播,适用于大屏数据可视化展示"
770
- }, me = /* @__PURE__ */ Object.assign(ye, {
770
+ }, ye = /* @__PURE__ */ Object.assign(he, {
771
771
  props: {
772
772
  height: { type: String, default: "200px" },
773
773
  url: { type: String, default: "" },
@@ -794,17 +794,17 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
794
794
  const a = n, i = e, b = c(() => ({
795
795
  backgroundImage: i.url ? `url(${i.url})` : "none",
796
796
  height: i.height
797
- })), p = k(null);
797
+ })), p = $(null);
798
798
  let o = null;
799
- const $ = k(!1);
799
+ const k = $(!1);
800
800
  let B = 0;
801
801
  N(() => i.loading, (m) => {
802
802
  if (m)
803
- $.value = !0, B = Date.now();
803
+ k.value = !0, B = Date.now();
804
804
  else {
805
805
  const f = (i.loadingMinDuration || 0) - (Date.now() - B);
806
- f <= 0 ? $.value = !1 : setTimeout(() => {
807
- $.value = !1;
806
+ f <= 0 ? k.value = !1 : setTimeout(() => {
807
+ k.value = !1;
808
808
  }, f);
809
809
  }
810
810
  }, { immediate: !0 });
@@ -835,14 +835,14 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
835
835
  I && (clearInterval(I), I = null), o && o.dispatchAction({ type: "hideTip" });
836
836
  }, E = () => {
837
837
  u = !0;
838
- }, O = () => {
838
+ }, j = () => {
839
839
  u = !1;
840
- }, H = kt(() => {
840
+ }, H = $t(() => {
841
841
  o && (o.resize(), a("chart-resize", { instance: o }));
842
842
  }, 100), V = () => {
843
843
  var f;
844
844
  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()));
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", () => j()));
846
846
  }, M = () => {
847
847
  o && (C(), ["click", "dblclick", "mouseover", "mouseout"].forEach((f) => o.off(f)), o.dispose(), o = null);
848
848
  }, P = () => {
@@ -867,7 +867,7 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
867
867
  }, J = () => H();
868
868
  return X(() => {
869
869
  setTimeout(() => P(), 0), window.addEventListener("resize", J), At(p, () => H()), i.tooltipLoop && zt(p, ([m]) => {
870
- v = m.isIntersecting, v ? O() : E();
870
+ v = m.isIntersecting, v ? j() : E();
871
871
  });
872
872
  }), wt(() => {
873
873
  window.removeEventListener("resize", J), C(), M();
@@ -890,37 +890,36 @@ const fe = { class: "h-item-chart-wrapper" }, ge = ["src"], he = {
890
890
  startLoop: D,
891
891
  stopLoop: C,
892
892
  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", {
893
+ resumeLoop: j
894
+ }), (m, f) => (s(), d("div", {
895
+ class: "h-item-chart",
896
+ ref_key: "itemCharts",
897
+ ref: p,
898
+ style: h(b.value)
899
+ }, [
900
+ k.value ? (s(), d("div", {
902
901
  key: 0,
903
902
  class: "h-item-chart-loading",
904
903
  style: h(F.value)
905
904
  }, [
906
- j("img", {
905
+ L("img", {
907
906
  src: i.loadingIcon || S(It),
908
907
  class: "h-item-chart-loading-icon",
909
908
  alt: "loading"
910
- }, null, 8, ge),
911
- i.loadingText ? (s(), d("span", he, G(i.loadingText), 1)) : T("", !0)
909
+ }, null, 8, fe),
910
+ i.loadingText ? (s(), d("span", ge, G(i.loadingText), 1)) : T("", !0)
912
911
  ], 4)) : T("", !0)
913
- ]));
912
+ ], 4));
914
913
  }
915
- }), ut = /* @__PURE__ */ x(me, [["__scopeId", "data-v-4585b2db"]]);
914
+ }), ut = /* @__PURE__ */ x(ye, [["__scopeId", "data-v-477585e0"]]);
916
915
  ut.install = (e) => {
917
916
  e.component(ut.name, ut);
918
917
  };
919
- const Se = {
918
+ const me = {
920
919
  name: "hList",
921
920
  chineseName: "滚动列表",
922
921
  description: "支持自动滚动的数据列表组件,适用于大屏数据展示"
923
- }, ve = /* @__PURE__ */ Object.assign(Se, {
922
+ }, Se = /* @__PURE__ */ Object.assign(me, {
924
923
  props: {
925
924
  // 容器样式
926
925
  width: {
@@ -982,7 +981,7 @@ const Se = {
982
981
  }
983
982
  },
984
983
  setup(e, { expose: t }) {
985
- const n = e, a = k(0), i = k(null), b = k(0), p = k([]), o = k(null), $ = c(() => ({
984
+ const n = e, a = $(0), i = $(null), b = $(0), p = $([]), o = $(null), k = c(() => ({
986
985
  width: n.width,
987
986
  height: n.height,
988
987
  backgroundColor: n.backgroundColor,
@@ -1038,7 +1037,7 @@ const Se = {
1038
1037
  }
1039
1038
  }), (y, z) => (s(), d("div", {
1040
1039
  class: "h-list",
1041
- style: h($.value)
1040
+ style: h(k.value)
1042
1041
  }, [
1043
1042
  e.showHeader ? (s(), d("div", {
1044
1043
  key: 0,
@@ -1055,7 +1054,7 @@ const Se = {
1055
1054
  class: "scroll-wrapper",
1056
1055
  style: h(F.value)
1057
1056
  }, [
1058
- j("div", {
1057
+ L("div", {
1059
1058
  class: "data-list",
1060
1059
  ref_key: "listContainer",
1061
1060
  ref: o
@@ -1068,8 +1067,8 @@ const Se = {
1068
1067
  ref_key: "listItems",
1069
1068
  ref: p
1070
1069
  }, [
1071
- (s(!0), d(U, null, K(D, (E, O) => (s(), d("p", {
1072
- key: O,
1070
+ (s(!0), d(U, null, K(D, (E, j) => (s(), d("p", {
1071
+ key: j,
1073
1072
  class: "data-item-cell"
1074
1073
  }, G(E), 1))), 128))
1075
1074
  ], 4))), 128))
@@ -1077,15 +1076,15 @@ const Se = {
1077
1076
  ], 4)) : T("", !0)
1078
1077
  ], 4));
1079
1078
  }
1080
- }), dt = /* @__PURE__ */ x(ve, [["__scopeId", "data-v-937cc59c"]]);
1079
+ }), dt = /* @__PURE__ */ x(Se, [["__scopeId", "data-v-937cc59c"]]);
1081
1080
  dt.install = (e) => {
1082
1081
  e.component(dt.name, dt);
1083
1082
  };
1084
- const _e = {
1083
+ const ve = {
1085
1084
  name: "hView",
1086
1085
  chineseName: "视图",
1087
1086
  description: "通用视图容器组件"
1088
- }, xe = /* @__PURE__ */ Object.assign(_e, {
1087
+ }, _e = /* @__PURE__ */ Object.assign(ve, {
1089
1088
  props: {
1090
1089
  url: {
1091
1090
  type: String,
@@ -1168,15 +1167,15 @@ const _e = {
1168
1167
  A(a.$slots, "default", {}, void 0, !0)
1169
1168
  ], 4));
1170
1169
  }
1171
- }), pt = /* @__PURE__ */ x(xe, [["__scopeId", "data-v-c79a990c"]]);
1170
+ }), pt = /* @__PURE__ */ x(_e, [["__scopeId", "data-v-c79a990c"]]);
1172
1171
  pt.install = (e) => {
1173
1172
  e.component(pt.name, pt);
1174
1173
  };
1175
- const be = {
1174
+ const xe = {
1176
1175
  name: "hDataLabel",
1177
1176
  chineseName: "数据标签",
1178
1177
  description: "数值与文本标签展示组件"
1179
- }, we = /* @__PURE__ */ Object.assign(be, {
1178
+ }, be = /* @__PURE__ */ Object.assign(xe, {
1180
1179
  props: {
1181
1180
  url: {
1182
1181
  type: String,
@@ -1356,15 +1355,15 @@ const be = {
1356
1355
  }, G(e.someText), 5)) : T("", !0)
1357
1356
  ], 4));
1358
1357
  }
1359
- }), ct = /* @__PURE__ */ x(we, [["__scopeId", "data-v-5b0fbecc"]]);
1358
+ }), ct = /* @__PURE__ */ x(be, [["__scopeId", "data-v-5b0fbecc"]]);
1360
1359
  ct.install = (e) => {
1361
1360
  e.component(ct.name, ct);
1362
1361
  };
1363
- const Ie = {
1362
+ const we = {
1364
1363
  name: "hButton",
1365
1364
  chineseName: "按钮",
1366
1365
  description: "可自定义样式的按钮组件"
1367
- }, Ce = /* @__PURE__ */ Object.assign(Ie, {
1366
+ }, Ie = /* @__PURE__ */ Object.assign(we, {
1368
1367
  props: {
1369
1368
  url: {
1370
1369
  type: String,
@@ -1424,15 +1423,15 @@ const Ie = {
1424
1423
  style: h(S(n))
1425
1424
  }, G(S(t).text), 5));
1426
1425
  }
1427
- }), ft = /* @__PURE__ */ x(Ce, [["__scopeId", "data-v-533f0ead"]]);
1426
+ }), ft = /* @__PURE__ */ x(Ie, [["__scopeId", "data-v-533f0ead"]]);
1428
1427
  ft.install = (e) => {
1429
1428
  e.component(ft.name, ft);
1430
1429
  };
1431
- const $e = {
1430
+ const Ce = {
1432
1431
  name: "hGrid",
1433
1432
  chineseName: "网格布局",
1434
1433
  description: "基于 CSS Grid 的网格布局容器"
1435
- }, ke = /* @__PURE__ */ Object.assign($e, {
1434
+ }, ke = /* @__PURE__ */ Object.assign(Ce, {
1436
1435
  props: {
1437
1436
  width: {
1438
1437
  type: String,
@@ -1538,11 +1537,11 @@ const $e = {
1538
1537
  gt.install = (e) => {
1539
1538
  e.component(gt.name, gt);
1540
1539
  };
1541
- const Ae = {
1540
+ const $e = {
1542
1541
  name: "hCounter",
1543
1542
  chineseName: "数字计数器",
1544
1543
  description: "支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"
1545
- }, Te = /* @__PURE__ */ Object.assign(Ae, {
1544
+ }, Ae = /* @__PURE__ */ Object.assign($e, {
1546
1545
  props: {
1547
1546
  // 数据相关
1548
1547
  data: {
@@ -1682,7 +1681,7 @@ const Ae = {
1682
1681
  }
1683
1682
  },
1684
1683
  setup(e, { expose: t }) {
1685
- const n = e, a = k([]), i = k(!1), b = c(() => {
1684
+ const n = e, a = $([]), i = $(!1), b = c(() => {
1686
1685
  let _ = n.data;
1687
1686
  n.decimalPlaces >= 0 && typeof _ == "number" && (_ = _.toFixed(n.decimalPlaces));
1688
1687
  let u = String(_);
@@ -1691,7 +1690,7 @@ const Ae = {
1691
1690
  v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, n.separator), u = v.join(".");
1692
1691
  }
1693
1692
  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`), $ = () => {
1693
+ }), 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
1694
  if (!n.enableAnimation) {
1696
1695
  a.value = b.value.map(() => 0);
1697
1696
  return;
@@ -1706,10 +1705,10 @@ const Ae = {
1706
1705
  const y = parseInt(u), z = v * n.digitDelay, D = n.animationDuration;
1707
1706
  setTimeout(() => {
1708
1707
  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));
1708
+ const E = D / (y + 1), j = () => {
1709
+ C <= y && (a.value[v] = C, C++, C <= y ? setTimeout(j, E) : (v === _.length - 1 || _.slice(v + 1).every((H) => isNaN(parseInt(H)))) && (i.value = !1));
1711
1710
  };
1712
- O();
1711
+ j();
1713
1712
  }, z);
1714
1713
  });
1715
1714
  }, B = (_) => {
@@ -1761,11 +1760,11 @@ const Ae = {
1761
1760
  lineHeight: "1"
1762
1761
  }));
1763
1762
  return N(() => n.data, () => {
1764
- $();
1763
+ k();
1765
1764
  }), X(() => {
1766
- $();
1765
+ k();
1767
1766
  }), t({
1768
- restart: $,
1767
+ restart: k,
1769
1768
  getCurrentValue: () => a.value.join("")
1770
1769
  }), (_, u) => (s(), d("div", {
1771
1770
  class: "h-counter",
@@ -1776,11 +1775,11 @@ const Ae = {
1776
1775
  class: "counter-digit",
1777
1776
  style: h(w.value)
1778
1777
  }, [
1779
- j("div", {
1778
+ L("div", {
1780
1779
  class: "digit-scroll",
1781
1780
  style: h(B(y))
1782
1781
  }, [
1783
- (s(), d(U, null, K(10, (z) => j("div", {
1782
+ (s(), d(U, null, K(10, (z) => L("div", {
1784
1783
  key: z - 1,
1785
1784
  class: "digit-item",
1786
1785
  style: h(I.value)
@@ -1790,15 +1789,15 @@ const Ae = {
1790
1789
  A(_.$slots, "default", {}, void 0, !0)
1791
1790
  ], 4));
1792
1791
  }
1793
- }), ht = /* @__PURE__ */ x(Te, [["__scopeId", "data-v-fba32a26"]]);
1792
+ }), ht = /* @__PURE__ */ x(Ae, [["__scopeId", "data-v-fba32a26"]]);
1794
1793
  ht.install = (e) => {
1795
1794
  e.component(ht.name, ht);
1796
1795
  };
1797
- const Ge = {
1796
+ const Te = {
1798
1797
  name: "hButtonGroup",
1799
1798
  chineseName: "按钮组",
1800
1799
  description: "按钮组容器,支持 flex 布局排列"
1801
- }, ze = /* @__PURE__ */ Object.assign(Ge, {
1800
+ }, Ge = /* @__PURE__ */ Object.assign(Te, {
1802
1801
  props: {
1803
1802
  width: {
1804
1803
  type: String,
@@ -1871,15 +1870,15 @@ const Ge = {
1871
1870
  A(a.$slots, "default", {}, void 0, !0)
1872
1871
  ], 4));
1873
1872
  }
1874
- }), yt = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-f90f2b62"]]);
1873
+ }), yt = /* @__PURE__ */ x(Ge, [["__scopeId", "data-v-f90f2b62"]]);
1875
1874
  yt.install = (e) => {
1876
1875
  e.component(yt.name, yt);
1877
1876
  };
1878
- const De = {
1877
+ const ze = {
1879
1878
  name: "hText",
1880
1879
  chineseName: "文本",
1881
1880
  description: "用于显示文本内容"
1882
- }, je = /* @__PURE__ */ Object.assign(De, {
1881
+ }, De = /* @__PURE__ */ Object.assign(ze, {
1883
1882
  props: {
1884
1883
  text: {
1885
1884
  type: String,
@@ -1904,15 +1903,15 @@ const De = {
1904
1903
  style: h(S(n))
1905
1904
  }, G(S(t).text), 5));
1906
1905
  }
1907
- }), mt = /* @__PURE__ */ x(je, [["__scopeId", "data-v-7fb2fc92"]]);
1906
+ }), mt = /* @__PURE__ */ x(De, [["__scopeId", "data-v-7fb2fc92"]]);
1908
1907
  mt.install = (e) => {
1909
1908
  e.component(mt.name, mt);
1910
1909
  };
1911
- const Oe = {
1910
+ const je = {
1912
1911
  name: "hLayout",
1913
1912
  chineseName: "布局",
1914
1913
  description: "页面布局容器"
1915
- }, Le = /* @__PURE__ */ Object.assign(Oe, {
1914
+ }, Oe = /* @__PURE__ */ Object.assign(je, {
1916
1915
  props: {
1917
1916
  width: {
1918
1917
  type: String,
@@ -1955,15 +1954,15 @@ const Oe = {
1955
1954
  A(a.$slots, "default", {}, void 0, !0)
1956
1955
  ], 4));
1957
1956
  }
1958
- }), St = /* @__PURE__ */ x(Le, [["__scopeId", "data-v-957ea318"]]);
1957
+ }), St = /* @__PURE__ */ x(Oe, [["__scopeId", "data-v-957ea318"]]);
1959
1958
  St.install = (e) => {
1960
1959
  e.component(St.name, St);
1961
1960
  };
1962
- const Ne = {
1961
+ const Le = {
1963
1962
  name: "hFlex",
1964
1963
  chineseName: "弹性布局",
1965
1964
  description: "基于 CSS Flexbox 的弹性布局容器"
1966
- }, Be = /* @__PURE__ */ Object.assign(Ne, {
1965
+ }, Ne = /* @__PURE__ */ Object.assign(Le, {
1967
1966
  props: {
1968
1967
  width: {
1969
1968
  type: String,
@@ -2021,18 +2020,18 @@ const Ne = {
2021
2020
  A(a.$slots, "default", {}, void 0, !0)
2022
2021
  ], 4));
2023
2022
  }
2024
- }), vt = /* @__PURE__ */ x(Be, [["__scopeId", "data-v-6ecd9f03"]]);
2023
+ }), vt = /* @__PURE__ */ x(Ne, [["__scopeId", "data-v-6ecd9f03"]]);
2025
2024
  vt.install = (e) => {
2026
2025
  e.component(vt.name, vt);
2027
2026
  };
2028
- const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2027
+ const Be = { class: "h-map-wrapper" }, He = ["src"], We = {
2029
2028
  key: 0,
2030
2029
  class: "h-map-loading-text"
2031
- }, Ee = {
2030
+ }, Fe = {
2032
2031
  name: "hMap",
2033
2032
  chineseName: "地图",
2034
2033
  description: "基于 ECharts 的高自定义地图组件,支持 GeoJSON 注册、多层 geo 叠加、散点标记等"
2035
- }, Me = /* @__PURE__ */ Object.assign(Ee, {
2034
+ }, Ee = /* @__PURE__ */ Object.assign(Fe, {
2036
2035
  props: {
2037
2036
  // 地图注册名,如 'xinjiang'
2038
2037
  mapName: {
@@ -2080,7 +2079,7 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2080
2079
  "chart-dblclick"
2081
2080
  ],
2082
2081
  setup(e, { expose: t, emit: n }) {
2083
- const a = n, i = e, b = k(null);
2082
+ const a = n, i = e, b = $(null);
2084
2083
  let p = null;
2085
2084
  const o = c(() => ({
2086
2085
  width: i.width,
@@ -2088,19 +2087,19 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2088
2087
  backgroundImage: i.url ? `url(${i.url})` : "none",
2089
2088
  backgroundSize: "100% 100%",
2090
2089
  backgroundRepeat: "no-repeat"
2091
- })), $ = k(!1);
2090
+ })), k = $(!1);
2092
2091
  let B = 0;
2093
2092
  N(() => i.loading, (u) => {
2094
2093
  if (u)
2095
- $.value = !0, B = Date.now();
2094
+ k.value = !0, B = Date.now();
2096
2095
  else {
2097
2096
  const v = Date.now() - B, y = (i.loadingMinDuration || 0) - v;
2098
- y <= 0 ? $.value = !1 : setTimeout(() => {
2099
- $.value = !1;
2097
+ y <= 0 ? k.value = !1 : setTimeout(() => {
2098
+ k.value = !1;
2100
2099
  }, y);
2101
2100
  }
2102
2101
  }, { immediate: !0 });
2103
- const F = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = kt(() => {
2102
+ const F = c(() => i.loadingBgColor ? { background: i.loadingBgColor } : {}), w = $t(() => {
2104
2103
  p && !p.isDisposed() && p.resize();
2105
2104
  }, 100), I = () => {
2106
2105
  p && (p.isDisposed() || (p.off("click"), p.off("dblclick"), p.dispose()), p = null);
@@ -2143,39 +2142,39 @@ const He = { class: "h-map-wrapper" }, We = ["src"], Fe = {
2143
2142
  resize: () => w(),
2144
2143
  dispatchAction: (u) => p == null ? void 0 : p.dispatchAction(u),
2145
2144
  dispose: I
2146
- }), (u, v) => (s(), d("div", He, [
2147
- j("div", {
2145
+ }), (u, v) => (s(), d("div", Be, [
2146
+ L("div", {
2148
2147
  class: "h-map",
2149
2148
  ref_key: "mapContainer",
2150
2149
  ref: b,
2151
2150
  style: h(o.value)
2152
2151
  }, null, 4),
2153
- $.value ? (s(), d("div", {
2152
+ k.value ? (s(), d("div", {
2154
2153
  key: 0,
2155
2154
  class: "h-map-loading",
2156
2155
  style: h(F.value)
2157
2156
  }, [
2158
- j("img", {
2157
+ L("img", {
2159
2158
  src: i.loadingIcon || S(It),
2160
2159
  class: "h-map-loading-icon",
2161
2160
  alt: "loading"
2162
- }, null, 8, We),
2163
- i.loadingText ? (s(), d("span", Fe, G(i.loadingText), 1)) : T("", !0)
2161
+ }, null, 8, He),
2162
+ i.loadingText ? (s(), d("span", We, G(i.loadingText), 1)) : T("", !0)
2164
2163
  ], 4)) : T("", !0)
2165
2164
  ]));
2166
2165
  }
2167
- }), _t = /* @__PURE__ */ x(Me, [["__scopeId", "data-v-7350dc12"]]);
2166
+ }), _t = /* @__PURE__ */ x(Ee, [["__scopeId", "data-v-7350dc12"]]);
2168
2167
  _t.install = (e) => {
2169
2168
  e.component(_t.name, _t);
2170
2169
  };
2171
- const q = k(!1), Ct = k(""), Dt = k(""), $t = k("");
2170
+ const q = $(!1), Ct = $(""), Dt = $(""), kt = $("");
2172
2171
  let R = null, jt = 0;
2173
- function Qe(e) {
2172
+ function Ke(e) {
2174
2173
  jt = e;
2175
2174
  }
2176
- function Xe() {
2175
+ function Qe() {
2177
2176
  function e(n = {}) {
2178
- Ct.value = n.text ?? "加载中...", Dt.value = n.icon ?? "", $t.value = n.bgColor ?? "", q.value = !0, R && clearTimeout(R);
2177
+ Ct.value = n.text ?? "加载中...", Dt.value = n.icon ?? "", kt.value = n.bgColor ?? "", q.value = !0, R && clearTimeout(R);
2179
2178
  const a = n.duration !== void 0 ? n.duration : jt;
2180
2179
  a > 0 && (R = setTimeout(() => {
2181
2180
  q.value = !1, R = null;
@@ -2186,16 +2185,16 @@ function Xe() {
2186
2185
  }
2187
2186
  return { show: e, hide: t, visible: q };
2188
2187
  }
2189
- const Re = { class: "h-loading-box" }, Pe = ["src"], Je = {
2188
+ const Me = { class: "h-loading-box" }, Re = ["src"], Pe = {
2190
2189
  key: 0,
2191
2190
  class: "h-loading-text"
2192
- }, Ve = {
2191
+ }, Je = {
2193
2192
  name: "hLoading",
2194
2193
  chineseName: "全局加载",
2195
2194
  description: "页面级全屏 loading 遮罩,支持 router 跳转、页面刷新等场景,通过 useLoading() 全局控制"
2196
- }, Ye = /* @__PURE__ */ Object.assign(Ve, {
2195
+ }, Ve = /* @__PURE__ */ Object.assign(Je, {
2197
2196
  setup(e) {
2198
- const t = c(() => Dt.value || It), n = c(() => $t.value ? { background: $t.value } : {});
2197
+ const t = c(() => Dt.value || It), n = c(() => kt.value ? { background: kt.value } : {});
2199
2198
  return (a, i) => (s(), Gt(Wt, { to: "body" }, [
2200
2199
  Ft(Et, { name: "h-loading-fade" }, {
2201
2200
  default: Mt(() => [
@@ -2204,13 +2203,13 @@ const Re = { class: "h-loading-box" }, Pe = ["src"], Je = {
2204
2203
  class: "h-loading",
2205
2204
  style: h(n.value)
2206
2205
  }, [
2207
- j("div", Re, [
2208
- j("img", {
2206
+ L("div", Me, [
2207
+ L("img", {
2209
2208
  src: t.value,
2210
2209
  class: "h-loading-icon",
2211
2210
  alt: "loading"
2212
- }, null, 8, Pe),
2213
- S(Ct) ? (s(), d("span", Je, G(S(Ct)), 1)) : T("", !0)
2211
+ }, null, 8, Re),
2212
+ S(Ct) ? (s(), d("span", Pe, G(S(Ct)), 1)) : T("", !0)
2214
2213
  ])
2215
2214
  ], 4)) : T("", !0)
2216
2215
  ]),
@@ -2218,17 +2217,17 @@ const Re = { class: "h-loading-box" }, Pe = ["src"], Je = {
2218
2217
  })
2219
2218
  ]));
2220
2219
  }
2221
- }), xt = /* @__PURE__ */ x(Ye, [["__scopeId", "data-v-ae6739ea"]]);
2220
+ }), xt = /* @__PURE__ */ x(Ve, [["__scopeId", "data-v-ae6739ea"]]);
2222
2221
  xt.install = (e) => {
2223
2222
  e.component(xt.name, xt);
2224
2223
  };
2225
- const qe = (e) => {
2224
+ const Ye = (e) => {
2226
2225
  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
2226
+ }, Xe = {
2227
+ install: Ye
2229
2228
  };
2230
2229
  export {
2231
- Ze as default,
2230
+ Xe as default,
2232
2231
  st as hBottom,
2233
2232
  ft as hButton,
2234
2233
  yt as hButtonGroup,
@@ -2252,6 +2251,6 @@ export {
2252
2251
  mt as hText,
2253
2252
  lt as hTop,
2254
2253
  pt as hView,
2255
- Qe as setDefaultDuration,
2256
- Xe as useLoading
2254
+ Ke as setDefaultDuration,
2255
+ Qe as useLoading
2257
2256
  };
@@ -1 +1 @@
1
- (function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("echarts"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","echarts","@vueuse/core"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.HamsterCharts={},f.Vue,f.echarts,f.VueUse))})(this,function(f,t,yt,A){"use strict";function _t(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}return e.default=n,Object.freeze(e)}const dt=_t(yt),_=(n,e)=>{const o=n.__vccOpts||n;for(const[i,a]of e)o[i]=a;return o},F=_(Object.assign({name:"hPanel",chineseName:"面板",description:"页面主体容器"},{props:{url:{type:String,default:""},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)}},setup(n){let e=n,o=t.computed(()=>({position:e.position,backgroundImage:e.url?`url(${e.url})`:"none"}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-panel",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-474190fc"]]);F.install=n=>{n.component(F.name,F)};const H=_(Object.assign({name:"hHeader",chineseName:"标题",description:"页面标题容器"},{props:{url:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:"70px"},text:{type:String,default:"测试标题"},fontSize:{type:String,default:"26px"},color:{type:String,default:"#fff"},showText:{type:Boolean,default:!0},textPosition:{type:String,default:"absolute",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},textTop:{type:String,default:"50%"},textLeft:{type:String,default:"50%"},textTransform:{type:String,default:"translate(-50%, -50%)"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,backgroundImage:`url( ${e.url})`})),i=t.computed(()=>({color:e.color,fontSize:e.fontSize,position:e.textPosition,top:e.textTop,left:e.textLeft,transform:e.textTransform}));return(a,S)=>(t.openBlock(),t.createElementBlock("div",{class:"h-header",style:t.normalizeStyle(t.unref(o))},[t.unref(e).showText?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(t.unref(i))},t.toDisplayString(t.unref(e).text),5)):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b83cf769"]]);H.install=n=>{n.component(H.name,H)};const M=_(Object.assign({name:"hMain",chineseName:"主内容区",description:"页面主内容工作区"},{props:{height:{type:String,default:"200px"},display:{type:String,default:"flex"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},padding:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({height:e.height!=="auto"||e.height!=="0"?`calc(100% - ${e.height})`:e.height,display:e.display,columnGap:e.columnGap,rowGap:e.rowGap,padding:e.padding}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-main",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-1025786b"]]);M.install=n=>{n.component(M.name,M)};const St={class:"def-text"},O=_(Object.assign({name:"hChartTitle",chineseName:"图表标题",description:"图表标题组件"},{props:{fontSize:{type:String,default:"16px"},url:{type:String,default:""},height:{type:String,default:"50px"},paddingLeft:{type:String,default:"auto"},paddingRight:{type:String,default:"auto"},paddingTop:{type:String,default:"auto"},paddingBottom:{type:String,default:"auto"},color:{type:String,default:"#fff"},text:{type:String,default:"测试标题"},display:{type:String,default:"block"},textAlign:{type:String,default:"start"},alignItems:{type:String,default:"center"},justifyContent:{type:String,default:"start"},position:{type:String,default:"relative"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,color:e.color,display:e.display,textAlign:e.textAlign,alignItems:e.alignItems,justifyContent:e.justifyContent,position:e.position}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart-title",style:t.normalizeStyle(t.unref(o))},[t.createElementVNode("span",St,t.toDisplayString(t.unref(e).text),1),t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-412bbd72"]]),pt="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"},bt=["src"],kt={key:0,class:"loading-text"},W=_(Object.assign({name:"hChart",chineseName:"图表",description:"基于 ECharts 的图表容器组件,支持自适应和事件交互"},{props:{height:{type:String,default:"auto"},showChart:{type:Boolean,default:!0},url:{type:String,default:""},flex:{type:Number,default:.3},option:{type:Object,required:!0},tooltipLoop:{type:[Boolean,Object],default:!1},title:{type:[String,Object],default:""},showTitle:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.computed(()=>({backgroundImage:a.url?`url(${a.url})`:"none",flex:a.flex,height:a.height})),d=t.ref(null);let l=null;const w=t.useSlots(),z=t.computed(()=>!!w.default),T=t.computed(()=>a.title?typeof a.title=="string"?{text:a.title}:a.title:null),x=t.ref(!1);let b=0;t.watch(()=>a.loading,s=>{if(s)x.value=!0,b=Date.now();else{const r=Date.now()-b,u=(a.loadingMinDuration||0)-r;u<=0?x.value=!1:setTimeout(()=>{x.value=!1},u)}},{immediate:!0});const y=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),c=t.computed(()=>{if(!a.tooltipLoop)return null;if(a.tooltipLoop===!0)return{interval:2e3,seriesIndex:0,loop:!0,pauseOnHover:!0};const s=a.tooltipLoop;return{interval:s.interval??2e3,seriesIndex:s.seriesIndex??0,loop:s.loop??!0,pauseOnHover:s.pauseOnHover??!0}});let h=null,g=0,B=!1,$=!0;const k=()=>{var s,r;try{const u=(s=a.option)==null?void 0:s.series;if(!u||!Array.isArray(u))return 0;const I=u[((r=c.value)==null?void 0:r.seriesIndex)??0];return I!=null&&I.data?I.data.length:0}catch{return 0}},E=()=>{if(!l||!c.value||B||!$)return;const s=k();s!==0&&(l.dispatchAction({type:"showTip",seriesIndex:c.value.seriesIndex,dataIndex:g}),g++,g>=s&&(c.value.loop?g=0:D()))},C=()=>{D(),!(!c.value||k()===0)&&(g=0,h=setInterval(E,c.value.interval))},D=()=>{h&&(clearInterval(h),h=null),l&&l.dispatchAction({type:"hideTip"})},st=()=>{B=!0},G=()=>{B=!1},L=A.useDebounceFn(()=>{l&&(l.resize(),i("chart-resize",{instance:l}))},100),ut=()=>{var r;if(!l)return;["click","dblclick","mouseover","mouseout"].forEach(u=>{l.on(u,I=>{i(`chart-${u}`,I)})}),(r=c.value)!=null&&r.pauseOnHover&&(l.on("mouseover",()=>{st()}),l.on("mouseout",()=>{G()}))},V=()=>{l&&(D(),["click","dblclick","mouseover","mouseout"].forEach(r=>{l.off(r)}),l.dispose(),l=null)},m=()=>{if(V(),!!d.value)try{const s=p(a.option);l=dt.init(d.value),l.setOption(s,{notMerge:!0}),ut(),i("chart-ready",{instance:l,dom:d.value}),C()}catch(s){console.error("ECharts initialization failed:",s)}},p=s=>{if(!s||typeof s!="object")return{series:[]};const r=JSON.parse(JSON.stringify(s));return r.series?Array.isArray(r.series)||(r.series=[r.series]):r.series=[],r.series=r.series.map(u=>{if(!u||typeof u!="object")return{type:"line"};const I={type:"line",...u,type:u.type||"line"};return I.type==="pie"&&I.data&&(I.data=I.data.map(ct=>typeof ct=="object"&&ct!==null?{type:"line",...ct,type:ct.type||"line"}:ct)),I}),r.xAxis?Array.isArray(r.xAxis)?r.xAxis=r.xAxis.map(u=>!u||typeof u!="object"?{type:"category"}:{type:"category",...u,type:u.type||"category"}):typeof r.xAxis=="object"?r.xAxis={type:"category",...r.xAxis,type:r.xAxis.type||"category"}:r.xAxis={type:"category"}:r.xAxis={type:"category"},r.yAxis?Array.isArray(r.yAxis)?r.yAxis=r.yAxis.map(u=>!u||typeof u!="object"?{type:"value"}:{type:"value",...u,type:u.type||"value"}):typeof r.yAxis=="object"?r.yAxis={type:"value",...r.yAxis,type:r.yAxis.type||"value"}:r.yAxis={type:"value"}:r.yAxis={type:"value"},r.legend&&(typeof r.legend=="object"&&!Array.isArray(r.legend)||Array.isArray(r.legend)&&(r.legend={data:r.legend})),r},N=()=>{L()};return t.onMounted(()=>{setTimeout(()=>{m()},0),window.addEventListener("resize",N),A.useResizeObserver(d,s=>{L()}),a.tooltipLoop&&A.useIntersectionObserver(d,([s])=>{$=s.isIntersecting,$?G():st()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",N),D(),V()}),t.watch(()=>a.option,(s,r)=>{if(s)try{const u=p(s);if(!l){m();return}l.clear(),l.setOption(u,{notMerge:!0}),C(),i("chart-update",{instance:l,option:u})}catch(u){console.error("更新图表配置时出错:",u),console.error(" 错误堆栈:",u.stack)}},{deep:!0}),t.watch(()=>a.showChart,s=>{l&&setTimeout(()=>{l.resize()},0)}),e({getInstance:()=>l,resize:()=>L(),dispatchAction:s=>l==null?void 0:l.dispatchAction(s),dispose:V,startLoop:C,stopLoop:D,pauseLoop:st,resumeLoop:G}),(s,r)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart",style:t.normalizeStyle(S.value)},[z.value?t.renderSlot(s.$slots,"default",{key:0},void 0,!0):T.value&&a.showTitle?(t.openBlock(),t.createBlock(O,t.normalizeProps(t.mergeProps({key:1},T.value)),null,16)):t.createCommentVNode("",!0),t.createElementVNode("div",xt,[t.withDirectives(t.createElementVNode("div",{class:"chart",ref_key:"charts",ref:d},null,512),[[t.vShow,a.showChart]]),x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"chart-loading",style:t.normalizeStyle(y.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"loading-icon",alt:"loading"},null,8,bt),a.loadingText?(t.openBlock(),t.createElementBlock("span",kt,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)])],4))}}),[["__scopeId","data-v-c9b75a2f"]]);W.install=n=>{n.component(W.name,W)};const R=_(Object.assign({name:"hLeft",chineseName:"左侧",description:"页面左侧容器"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-left",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-7d94e3d8"]]);R.install=n=>{n.component(R.name,R)};const P=_(Object.assign({name:"hRight",chineseName:"右侧",description:"页面右侧容器"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-right",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-8ef316d0"]]);P.install=n=>{n.component(P.name,P)};const q=_(Object.assign({name:"hCenter",chineseName:"居中布局",description:"水平居中布局容器"},{props:{width:{type:String,default:"50%"},height:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-center",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-69a501ea"]]);q.install=n=>{n.component(q.name,q)};const J=_(Object.assign({name:"hTop",chineseName:"顶部",description:"页面顶部容器"},{props:{height:{type:String,default:"70%"},display:{type:String,default:"block"},position:{type:String,default:"relative"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,display:e.display,position:e.position}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-top",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-ee9ecf79"]]);J.install=n=>{n.component(J.name,J)};const U=_(Object.assign({name:"hBottom",chineseName:"底部",description:"页面底部容器"},{props:{height:{type:String,default:"30%"},display:{type:String,default:"flex"},gap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},columnGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-bottom",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-9fc5eff9"]]);U.install=n=>{n.component(U.name,U)},O.install=n=>{n.component(O.name,O)};const wt={class:"h-item-chart-wrapper"},Bt=["src"],$t={key:0,class:"h-item-chart-loading-text"},Y=_(Object.assign({name:"hItemChart",chineseName:"独立图表",description:"独立的 ECharts 图表容器组件,支持 loading、tooltip 轮播,适用于大屏数据可视化展示"},{props:{height:{type:String,default:"200px"},url:{type:String,default:""},option:{type:Object,required:!0},tooltipLoop:{type:[Boolean,Object],default:!1},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.computed(()=>({backgroundImage:a.url?`url(${a.url})`:"none",height:a.height})),d=t.ref(null);let l=null;const w=t.ref(!1);let z=0;t.watch(()=>a.loading,m=>{if(m)w.value=!0,z=Date.now();else{const p=(a.loadingMinDuration||0)-(Date.now()-z);p<=0?w.value=!1:setTimeout(()=>{w.value=!1},p)}},{immediate:!0});const T=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),x=t.computed(()=>{if(!a.tooltipLoop)return null;if(a.tooltipLoop===!0)return{interval:2e3,seriesIndex:0,loop:!0,pauseOnHover:!0};const m=a.tooltipLoop;return{interval:m.interval??2e3,seriesIndex:m.seriesIndex??0,loop:m.loop??!0,pauseOnHover:m.pauseOnHover??!0}});let b=null,y=0,c=!1,h=!0;const g=()=>{var m,p,N;try{const s=(m=a.option)==null?void 0:m.series;if(!s||!Array.isArray(s))return 0;const r=s[((p=x.value)==null?void 0:p.seriesIndex)??0];return((N=r==null?void 0:r.data)==null?void 0:N.length)??0}catch{return 0}},B=()=>{if(!l||!x.value||c||!h)return;const m=g();m!==0&&(l.dispatchAction({type:"showTip",seriesIndex:x.value.seriesIndex,dataIndex:y}),y++,y>=m&&(x.value.loop?y=0:k()))},$=()=>{k(),!(!x.value||g()===0)&&(y=0,b=setInterval(B,x.value.interval))},k=()=>{b&&(clearInterval(b),b=null),l&&l.dispatchAction({type:"hideTip"})},E=()=>{c=!0},C=()=>{c=!1},D=A.useDebounceFn(()=>{l&&(l.resize(),i("chart-resize",{instance:l}))},100),st=()=>{var p;if(!l)return;["click","dblclick","mouseover","mouseout"].forEach(N=>l.on(N,s=>i(`chart-${N}`,s))),(p=x.value)!=null&&p.pauseOnHover&&(l.on("mouseover",()=>E()),l.on("mouseout",()=>C()))},G=()=>{l&&(k(),["click","dblclick","mouseover","mouseout"].forEach(p=>l.off(p)),l.dispose(),l=null)},L=()=>{if(G(),!!d.value)try{l=dt.init(d.value),l.setOption(ut(a.option),{notMerge:!0}),st(),i("chart-ready",{instance:l,dom:d.value}),$()}catch(m){console.error("[hItemChart] init:",m)}},ut=m=>{if(!m||typeof m!="object")return{series:[]};const p=JSON.parse(JSON.stringify(m));p.series?Array.isArray(p.series)||(p.series=[p.series]):p.series=[],p.series=p.series.map(s=>{if(!s||typeof s!="object")return{type:"line"};const r={type:"line",...s,type:s.type||"line"};return r.type==="pie"&&r.data&&(r.data=r.data.map(u=>typeof u=="object"&&u!==null?{value:u.value||0,name:u.name||""}:u)),r});const N=(s,r)=>{p[s]?Array.isArray(p[s])?p[s]=p[s].map(u=>({type:r,...u,type:u.type||r})):typeof p[s]=="object"?p[s]={type:r,...p[s],type:p[s].type||r}:p[s]={type:r}:p[s]={type:r}};return N("xAxis","category"),N("yAxis","value"),p.legend&&Array.isArray(p.legend)&&(p.legend={data:p.legend}),p},V=()=>D();return t.onMounted(()=>{setTimeout(()=>L(),0),window.addEventListener("resize",V),A.useResizeObserver(d,()=>D()),a.tooltipLoop&&A.useIntersectionObserver(d,([m])=>{h=m.isIntersecting,h?C():E()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",V),k(),G()}),t.watch(()=>a.option,m=>{if(m)try{if(!l){L();return}l.clear(),l.setOption(ut(m),{notMerge:!0}),$(),i("chart-update",{instance:l,option:m})}catch(p){console.error("[hItemChart] update:",p)}},{deep:!0}),e({getInstance:()=>l,resize:()=>D(),dispatchAction:m=>l==null?void 0:l.dispatchAction(m),dispose:G,startLoop:$,stopLoop:k,pauseLoop:E,resumeLoop:C}),(m,p)=>(t.openBlock(),t.createElementBlock("div",wt,[t.createElementVNode("div",{class:"h-item-chart",ref_key:"itemCharts",ref:d,style:t.normalizeStyle(S.value)},null,4),w.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-item-chart-loading",style:t.normalizeStyle(T.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"h-item-chart-loading-icon",alt:"loading"},null,8,Bt),a.loadingText?(t.openBlock(),t.createElementBlock("span",$t,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4585b2db"]]);Y.install=n=>{n.component(Y.name,Y)};const K=_(Object.assign({name:"hList",chineseName:"滚动列表",description:"支持自动滚动的数据列表组件,适用于大屏数据展示"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},backgroundColor:{type:String,default:"transparent"},data:{type:Array,default:()=>[]},header:{type:Array,default:()=>[]},showHeader:{type:Boolean,default:!1},enableScroll:{type:Boolean,default:!0},headerHeight:{type:String,default:"40px"},headerBackground:{type:String,default:"rgba(255, 255, 255, 0.1)"},scrollDuration:{type:Number,default:2e3},scrollSpeed:{type:Number,default:500},highlightStyle:{type:Object,default:()=>({background:"rgba(0, 102, 255, 0.3)",color:"#fff",boxShadow:"0 0 10px rgba(0, 102, 255, 0.5)"})}},setup(n,{expose:e}){const o=n,i=t.ref(0),a=t.ref(null),S=t.ref(0),d=t.ref([]),l=t.ref(null),w=t.computed(()=>({width:o.width,height:o.height,backgroundColor:o.backgroundColor,position:"relative",overflow:"hidden"})),z=t.computed(()=>({height:o.headerHeight,display:"flex",alignItems:"center",background:o.headerBackground,position:"absolute",top:0,left:0,zIndex:10,width:"100%"})),T=t.computed(()=>({transform:`translateY(-${i.value*S.value}px)`,transition:`transform ${o.scrollSpeed}ms ease-in-out`,marginTop:o.showHeader?o.headerHeight:"0"})),x=g=>g===a.value?o.highlightStyle:{};t.watch(i,g=>{if(o.data.length>0){const B=g%o.data.length;a.value=B}});let b=null;const y=()=>{!o.enableScroll||o.data.length===0||(clearInterval(b),b=setInterval(()=>{i.value=(i.value+1)%o.data.length},o.scrollDuration))},c=()=>{b&&(clearInterval(b),b=null)},h=()=>{d.value&&d.value[0]&&(S.value=d.value[0].offsetHeight||40)};return t.onMounted(()=>{h(),y(),window.addEventListener("resize",h)}),t.onBeforeUnmount(()=>{c(),window.removeEventListener("resize",h)}),t.watch(()=>o.data,g=>{g.length>0?(i.value=0,a.value=null,setTimeout(()=>{h(),y()},100)):c()},{deep:!0}),t.watch(()=>o.enableScroll,g=>{g?y():(c(),i.value=0)}),e({startScroll:y,stopScroll:c,getCurrentIndex:()=>i.value,scrollTo:g=>{g>=0&&g<o.data.length&&(i.value=g)}}),(g,B)=>(t.openBlock(),t.createElementBlock("div",{class:"h-list",style:t.normalizeStyle(w.value)},[n.showHeader?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-header",style:t.normalizeStyle(z.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.header,($,k)=>(t.openBlock(),t.createElementBlock("p",{key:k,class:"header-item"},t.toDisplayString($),1))),128))],4)):t.createCommentVNode("",!0),n.enableScroll?(t.openBlock(),t.createElementBlock("div",{key:1,class:"scroll-wrapper",style:t.normalizeStyle(T.value)},[t.createElementVNode("div",{class:"data-list",ref_key:"listContainer",ref:l},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.data,($,k)=>(t.openBlock(),t.createElementBlock("div",{key:k,class:"data-list-item",style:t.normalizeStyle(x(k)),ref_for:!0,ref_key:"listItems",ref:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($,(E,C)=>(t.openBlock(),t.createElementBlock("p",{key:C,class:"data-item-cell"},t.toDisplayString(E),1))),128))],4))),128))],512)],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-937cc59c"]]);K.install=n=>{n.component(K.name,K)};const Q=_(Object.assign({name:"hView",chineseName:"视图",description:"通用视图容器组件"},{props:{url:{type:String,default:""},height:{type:String,default:"200px"},width:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},flex:{type:String,default:"0.2"},position:{type:String,default:"relative"},top:{type:String,default:"auto"},left:{type:String,default:"auto"},alignItems:{type:String,default:"center"},justifyContent:{type:String,default:"start"},padding:{type:String,default:"0"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,rowGap:e.rowGap,columnGap:e.columnGap,flex:e.flex,position:e.position,top:e.top,left:e.left,alignItems:e.alignItems,justifyContent:e.justifyContent,padding:e.padding,backgroundImage:e.url?`url(${e.url})`:"none"}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-view",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-c79a990c"]]);Q.install=n=>{n.component(Q.name,Q)};const X=_(Object.assign({name:"hDataLabel",chineseName:"数据标签",description:"数值与文本标签展示组件"},{props:{url:{type:String,default:""},num:{type:Number,default:12345},text:{type:String,default:"测试"},someText:{type:String,default:"测试"},show:{type:Boolean,default:!0},width:{type:String,default:"230px"},height:{type:String,default:"54px"},position:{type:String,default:"absolute"},left:{type:String,default:"0"},right:{type:String,default:""},top:{type:String,default:"0"},bottom:{type:String,default:""},zIndex:{type:String,default:"1"},display:{type:String,default:"flex"},border:{type:String,default:"none"},flexDirection:{type:String,default:"column"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},color:{type:String,default:"#fff"},numFontSize:{type:String,default:"20px"},numFontWeight:{type:String,default:"600"},numColor:{type:String,default:"#fff"},textFontSize:{type:String,default:"10px"},textFontWeight:{type:String,default:""},textColor:{type:String,default:"#fff"},titlelineHeight:{type:String,default:""},titletextAlign:{type:String,default:""},titleFontSize:{type:String,default:"10px"},titleFontWeight:{type:String,default:""},titleColor:{type:String,default:"#fff"},titleShow:{type:Boolean,default:!1}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,zIndex:e.zIndex,display:e.display,border:e.border,backgroundImage:e.url?`url(${e.url})`:"none",flexDirection:e.flexDirection,justifyContent:e.justifyContent,alignItems:e.alignItems,color:e.color})),i=t.computed(()=>({fontSize:e.numFontSize,fontWeight:e.numFontWeight,color:e.numColor})),a=t.computed(()=>({fontSize:e.textFontSize,fontWeight:e.textFontWeight,color:e.textColor})),S=t.computed(()=>({fontSize:e.titleFontSize,fontWeight:e.titleFontWeight,color:e.titleColor,lineHeight:e.titlelineHeight,textAlign:e.titletextAlign}));return(d,l)=>(t.openBlock(),t.createElementBlock("div",{class:"h-data-label",style:t.normalizeStyle(t.unref(o))},[n.show?(t.openBlock(),t.createElementBlock("span",{key:0,class:"h-data-label-num",style:t.normalizeStyle(t.unref(i))},t.toDisplayString(n.num),5)):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("span",{key:1,class:"h-data-label-text",style:t.normalizeStyle(t.unref(a))},t.toDisplayString(n.text),5)):t.createCommentVNode("",!0),n.titleShow?(t.openBlock(),t.createElementBlock("span",{key:2,class:"h-data-label-title",style:t.normalizeStyle(t.unref(S))},t.toDisplayString(n.someText),5)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-5b0fbecc"]]);X.install=n=>{n.component(X.name,X)};const Z=_(Object.assign({name:"hButton",chineseName:"按钮",description:"可自定义样式的按钮组件"},{props:{url:{type:String,default:""},padding:{type:String,default:"5px 15px"},margin:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},fontSize:{type:String,default:""},fontWeight:{type:Number,default:400},color:{type:String,default:""},border:{type:String,default:""},text:{type:String,default:"测试按钮"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,padding:e.padding,margin:e.margin,border:e.border,backgroundImage:e.url?`url(${e.url})`:"none",fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.color}));return(i,a)=>(t.openBlock(),t.createElementBlock("button",{class:"h-button",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-533f0ead"]]);Z.install=n=>{n.component(Z.name,Z)};const v=_(Object.assign({name:"hGrid",chineseName:"网格布局",description:"基于 CSS Grid 的网格布局容器"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"200px"},url:{type:String,default:""},display:{type:String,default:"grid"},gridTemplateColumns:{type:String,default:"repeat(3, 1fr)"},gridTemplateRows:{type:String,default:"auto"},gap:{type:String,default:"0"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},padding:{type:String,default:"0"},justifyItems:{type:String,default:""},alignItems:{type:String,default:""},justifyContent:{type:String,default:""},alignContent:{type:String,default:""},gridAutoFlow:{type:String,default:""},gridAutoRows:{type:String,default:""},gridAutoColumns:{type:String,default:""}},setup(n){let e=n,o=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",gridTemplateColumns:e.gridTemplateColumns,gridTemplateRows:e.gridTemplateRows,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,padding:e.padding,justifyItems:e.justifyItems||void 0,alignItems:e.alignItems||void 0,justifyContent:e.justifyContent||void 0,alignContent:e.alignContent||void 0,gridAutoFlow:e.gridAutoFlow||void 0,gridAutoRows:e.gridAutoRows||void 0,gridAutoColumns:e.gridAutoColumns||void 0}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-grid",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-d4038f65"]]);v.install=n=>{n.component(v.name,v)};const tt=_(Object.assign({name:"hCounter",chineseName:"数字计数器",description:"支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"},{props:{data:{type:[Number,String],default:123456},width:{type:String,default:"auto"},height:{type:String,default:"auto"},backgroundColor:{type:String,default:"transparent"},backgroundImage:{type:String,default:""},display:{type:String,default:"flex"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},gap:{type:String,default:"5px"},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},zIndex:{type:Number,default:1},digitWidth:{type:String,default:""},digitHeight:{type:String,default:""},digitBackgroundImage:{type:String,default:""},digitColor:{type:String,default:"#fff"},digitFontSize:{type:String,default:"32px"},digitFontWeight:{type:String,default:"bold"},digitBackgroundColor:{type:String,default:"transparent"},digitBorderRadius:{type:String,default:"4px"},showSeparator:{type:Boolean,default:!1},separator:{type:String,default:","},decimalPlaces:{type:Number,default:-1},prefix:{type:String,default:""},suffix:{type:String,default:""},enableAnimation:{type:Boolean,default:!0},animationDuration:{type:Number,default:2e3},digitDelay:{type:Number,default:100},transform:{type:String,default:"none"}},setup(n,{expose:e}){const o=n,i=t.ref([]),a=t.ref(!1),S=t.computed(()=>{let y=o.data;o.decimalPlaces>=0&&typeof y=="number"&&(y=y.toFixed(o.decimalPlaces));let c=String(y);if(o.showSeparator&&typeof o.data=="number"){const h=c.split(".");h[0]=h[0].replace(/\B(?=(\d{3})+(?!\d))/g,o.separator),c=h.join(".")}return o.prefix&&(c=o.prefix+c),o.suffix&&(c=c+o.suffix),c.split("")}),d=t.computed(()=>o.digitWidth?o.digitWidth:`${(parseInt(o.digitFontSize)||32)*1.2}px`),l=t.computed(()=>o.digitHeight?o.digitHeight:`${(parseInt(o.digitFontSize)||32)*1.5}px`),w=()=>{if(!o.enableAnimation){i.value=S.value.map(()=>0);return}a.value=!0,i.value=S.value.map(()=>0);const y=S.value;y.forEach((c,h)=>{if(isNaN(parseInt(c))){i.value[h]=c;return}const g=parseInt(c),B=h*o.digitDelay,$=o.animationDuration;setTimeout(()=>{let k=0;const E=$/(g+1),C=()=>{k<=g&&(i.value[h]=k,k++,k<=g?setTimeout(C,E):(h===y.length-1||y.slice(h+1).every(D=>isNaN(parseInt(D))))&&(a.value=!1))};C()},B)})},z=y=>{const c=i.value[y];if(isNaN(parseInt(c)))return{transform:"translateY(0)",transition:"none"};const h=parseInt(l.value)||60;return{transform:`translateY(${-parseInt(c)*h}px)`,transition:`transform ${o.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`}},T=t.computed(()=>({width:o.width,height:o.height,backgroundColor:o.backgroundColor,backgroundImage:o.backgroundImage?`url(${o.backgroundImage})`:"none",display:o.display,justifyContent:o.justifyContent,alignItems:o.alignItems,gap:o.gap,position:o.position,left:o.left||void 0,right:o.right||void 0,top:o.top||void 0,bottom:o.bottom||void 0,zIndex:o.zIndex,transform:o.transform||void 0})),x=t.computed(()=>({width:d.value,height:l.value,overflow:"hidden",position:"relative",borderRadius:o.digitBorderRadius,backgroundColor:o.digitBackgroundColor})),b=t.computed(()=>({width:"100%",height:l.value,color:o.digitColor,fontSize:o.digitFontSize,fontWeight:o.digitFontWeight,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",flexShrink:0,lineHeight:"1"}));return t.watch(()=>o.data,()=>{w()}),t.onMounted(()=>{w()}),e({restart:w,getCurrentValue:()=>i.value.join("")}),(y,c)=>(t.openBlock(),t.createElementBlock("div",{class:"h-counter",style:t.normalizeStyle(T.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value,(h,g)=>(t.openBlock(),t.createElementBlock("div",{key:g,class:"counter-digit",style:t.normalizeStyle(x.value)},[t.createElementVNode("div",{class:"digit-scroll",style:t.normalizeStyle(z(g))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(10,B=>t.createElementVNode("div",{key:B-1,class:"digit-item",style:t.normalizeStyle(b.value)},t.toDisplayString(B-1),5)),64))],4)],4))),128)),t.renderSlot(y.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-fba32a26"]]);tt.install=n=>{n.component(tt.name,tt)};const et=_(Object.assign({name:"hButtonGroup",chineseName:"按钮组",description:"按钮组容器,支持 flex 布局排列"},{props:{width:{type:String,default:""},height:{type:String,default:""},gap:{type:String,default:"5px"},rowGap:{type:String,default:"5px"},columnGap:{type:String,default:"5px"},position:{type:String,default:"relative"},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},display:{type:String,default:"flex"},flexWrap:{type:String,default:"nowrap"}},setup(n){let e=n,o=t.computed(()=>({position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,flexWrap:e.flexWrap,width:e.width,height:e.height}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-button-group",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-f90f2b62"]]);et.install=n=>{n.component(et.name,et)};const nt=_(Object.assign({name:"hText",chineseName:"文本",description:"用于显示文本内容"},{props:{text:{type:String,default:"测试文字"},fontSize:{type:String,default:"16px"},color:{type:String,default:"#fff"}},setup(n){let e=n,o=t.computed(()=>({fontSize:e.fontSize,color:e.color}));return(i,a)=>(t.openBlock(),t.createElementBlock("span",{class:"h-text",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-7fb2fc92"]]);nt.install=n=>{n.component(nt.name,nt)};const ot=_(Object.assign({name:"hLayout",chineseName:"布局",description:"页面布局容器"},{props:{width:{type:String,default:"25%"},height:{type:String,default:"100%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-layout",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-957ea318"]]);ot.install=n=>{n.component(ot.name,ot)};const at=_(Object.assign({name:"hFlex",chineseName:"弹性布局",description:"基于 CSS Flexbox 的弹性布局容器"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100px"},url:{type:String,default:""},display:{type:String,default:"flex"},flexDirection:{type:String,default:""},flexWrap:{type:String,default:"wrap"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},padding:{type:String,default:"0"}},setup(n){let e=n,o=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",rowGap:e.rowGap,columnGap:e.columnGap,padding:e.padding,flexDirection:e.flexDirection,flexWrap:e.flexWrap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-flex",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6ecd9f03"]]);at.install=n=>{n.component(at.name,at)};const Ct={class:"h-map-wrapper"},It=["src"],zt={key:0,class:"h-map-loading-text"},it=_(Object.assign({name:"hMap",chineseName:"地图",description:"基于 ECharts 的高自定义地图组件,支持 GeoJSON 注册、多层 geo 叠加、散点标记等"},{props:{mapName:{type:String,required:!0},mapJson:{type:Object,required:!0},option:{type:Object,required:!0},roam:{type:[Boolean,String],default:!1},height:{type:String,default:"100%"},width:{type:String,default:"100%"},url:{type:String,default:""},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-click","chart-dblclick"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.ref(null);let d=null;const l=t.computed(()=>({width:a.width,height:a.height,backgroundImage:a.url?`url(${a.url})`:"none",backgroundSize:"100% 100%",backgroundRepeat:"no-repeat"})),w=t.ref(!1);let z=0;t.watch(()=>a.loading,c=>{if(c)w.value=!0,z=Date.now();else{const h=Date.now()-z,g=(a.loadingMinDuration||0)-h;g<=0?w.value=!1:setTimeout(()=>{w.value=!1},g)}},{immediate:!0});const T=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),x=A.useDebounceFn(()=>{d&&!d.isDisposed()&&d.resize()},100),b=()=>{d&&(d.isDisposed()||(d.off("click"),d.off("dblclick"),d.dispose()),d=null)},y=()=>{if(b(),!!S.value)try{dt.registerMap(a.mapName,a.mapJson),d=dt.init(S.value),d.on("click",c=>{i("chart-click",c)}),d.on("dblclick",c=>{i("chart-dblclick",c)}),d.setOption(a.option,{notMerge:!0}),i("chart-ready",{instance:d,dom:S.value})}catch(c){console.error("[h-map] 初始化失败:",c)}};return t.watch(()=>a.mapJson,()=>{t.nextTick(()=>{y()})}),t.watch(()=>a.option,c=>{if(!(!c||!d||d.isDisposed()))try{d.setOption(c,{notMerge:!0})}catch(h){console.error("[h-map] 更新配置失败:",h)}},{deep:!0}),t.onMounted(()=>{t.nextTick(()=>{y()}),A.useResizeObserver(S,()=>{x()})}),t.onBeforeUnmount(()=>{b()}),e({getInstance:()=>d,resize:()=>x(),dispatchAction:c=>d==null?void 0:d.dispatchAction(c),dispose:b}),(c,h)=>(t.openBlock(),t.createElementBlock("div",Ct,[t.createElementVNode("div",{class:"h-map",ref_key:"mapContainer",ref:S,style:t.normalizeStyle(l.value)},null,4),w.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-map-loading",style:t.normalizeStyle(T.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"h-map-loading-icon",alt:"loading"},null,8,It),a.loadingText?(t.openBlock(),t.createElementBlock("span",zt,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-7350dc12"]]);it.install=n=>{n.component(it.name,it)};const lt=t.ref(!1),ft=t.ref(""),mt=t.ref(""),gt=t.ref("");let j=null,ht=0;function Dt(n){ht=n}function Nt(){function n(o={}){ft.value=o.text??"加载中...",mt.value=o.icon??"",gt.value=o.bgColor??"",lt.value=!0,j&&clearTimeout(j);const i=o.duration!==void 0?o.duration:ht;i>0&&(j=setTimeout(()=>{lt.value=!1,j=null},i))}function e(){j&&(clearTimeout(j),j=null),lt.value=!1}return{show:n,hide:e,visible:lt}}const Tt={class:"h-loading-box"},Et=["src"],At={key:0,class:"h-loading-text"},rt=_(Object.assign({name:"hLoading",chineseName:"全局加载",description:"页面级全屏 loading 遮罩,支持 router 跳转、页面刷新等场景,通过 useLoading() 全局控制"},{setup(n){const e=t.computed(()=>mt.value||pt),o=t.computed(()=>gt.value?{background:gt.value}:{});return(i,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"h-loading-fade"},{default:t.withCtx(()=>[t.unref(lt)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-loading",style:t.normalizeStyle(o.value)},[t.createElementVNode("div",Tt,[t.createElementVNode("img",{src:e.value,class:"h-loading-icon",alt:"loading"},null,8,Et),t.unref(ft)?(t.openBlock(),t.createElementBlock("span",At,t.toDisplayString(t.unref(ft)),1)):t.createCommentVNode("",!0)])],4)):t.createCommentVNode("",!0)]),_:1})]))}}),[["__scopeId","data-v-ae6739ea"]]);rt.install=n=>{n.component(rt.name,rt)};const jt={install:n=>{n.use(F),n.use(H),n.use(ot),n.use(M),n.use(W),n.use(R),n.use(P),n.use(q),n.use(J),n.use(U),n.use(O),n.use(Y),n.use(K),n.use(Q),n.use(X),n.use(Z),n.use(v),n.use(tt),n.use(et),n.use(nt),n.use(at),n.use(it),n.use(rt)}};f.default=jt,f.hBottom=U,f.hButton=Z,f.hButtonGroup=et,f.hCenter=q,f.hChart=W,f.hChartTitle=O,f.hCounter=tt,f.hDataLabel=X,f.hFlex=at,f.hGrid=v,f.hHeader=H,f.hItemChart=Y,f.hLayout=ot,f.hLeft=R,f.hList=K,f.hLoading=rt,f.hMain=M,f.hMap=it,f.hPanel=F,f.hRight=P,f.hText=nt,f.hTop=J,f.hView=Q,f.setDefaultDuration=Dt,f.useLoading=Nt,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("echarts"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","echarts","@vueuse/core"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.HamsterCharts={},f.Vue,f.echarts,f.VueUse))})(this,function(f,t,ht,E){"use strict";function _t(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}return e.default=n,Object.freeze(e)}const dt=_t(ht),_=(n,e)=>{const o=n.__vccOpts||n;for(const[i,a]of e)o[i]=a;return o},F=_(Object.assign({name:"hPanel",chineseName:"面板",description:"页面主体容器"},{props:{url:{type:String,default:""},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)}},setup(n){let e=n,o=t.computed(()=>({position:e.position,backgroundImage:e.url?`url(${e.url})`:"none"}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-panel",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-474190fc"]]);F.install=n=>{n.component(F.name,F)};const H=_(Object.assign({name:"hHeader",chineseName:"标题",description:"页面标题容器"},{props:{url:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:"70px"},text:{type:String,default:"测试标题"},fontSize:{type:String,default:"26px"},color:{type:String,default:"#fff"},showText:{type:Boolean,default:!0},textPosition:{type:String,default:"absolute",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},textTop:{type:String,default:"50%"},textLeft:{type:String,default:"50%"},textTransform:{type:String,default:"translate(-50%, -50%)"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,backgroundImage:`url( ${e.url})`})),i=t.computed(()=>({color:e.color,fontSize:e.fontSize,position:e.textPosition,top:e.textTop,left:e.textLeft,transform:e.textTransform}));return(a,S)=>(t.openBlock(),t.createElementBlock("div",{class:"h-header",style:t.normalizeStyle(t.unref(o))},[t.unref(e).showText?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(t.unref(i))},t.toDisplayString(t.unref(e).text),5)):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b83cf769"]]);H.install=n=>{n.component(H.name,H)};const M=_(Object.assign({name:"hMain",chineseName:"主内容区",description:"页面主内容工作区"},{props:{height:{type:String,default:"200px"},display:{type:String,default:"flex"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},padding:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({height:e.height!=="auto"||e.height!=="0"?`calc(100% - ${e.height})`:e.height,display:e.display,columnGap:e.columnGap,rowGap:e.rowGap,padding:e.padding}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-main",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-1025786b"]]);M.install=n=>{n.component(M.name,M)};const St={class:"def-text"},O=_(Object.assign({name:"hChartTitle",chineseName:"图表标题",description:"图表标题组件"},{props:{fontSize:{type:String,default:"16px"},url:{type:String,default:""},height:{type:String,default:"50px"},paddingLeft:{type:String,default:"auto"},paddingRight:{type:String,default:"auto"},paddingTop:{type:String,default:"auto"},paddingBottom:{type:String,default:"auto"},color:{type:String,default:"#fff"},text:{type:String,default:"测试标题"},display:{type:String,default:"block"},textAlign:{type:String,default:"start"},alignItems:{type:String,default:"center"},justifyContent:{type:String,default:"start"},position:{type:String,default:"relative"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,backgroundImage:`url(${e.url})`,fontSize:e.fontSize,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,color:e.color,display:e.display,textAlign:e.textAlign,alignItems:e.alignItems,justifyContent:e.justifyContent,position:e.position}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart-title",style:t.normalizeStyle(t.unref(o))},[t.createElementVNode("span",St,t.toDisplayString(t.unref(e).text),1),t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-412bbd72"]]),pt="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"},bt=["src"],kt={key:0,class:"loading-text"},W=_(Object.assign({name:"hChart",chineseName:"图表",description:"基于 ECharts 的图表容器组件,支持自适应和事件交互"},{props:{height:{type:String,default:"auto"},showChart:{type:Boolean,default:!0},url:{type:String,default:""},flex:{type:Number,default:.3},option:{type:Object,required:!0},tooltipLoop:{type:[Boolean,Object],default:!1},title:{type:[String,Object],default:""},showTitle:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.computed(()=>({backgroundImage:a.url?`url(${a.url})`:"none",flex:a.flex,height:a.height})),d=t.ref(null);let l=null;const w=t.useSlots(),z=t.computed(()=>!!w.default),T=t.computed(()=>a.title?typeof a.title=="string"?{text:a.title}:a.title:null),x=t.ref(!1);let b=0;t.watch(()=>a.loading,s=>{if(s)x.value=!0,b=Date.now();else{const r=Date.now()-b,u=(a.loadingMinDuration||0)-r;u<=0?x.value=!1:setTimeout(()=>{x.value=!1},u)}},{immediate:!0});const h=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),c=t.computed(()=>{if(!a.tooltipLoop)return null;if(a.tooltipLoop===!0)return{interval:2e3,seriesIndex:0,loop:!0,pauseOnHover:!0};const s=a.tooltipLoop;return{interval:s.interval??2e3,seriesIndex:s.seriesIndex??0,loop:s.loop??!0,pauseOnHover:s.pauseOnHover??!0}});let y=null,g=0,B=!1,$=!0;const k=()=>{var s,r;try{const u=(s=a.option)==null?void 0:s.series;if(!u||!Array.isArray(u))return 0;const I=u[((r=c.value)==null?void 0:r.seriesIndex)??0];return I!=null&&I.data?I.data.length:0}catch{return 0}},A=()=>{if(!l||!c.value||B||!$)return;const s=k();s!==0&&(l.dispatchAction({type:"showTip",seriesIndex:c.value.seriesIndex,dataIndex:g}),g++,g>=s&&(c.value.loop?g=0:D()))},C=()=>{D(),!(!c.value||k()===0)&&(g=0,y=setInterval(A,c.value.interval))},D=()=>{y&&(clearInterval(y),y=null),l&&l.dispatchAction({type:"hideTip"})},st=()=>{B=!0},G=()=>{B=!1},L=E.useDebounceFn(()=>{l&&(l.resize(),i("chart-resize",{instance:l}))},100),ut=()=>{var r;if(!l)return;["click","dblclick","mouseover","mouseout"].forEach(u=>{l.on(u,I=>{i(`chart-${u}`,I)})}),(r=c.value)!=null&&r.pauseOnHover&&(l.on("mouseover",()=>{st()}),l.on("mouseout",()=>{G()}))},V=()=>{l&&(D(),["click","dblclick","mouseover","mouseout"].forEach(r=>{l.off(r)}),l.dispose(),l=null)},m=()=>{if(V(),!!d.value)try{const s=p(a.option);l=dt.init(d.value),l.setOption(s,{notMerge:!0}),ut(),i("chart-ready",{instance:l,dom:d.value}),C()}catch(s){console.error("ECharts initialization failed:",s)}},p=s=>{if(!s||typeof s!="object")return{series:[]};const r=JSON.parse(JSON.stringify(s));return r.series?Array.isArray(r.series)||(r.series=[r.series]):r.series=[],r.series=r.series.map(u=>{if(!u||typeof u!="object")return{type:"line"};const I={type:"line",...u,type:u.type||"line"};return I.type==="pie"&&I.data&&(I.data=I.data.map(ct=>typeof ct=="object"&&ct!==null?{type:"line",...ct,type:ct.type||"line"}:ct)),I}),r.xAxis?Array.isArray(r.xAxis)?r.xAxis=r.xAxis.map(u=>!u||typeof u!="object"?{type:"category"}:{type:"category",...u,type:u.type||"category"}):typeof r.xAxis=="object"?r.xAxis={type:"category",...r.xAxis,type:r.xAxis.type||"category"}:r.xAxis={type:"category"}:r.xAxis={type:"category"},r.yAxis?Array.isArray(r.yAxis)?r.yAxis=r.yAxis.map(u=>!u||typeof u!="object"?{type:"value"}:{type:"value",...u,type:u.type||"value"}):typeof r.yAxis=="object"?r.yAxis={type:"value",...r.yAxis,type:r.yAxis.type||"value"}:r.yAxis={type:"value"}:r.yAxis={type:"value"},r.legend&&(typeof r.legend=="object"&&!Array.isArray(r.legend)||Array.isArray(r.legend)&&(r.legend={data:r.legend})),r},N=()=>{L()};return t.onMounted(()=>{setTimeout(()=>{m()},0),window.addEventListener("resize",N),E.useResizeObserver(d,s=>{L()}),a.tooltipLoop&&E.useIntersectionObserver(d,([s])=>{$=s.isIntersecting,$?G():st()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",N),D(),V()}),t.watch(()=>a.option,(s,r)=>{if(s)try{const u=p(s);if(!l){m();return}l.clear(),l.setOption(u,{notMerge:!0}),C(),i("chart-update",{instance:l,option:u})}catch(u){console.error("更新图表配置时出错:",u),console.error(" 错误堆栈:",u.stack)}},{deep:!0}),t.watch(()=>a.showChart,s=>{l&&setTimeout(()=>{l.resize()},0)}),e({getInstance:()=>l,resize:()=>L(),dispatchAction:s=>l==null?void 0:l.dispatchAction(s),dispose:V,startLoop:C,stopLoop:D,pauseLoop:st,resumeLoop:G}),(s,r)=>(t.openBlock(),t.createElementBlock("div",{class:"h-chart",style:t.normalizeStyle(S.value)},[z.value?t.renderSlot(s.$slots,"default",{key:0},void 0,!0):T.value&&a.showTitle?(t.openBlock(),t.createBlock(O,t.normalizeProps(t.mergeProps({key:1},T.value)),null,16)):t.createCommentVNode("",!0),t.createElementVNode("div",xt,[t.withDirectives(t.createElementVNode("div",{class:"chart",ref_key:"charts",ref:d},null,512),[[t.vShow,a.showChart]]),x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"chart-loading",style:t.normalizeStyle(h.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"loading-icon",alt:"loading"},null,8,bt),a.loadingText?(t.openBlock(),t.createElementBlock("span",kt,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)])],4))}}),[["__scopeId","data-v-c9b75a2f"]]);W.install=n=>{n.component(W.name,W)};const R=_(Object.assign({name:"hLeft",chineseName:"左侧",description:"页面左侧容器"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-left",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-7d94e3d8"]]);R.install=n=>{n.component(R.name,R)};const P=_(Object.assign({name:"hRight",chineseName:"右侧",description:"页面右侧容器"},{props:{width:{type:String,default:"25%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-right",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-8ef316d0"]]);P.install=n=>{n.component(P.name,P)};const q=_(Object.assign({name:"hCenter",chineseName:"居中布局",description:"水平居中布局容器"},{props:{width:{type:String,default:"50%"},height:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-center",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-69a501ea"]]);q.install=n=>{n.component(q.name,q)};const J=_(Object.assign({name:"hTop",chineseName:"顶部",description:"页面顶部容器"},{props:{height:{type:String,default:"70%"},display:{type:String,default:"block"},position:{type:String,default:"relative"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,display:e.display,position:e.position}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-top",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-ee9ecf79"]]);J.install=n=>{n.component(J.name,J)};const U=_(Object.assign({name:"hBottom",chineseName:"底部",description:"页面底部容器"},{props:{height:{type:String,default:"30%"},display:{type:String,default:"flex"},gap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"},columnGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({height:e.height,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-bottom",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-9fc5eff9"]]);U.install=n=>{n.component(U.name,U)},O.install=n=>{n.component(O.name,O)};const wt=["src"],Bt={key:0,class:"h-item-chart-loading-text"},Y=_(Object.assign({name:"hItemChart",chineseName:"独立图表",description:"独立的 ECharts 图表容器组件,支持 loading、tooltip 轮播,适用于大屏数据可视化展示"},{props:{height:{type:String,default:"200px"},url:{type:String,default:""},option:{type:Object,required:!0},tooltipLoop:{type:[Boolean,Object],default:!1},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-update","chart-resize","chart-click","chart-dblclick","chart-mouseover","chart-mouseout"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.computed(()=>({backgroundImage:a.url?`url(${a.url})`:"none",height:a.height})),d=t.ref(null);let l=null;const w=t.ref(!1);let z=0;t.watch(()=>a.loading,m=>{if(m)w.value=!0,z=Date.now();else{const p=(a.loadingMinDuration||0)-(Date.now()-z);p<=0?w.value=!1:setTimeout(()=>{w.value=!1},p)}},{immediate:!0});const T=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),x=t.computed(()=>{if(!a.tooltipLoop)return null;if(a.tooltipLoop===!0)return{interval:2e3,seriesIndex:0,loop:!0,pauseOnHover:!0};const m=a.tooltipLoop;return{interval:m.interval??2e3,seriesIndex:m.seriesIndex??0,loop:m.loop??!0,pauseOnHover:m.pauseOnHover??!0}});let b=null,h=0,c=!1,y=!0;const g=()=>{var m,p,N;try{const s=(m=a.option)==null?void 0:m.series;if(!s||!Array.isArray(s))return 0;const r=s[((p=x.value)==null?void 0:p.seriesIndex)??0];return((N=r==null?void 0:r.data)==null?void 0:N.length)??0}catch{return 0}},B=()=>{if(!l||!x.value||c||!y)return;const m=g();m!==0&&(l.dispatchAction({type:"showTip",seriesIndex:x.value.seriesIndex,dataIndex:h}),h++,h>=m&&(x.value.loop?h=0:k()))},$=()=>{k(),!(!x.value||g()===0)&&(h=0,b=setInterval(B,x.value.interval))},k=()=>{b&&(clearInterval(b),b=null),l&&l.dispatchAction({type:"hideTip"})},A=()=>{c=!0},C=()=>{c=!1},D=E.useDebounceFn(()=>{l&&(l.resize(),i("chart-resize",{instance:l}))},100),st=()=>{var p;if(!l)return;["click","dblclick","mouseover","mouseout"].forEach(N=>l.on(N,s=>i(`chart-${N}`,s))),(p=x.value)!=null&&p.pauseOnHover&&(l.on("mouseover",()=>A()),l.on("mouseout",()=>C()))},G=()=>{l&&(k(),["click","dblclick","mouseover","mouseout"].forEach(p=>l.off(p)),l.dispose(),l=null)},L=()=>{if(G(),!!d.value)try{l=dt.init(d.value),l.setOption(ut(a.option),{notMerge:!0}),st(),i("chart-ready",{instance:l,dom:d.value}),$()}catch(m){console.error("[hItemChart] init:",m)}},ut=m=>{if(!m||typeof m!="object")return{series:[]};const p=JSON.parse(JSON.stringify(m));p.series?Array.isArray(p.series)||(p.series=[p.series]):p.series=[],p.series=p.series.map(s=>{if(!s||typeof s!="object")return{type:"line"};const r={type:"line",...s,type:s.type||"line"};return r.type==="pie"&&r.data&&(r.data=r.data.map(u=>typeof u=="object"&&u!==null?{value:u.value||0,name:u.name||""}:u)),r});const N=(s,r)=>{p[s]?Array.isArray(p[s])?p[s]=p[s].map(u=>({type:r,...u,type:u.type||r})):typeof p[s]=="object"?p[s]={type:r,...p[s],type:p[s].type||r}:p[s]={type:r}:p[s]={type:r}};return N("xAxis","category"),N("yAxis","value"),p.legend&&Array.isArray(p.legend)&&(p.legend={data:p.legend}),p},V=()=>D();return t.onMounted(()=>{setTimeout(()=>L(),0),window.addEventListener("resize",V),E.useResizeObserver(d,()=>D()),a.tooltipLoop&&E.useIntersectionObserver(d,([m])=>{y=m.isIntersecting,y?C():A()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",V),k(),G()}),t.watch(()=>a.option,m=>{if(m)try{if(!l){L();return}l.clear(),l.setOption(ut(m),{notMerge:!0}),$(),i("chart-update",{instance:l,option:m})}catch(p){console.error("[hItemChart] update:",p)}},{deep:!0}),e({getInstance:()=>l,resize:()=>D(),dispatchAction:m=>l==null?void 0:l.dispatchAction(m),dispose:G,startLoop:$,stopLoop:k,pauseLoop:A,resumeLoop:C}),(m,p)=>(t.openBlock(),t.createElementBlock("div",{class:"h-item-chart",ref_key:"itemCharts",ref:d,style:t.normalizeStyle(S.value)},[w.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-item-chart-loading",style:t.normalizeStyle(T.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"h-item-chart-loading-icon",alt:"loading"},null,8,wt),a.loadingText?(t.openBlock(),t.createElementBlock("span",Bt,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-477585e0"]]);Y.install=n=>{n.component(Y.name,Y)};const K=_(Object.assign({name:"hList",chineseName:"滚动列表",description:"支持自动滚动的数据列表组件,适用于大屏数据展示"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},backgroundColor:{type:String,default:"transparent"},data:{type:Array,default:()=>[]},header:{type:Array,default:()=>[]},showHeader:{type:Boolean,default:!1},enableScroll:{type:Boolean,default:!0},headerHeight:{type:String,default:"40px"},headerBackground:{type:String,default:"rgba(255, 255, 255, 0.1)"},scrollDuration:{type:Number,default:2e3},scrollSpeed:{type:Number,default:500},highlightStyle:{type:Object,default:()=>({background:"rgba(0, 102, 255, 0.3)",color:"#fff",boxShadow:"0 0 10px rgba(0, 102, 255, 0.5)"})}},setup(n,{expose:e}){const o=n,i=t.ref(0),a=t.ref(null),S=t.ref(0),d=t.ref([]),l=t.ref(null),w=t.computed(()=>({width:o.width,height:o.height,backgroundColor:o.backgroundColor,position:"relative",overflow:"hidden"})),z=t.computed(()=>({height:o.headerHeight,display:"flex",alignItems:"center",background:o.headerBackground,position:"absolute",top:0,left:0,zIndex:10,width:"100%"})),T=t.computed(()=>({transform:`translateY(-${i.value*S.value}px)`,transition:`transform ${o.scrollSpeed}ms ease-in-out`,marginTop:o.showHeader?o.headerHeight:"0"})),x=g=>g===a.value?o.highlightStyle:{};t.watch(i,g=>{if(o.data.length>0){const B=g%o.data.length;a.value=B}});let b=null;const h=()=>{!o.enableScroll||o.data.length===0||(clearInterval(b),b=setInterval(()=>{i.value=(i.value+1)%o.data.length},o.scrollDuration))},c=()=>{b&&(clearInterval(b),b=null)},y=()=>{d.value&&d.value[0]&&(S.value=d.value[0].offsetHeight||40)};return t.onMounted(()=>{y(),h(),window.addEventListener("resize",y)}),t.onBeforeUnmount(()=>{c(),window.removeEventListener("resize",y)}),t.watch(()=>o.data,g=>{g.length>0?(i.value=0,a.value=null,setTimeout(()=>{y(),h()},100)):c()},{deep:!0}),t.watch(()=>o.enableScroll,g=>{g?h():(c(),i.value=0)}),e({startScroll:h,stopScroll:c,getCurrentIndex:()=>i.value,scrollTo:g=>{g>=0&&g<o.data.length&&(i.value=g)}}),(g,B)=>(t.openBlock(),t.createElementBlock("div",{class:"h-list",style:t.normalizeStyle(w.value)},[n.showHeader?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-header",style:t.normalizeStyle(z.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.header,($,k)=>(t.openBlock(),t.createElementBlock("p",{key:k,class:"header-item"},t.toDisplayString($),1))),128))],4)):t.createCommentVNode("",!0),n.enableScroll?(t.openBlock(),t.createElementBlock("div",{key:1,class:"scroll-wrapper",style:t.normalizeStyle(T.value)},[t.createElementVNode("div",{class:"data-list",ref_key:"listContainer",ref:l},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.data,($,k)=>(t.openBlock(),t.createElementBlock("div",{key:k,class:"data-list-item",style:t.normalizeStyle(x(k)),ref_for:!0,ref_key:"listItems",ref:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($,(A,C)=>(t.openBlock(),t.createElementBlock("p",{key:C,class:"data-item-cell"},t.toDisplayString(A),1))),128))],4))),128))],512)],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-937cc59c"]]);K.install=n=>{n.component(K.name,K)};const Q=_(Object.assign({name:"hView",chineseName:"视图",description:"通用视图容器组件"},{props:{url:{type:String,default:""},height:{type:String,default:"200px"},width:{type:String,default:"100%"},display:{type:String,default:"block"},flexDirection:{type:String,default:"column"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},flex:{type:String,default:"0.2"},position:{type:String,default:"relative"},top:{type:String,default:"auto"},left:{type:String,default:"auto"},alignItems:{type:String,default:"center"},justifyContent:{type:String,default:"start"},padding:{type:String,default:"0"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,rowGap:e.rowGap,columnGap:e.columnGap,flex:e.flex,position:e.position,top:e.top,left:e.left,alignItems:e.alignItems,justifyContent:e.justifyContent,padding:e.padding,backgroundImage:e.url?`url(${e.url})`:"none"}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-view",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-c79a990c"]]);Q.install=n=>{n.component(Q.name,Q)};const X=_(Object.assign({name:"hDataLabel",chineseName:"数据标签",description:"数值与文本标签展示组件"},{props:{url:{type:String,default:""},num:{type:Number,default:12345},text:{type:String,default:"测试"},someText:{type:String,default:"测试"},show:{type:Boolean,default:!0},width:{type:String,default:"230px"},height:{type:String,default:"54px"},position:{type:String,default:"absolute"},left:{type:String,default:"0"},right:{type:String,default:""},top:{type:String,default:"0"},bottom:{type:String,default:""},zIndex:{type:String,default:"1"},display:{type:String,default:"flex"},border:{type:String,default:"none"},flexDirection:{type:String,default:"column"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},color:{type:String,default:"#fff"},numFontSize:{type:String,default:"20px"},numFontWeight:{type:String,default:"600"},numColor:{type:String,default:"#fff"},textFontSize:{type:String,default:"10px"},textFontWeight:{type:String,default:""},textColor:{type:String,default:"#fff"},titlelineHeight:{type:String,default:""},titletextAlign:{type:String,default:""},titleFontSize:{type:String,default:"10px"},titleFontWeight:{type:String,default:""},titleColor:{type:String,default:"#fff"},titleShow:{type:Boolean,default:!1}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,zIndex:e.zIndex,display:e.display,border:e.border,backgroundImage:e.url?`url(${e.url})`:"none",flexDirection:e.flexDirection,justifyContent:e.justifyContent,alignItems:e.alignItems,color:e.color})),i=t.computed(()=>({fontSize:e.numFontSize,fontWeight:e.numFontWeight,color:e.numColor})),a=t.computed(()=>({fontSize:e.textFontSize,fontWeight:e.textFontWeight,color:e.textColor})),S=t.computed(()=>({fontSize:e.titleFontSize,fontWeight:e.titleFontWeight,color:e.titleColor,lineHeight:e.titlelineHeight,textAlign:e.titletextAlign}));return(d,l)=>(t.openBlock(),t.createElementBlock("div",{class:"h-data-label",style:t.normalizeStyle(t.unref(o))},[n.show?(t.openBlock(),t.createElementBlock("span",{key:0,class:"h-data-label-num",style:t.normalizeStyle(t.unref(i))},t.toDisplayString(n.num),5)):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("span",{key:1,class:"h-data-label-text",style:t.normalizeStyle(t.unref(a))},t.toDisplayString(n.text),5)):t.createCommentVNode("",!0),n.titleShow?(t.openBlock(),t.createElementBlock("span",{key:2,class:"h-data-label-title",style:t.normalizeStyle(t.unref(S))},t.toDisplayString(n.someText),5)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-5b0fbecc"]]);X.install=n=>{n.component(X.name,X)};const Z=_(Object.assign({name:"hButton",chineseName:"按钮",description:"可自定义样式的按钮组件"},{props:{url:{type:String,default:""},padding:{type:String,default:"5px 15px"},margin:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},fontSize:{type:String,default:""},fontWeight:{type:Number,default:400},color:{type:String,default:""},border:{type:String,default:""},text:{type:String,default:"测试按钮"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,padding:e.padding,margin:e.margin,border:e.border,backgroundImage:e.url?`url(${e.url})`:"none",fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.color}));return(i,a)=>(t.openBlock(),t.createElementBlock("button",{class:"h-button",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-533f0ead"]]);Z.install=n=>{n.component(Z.name,Z)};const v=_(Object.assign({name:"hGrid",chineseName:"网格布局",description:"基于 CSS Grid 的网格布局容器"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"200px"},url:{type:String,default:""},display:{type:String,default:"grid"},gridTemplateColumns:{type:String,default:"repeat(3, 1fr)"},gridTemplateRows:{type:String,default:"auto"},gap:{type:String,default:"0"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},padding:{type:String,default:"0"},justifyItems:{type:String,default:""},alignItems:{type:String,default:""},justifyContent:{type:String,default:""},alignContent:{type:String,default:""},gridAutoFlow:{type:String,default:""},gridAutoRows:{type:String,default:""},gridAutoColumns:{type:String,default:""}},setup(n){let e=n,o=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",gridTemplateColumns:e.gridTemplateColumns,gridTemplateRows:e.gridTemplateRows,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,padding:e.padding,justifyItems:e.justifyItems||void 0,alignItems:e.alignItems||void 0,justifyContent:e.justifyContent||void 0,alignContent:e.alignContent||void 0,gridAutoFlow:e.gridAutoFlow||void 0,gridAutoRows:e.gridAutoRows||void 0,gridAutoColumns:e.gridAutoColumns||void 0}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-grid",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-d4038f65"]]);v.install=n=>{n.component(v.name,v)};const tt=_(Object.assign({name:"hCounter",chineseName:"数字计数器",description:"支持老虎机滚动动画的数字计数器组件,每个数字位独立从0滚动到目标值"},{props:{data:{type:[Number,String],default:123456},width:{type:String,default:"auto"},height:{type:String,default:"auto"},backgroundColor:{type:String,default:"transparent"},backgroundImage:{type:String,default:""},display:{type:String,default:"flex"},justifyContent:{type:String,default:"center"},alignItems:{type:String,default:"center"},gap:{type:String,default:"5px"},position:{type:String,default:"relative",validator:n=>["static","relative","absolute","fixed","sticky"].includes(n)},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},zIndex:{type:Number,default:1},digitWidth:{type:String,default:""},digitHeight:{type:String,default:""},digitBackgroundImage:{type:String,default:""},digitColor:{type:String,default:"#fff"},digitFontSize:{type:String,default:"32px"},digitFontWeight:{type:String,default:"bold"},digitBackgroundColor:{type:String,default:"transparent"},digitBorderRadius:{type:String,default:"4px"},showSeparator:{type:Boolean,default:!1},separator:{type:String,default:","},decimalPlaces:{type:Number,default:-1},prefix:{type:String,default:""},suffix:{type:String,default:""},enableAnimation:{type:Boolean,default:!0},animationDuration:{type:Number,default:2e3},digitDelay:{type:Number,default:100},transform:{type:String,default:"none"}},setup(n,{expose:e}){const o=n,i=t.ref([]),a=t.ref(!1),S=t.computed(()=>{let h=o.data;o.decimalPlaces>=0&&typeof h=="number"&&(h=h.toFixed(o.decimalPlaces));let c=String(h);if(o.showSeparator&&typeof o.data=="number"){const y=c.split(".");y[0]=y[0].replace(/\B(?=(\d{3})+(?!\d))/g,o.separator),c=y.join(".")}return o.prefix&&(c=o.prefix+c),o.suffix&&(c=c+o.suffix),c.split("")}),d=t.computed(()=>o.digitWidth?o.digitWidth:`${(parseInt(o.digitFontSize)||32)*1.2}px`),l=t.computed(()=>o.digitHeight?o.digitHeight:`${(parseInt(o.digitFontSize)||32)*1.5}px`),w=()=>{if(!o.enableAnimation){i.value=S.value.map(()=>0);return}a.value=!0,i.value=S.value.map(()=>0);const h=S.value;h.forEach((c,y)=>{if(isNaN(parseInt(c))){i.value[y]=c;return}const g=parseInt(c),B=y*o.digitDelay,$=o.animationDuration;setTimeout(()=>{let k=0;const A=$/(g+1),C=()=>{k<=g&&(i.value[y]=k,k++,k<=g?setTimeout(C,A):(y===h.length-1||h.slice(y+1).every(D=>isNaN(parseInt(D))))&&(a.value=!1))};C()},B)})},z=h=>{const c=i.value[h];if(isNaN(parseInt(c)))return{transform:"translateY(0)",transition:"none"};const y=parseInt(l.value)||60;return{transform:`translateY(${-parseInt(c)*y}px)`,transition:`transform ${o.animationDuration}ms cubic-bezier(0.25, 0.46, 0.45, 0.94)`}},T=t.computed(()=>({width:o.width,height:o.height,backgroundColor:o.backgroundColor,backgroundImage:o.backgroundImage?`url(${o.backgroundImage})`:"none",display:o.display,justifyContent:o.justifyContent,alignItems:o.alignItems,gap:o.gap,position:o.position,left:o.left||void 0,right:o.right||void 0,top:o.top||void 0,bottom:o.bottom||void 0,zIndex:o.zIndex,transform:o.transform||void 0})),x=t.computed(()=>({width:d.value,height:l.value,overflow:"hidden",position:"relative",borderRadius:o.digitBorderRadius,backgroundColor:o.digitBackgroundColor})),b=t.computed(()=>({width:"100%",height:l.value,color:o.digitColor,fontSize:o.digitFontSize,fontWeight:o.digitFontWeight,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",flexShrink:0,lineHeight:"1"}));return t.watch(()=>o.data,()=>{w()}),t.onMounted(()=>{w()}),e({restart:w,getCurrentValue:()=>i.value.join("")}),(h,c)=>(t.openBlock(),t.createElementBlock("div",{class:"h-counter",style:t.normalizeStyle(T.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value,(y,g)=>(t.openBlock(),t.createElementBlock("div",{key:g,class:"counter-digit",style:t.normalizeStyle(x.value)},[t.createElementVNode("div",{class:"digit-scroll",style:t.normalizeStyle(z(g))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(10,B=>t.createElementVNode("div",{key:B-1,class:"digit-item",style:t.normalizeStyle(b.value)},t.toDisplayString(B-1),5)),64))],4)],4))),128)),t.renderSlot(h.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-fba32a26"]]);tt.install=n=>{n.component(tt.name,tt)};const et=_(Object.assign({name:"hButtonGroup",chineseName:"按钮组",description:"按钮组容器,支持 flex 布局排列"},{props:{width:{type:String,default:""},height:{type:String,default:""},gap:{type:String,default:"5px"},rowGap:{type:String,default:"5px"},columnGap:{type:String,default:"5px"},position:{type:String,default:"relative"},left:{type:String,default:""},right:{type:String,default:""},top:{type:String,default:""},bottom:{type:String,default:""},display:{type:String,default:"flex"},flexWrap:{type:String,default:"nowrap"}},setup(n){let e=n,o=t.computed(()=>({position:e.position,left:e.left,right:e.right,top:e.top,bottom:e.bottom,display:e.display,gap:e.gap,rowGap:e.rowGap,columnGap:e.columnGap,flexWrap:e.flexWrap,width:e.width,height:e.height}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-button-group",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-f90f2b62"]]);et.install=n=>{n.component(et.name,et)};const nt=_(Object.assign({name:"hText",chineseName:"文本",description:"用于显示文本内容"},{props:{text:{type:String,default:"测试文字"},fontSize:{type:String,default:"16px"},color:{type:String,default:"#fff"}},setup(n){let e=n,o=t.computed(()=>({fontSize:e.fontSize,color:e.color}));return(i,a)=>(t.openBlock(),t.createElementBlock("span",{class:"h-text",style:t.normalizeStyle(t.unref(o))},t.toDisplayString(t.unref(e).text),5))}}),[["__scopeId","data-v-7fb2fc92"]]);nt.install=n=>{n.component(nt.name,nt)};const ot=_(Object.assign({name:"hLayout",chineseName:"布局",description:"页面布局容器"},{props:{width:{type:String,default:"25%"},height:{type:String,default:"100%"},display:{type:String,default:"flex"},flexDirection:{type:String,default:"column"},columnGap:{type:String,default:"auto"},rowGap:{type:String,default:"auto"}},setup(n){let e=n,o=t.computed(()=>({width:e.width,height:e.height,display:e.display,flexDirection:e.flexDirection,columnGap:e.columnGap,rowGap:e.rowGap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-layout",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-957ea318"]]);ot.install=n=>{n.component(ot.name,ot)};const at=_(Object.assign({name:"hFlex",chineseName:"弹性布局",description:"基于 CSS Flexbox 的弹性布局容器"},{props:{width:{type:String,default:"100%"},height:{type:String,default:"100px"},url:{type:String,default:""},display:{type:String,default:"flex"},flexDirection:{type:String,default:""},flexWrap:{type:String,default:"wrap"},rowGap:{type:String,default:"0"},columnGap:{type:String,default:"0"},padding:{type:String,default:"0"}},setup(n){let e=n,o=t.computed(()=>({display:e.display,width:e.width,height:e.height,backgroundImage:e.url?`url(${e.url})`:"none",rowGap:e.rowGap,columnGap:e.columnGap,padding:e.padding,flexDirection:e.flexDirection,flexWrap:e.flexWrap}));return(i,a)=>(t.openBlock(),t.createElementBlock("div",{class:"h-flex",style:t.normalizeStyle(t.unref(o))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6ecd9f03"]]);at.install=n=>{n.component(at.name,at)};const $t={class:"h-map-wrapper"},Ct=["src"],It={key:0,class:"h-map-loading-text"},it=_(Object.assign({name:"hMap",chineseName:"地图",description:"基于 ECharts 的高自定义地图组件,支持 GeoJSON 注册、多层 geo 叠加、散点标记等"},{props:{mapName:{type:String,required:!0},mapJson:{type:Object,required:!0},option:{type:Object,required:!0},roam:{type:[Boolean,String],default:!1},height:{type:String,default:"100%"},width:{type:String,default:"100%"},url:{type:String,default:""},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},loadingMinDuration:{type:Number,default:600},loadingIcon:{type:String,default:""},loadingBgColor:{type:String,default:""}},emits:["chart-ready","chart-click","chart-dblclick"],setup(n,{expose:e,emit:o}){const i=o,a=n,S=t.ref(null);let d=null;const l=t.computed(()=>({width:a.width,height:a.height,backgroundImage:a.url?`url(${a.url})`:"none",backgroundSize:"100% 100%",backgroundRepeat:"no-repeat"})),w=t.ref(!1);let z=0;t.watch(()=>a.loading,c=>{if(c)w.value=!0,z=Date.now();else{const y=Date.now()-z,g=(a.loadingMinDuration||0)-y;g<=0?w.value=!1:setTimeout(()=>{w.value=!1},g)}},{immediate:!0});const T=t.computed(()=>a.loadingBgColor?{background:a.loadingBgColor}:{}),x=E.useDebounceFn(()=>{d&&!d.isDisposed()&&d.resize()},100),b=()=>{d&&(d.isDisposed()||(d.off("click"),d.off("dblclick"),d.dispose()),d=null)},h=()=>{if(b(),!!S.value)try{dt.registerMap(a.mapName,a.mapJson),d=dt.init(S.value),d.on("click",c=>{i("chart-click",c)}),d.on("dblclick",c=>{i("chart-dblclick",c)}),d.setOption(a.option,{notMerge:!0}),i("chart-ready",{instance:d,dom:S.value})}catch(c){console.error("[h-map] 初始化失败:",c)}};return t.watch(()=>a.mapJson,()=>{t.nextTick(()=>{h()})}),t.watch(()=>a.option,c=>{if(!(!c||!d||d.isDisposed()))try{d.setOption(c,{notMerge:!0})}catch(y){console.error("[h-map] 更新配置失败:",y)}},{deep:!0}),t.onMounted(()=>{t.nextTick(()=>{h()}),E.useResizeObserver(S,()=>{x()})}),t.onBeforeUnmount(()=>{b()}),e({getInstance:()=>d,resize:()=>x(),dispatchAction:c=>d==null?void 0:d.dispatchAction(c),dispose:b}),(c,y)=>(t.openBlock(),t.createElementBlock("div",$t,[t.createElementVNode("div",{class:"h-map",ref_key:"mapContainer",ref:S,style:t.normalizeStyle(l.value)},null,4),w.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-map-loading",style:t.normalizeStyle(T.value)},[t.createElementVNode("img",{src:a.loadingIcon||t.unref(pt),class:"h-map-loading-icon",alt:"loading"},null,8,Ct),a.loadingText?(t.openBlock(),t.createElementBlock("span",It,t.toDisplayString(a.loadingText),1)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-7350dc12"]]);it.install=n=>{n.component(it.name,it)};const lt=t.ref(!1),ft=t.ref(""),mt=t.ref(""),gt=t.ref("");let j=null,yt=0;function zt(n){yt=n}function Dt(){function n(o={}){ft.value=o.text??"加载中...",mt.value=o.icon??"",gt.value=o.bgColor??"",lt.value=!0,j&&clearTimeout(j);const i=o.duration!==void 0?o.duration:yt;i>0&&(j=setTimeout(()=>{lt.value=!1,j=null},i))}function e(){j&&(clearTimeout(j),j=null),lt.value=!1}return{show:n,hide:e,visible:lt}}const Nt={class:"h-loading-box"},Tt=["src"],At={key:0,class:"h-loading-text"},rt=_(Object.assign({name:"hLoading",chineseName:"全局加载",description:"页面级全屏 loading 遮罩,支持 router 跳转、页面刷新等场景,通过 useLoading() 全局控制"},{setup(n){const e=t.computed(()=>mt.value||pt),o=t.computed(()=>gt.value?{background:gt.value}:{});return(i,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"h-loading-fade"},{default:t.withCtx(()=>[t.unref(lt)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"h-loading",style:t.normalizeStyle(o.value)},[t.createElementVNode("div",Nt,[t.createElementVNode("img",{src:e.value,class:"h-loading-icon",alt:"loading"},null,8,Tt),t.unref(ft)?(t.openBlock(),t.createElementBlock("span",At,t.toDisplayString(t.unref(ft)),1)):t.createCommentVNode("",!0)])],4)):t.createCommentVNode("",!0)]),_:1})]))}}),[["__scopeId","data-v-ae6739ea"]]);rt.install=n=>{n.component(rt.name,rt)};const Et={install:n=>{n.use(F),n.use(H),n.use(ot),n.use(M),n.use(W),n.use(R),n.use(P),n.use(q),n.use(J),n.use(U),n.use(O),n.use(Y),n.use(K),n.use(Q),n.use(X),n.use(Z),n.use(v),n.use(tt),n.use(et),n.use(nt),n.use(at),n.use(it),n.use(rt)}};f.default=Et,f.hBottom=U,f.hButton=Z,f.hButtonGroup=et,f.hCenter=q,f.hChart=W,f.hChartTitle=O,f.hCounter=tt,f.hDataLabel=X,f.hFlex=at,f.hGrid=v,f.hHeader=H,f.hItemChart=Y,f.hLayout=ot,f.hLeft=R,f.hList=K,f.hLoading=rt,f.hMain=M,f.hMap=it,f.hPanel=F,f.hRight=P,f.hText=nt,f.hTop=J,f.hView=Q,f.setDefaultDuration=zt,f.useLoading=Dt,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hamster-charts",
3
3
  "private": false,
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "description": "基于 Vue3 + ECharts 的大屏数据可视化组件库,支持地图、图表、布局等开箱即用组件",
6
6
  "type": "module",
7
7
  "main": "./dist/hamster-charts.umd.cjs",