@xiaou66/u-web-ui 0.0.56 → 0.0.57

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.
@@ -15,11 +15,7 @@ declare function __VLS_template(): {
15
15
  rootEl: any;
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
- load: () => any;
20
- }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
21
- onLoad?: (() => any) | undefined;
22
- }>, {
18
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
19
  w: string;
24
20
  h: string;
25
21
  distance: number;
@@ -1 +1 @@
1
- {"version":3,"file":"LazyLoader.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/container/LazyLoader/LazyLoader.vue"],"names":[],"mappings":";AAsDA,KAAK,WAAW,GAAG;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,iBAAS,cAAc;WA+BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;OA9Ff,MAAM;OACN,MAAM;cACC,MAAM;;;OAqGjB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"LazyLoader.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/container/LazyLoader/LazyLoader.vue"],"names":[],"mappings":";AAuCA,KAAK,WAAW,GAAG;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA0BF,iBAAS,cAAc;WA+BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;OA7Ef,MAAM;OACN,MAAM;cACC,MAAM;;;OAmFjB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './useLoading';
2
+ export * from './useTheme';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ type ProxyFunction = (...any: any[]) => Promise<any | void>;
3
+ /**
4
+ * 单步加载,适合在单个加载按钮使用
5
+ * @param func 加载函数
6
+ * @return [被代理后的函数, 加载状态]
7
+ */
8
+ export declare const useSingleLoading: (func: Function) => [ProxyFunction, Ref<boolean>];
9
+ type getLoadUniqueKey<T> = (...args: any[]) => T;
10
+ type loadStatusCompute<T> = ComputedRef<(uniqueKey: T) => boolean>;
11
+ /**
12
+ * 适用列表或多个需要加载的状态的函数
13
+ * @param func 加载函数
14
+ * @param getLoadUniqueKey 获取判断加载的唯一标识
15
+ * @return [被代理后的函数, 加载状态(唯一键), 所有加载中的唯一标识集合]
16
+ */
17
+ export declare const useMultiLoading: <T = any>(func: Function, getLoadUniqueKey: getLoadUniqueKey<T>) => [ProxyFunction, loadStatusCompute<T>, Ref<T[]>];
18
+ export {};
19
+ //# sourceMappingURL=useLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../src/hooks/useLoading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,KAAK,GAAG,EAAO,MAAM,KAAK,CAAA;AAW/D,KAAK,aAAa,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,QAAQ,KAAI,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAsB9E,CAAA;AAGD,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AACjD,KAAK,iBAAiB,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,GAAC,GAAG,EAAG,MAAM,QAAQ,EAAE,kBAAkB,gBAAgB,CAAC,CAAC,CAAC,KAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAyB7I,CAAA"}
@@ -0,0 +1,13 @@
1
+ type themeType = 'default' | 'dark' | 'auto';
2
+ export interface UseThemeOptions {
3
+ setDefaultTheme: () => void;
4
+ setDarkTheme: () => void;
5
+ getUserThemeConfig?: () => themeType;
6
+ }
7
+ export declare function useTheme(options: UseThemeOptions): {
8
+ themeRefresh: () => void;
9
+ };
10
+ export declare function setCurrentTheme(theme: 'default' | 'dark'): void;
11
+ export declare function getCurrentTheme(): themeType;
12
+ export {};
13
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAE,SAAS,GAAG,MAAM,GAAE,MAAM,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,SAAS,CAAC;CACtC;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe;;EAuChD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,QAKxD;AAED,wBAAgB,eAAe,cAE9B"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './utils';
3
+ export * from './hooks';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,iBAAiB,CAAA;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,iBAAiB,CAAA;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, getCurrentInstance as p, inject as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, reactive as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDynamicComponent as k, toDisplayString as A, toHandlers as j, toRefs as M, unref as N, useAttrs as P, useModel as F, useSlots as I, watch as L, withCtx as R, withModifiers as z } from "vue";
2
2
  import { Aside as B, Button as V, Content as H, Divider as U, HeadMenu as W, Header as G, Icon as K, Layout as q, Menu as J, MenuItem as ee, Submenu as te, Switch as ne } from "tdesign-vue-next";
3
3
  import { useRoute as re, useRouter as ie } from "vue-router";
4
- import { useEventListener as ae } from "@vueuse/core";
4
+ import { useEventListener as ae, useIntersectionObserver as oe } from "@vueuse/core";
5
5
  function Y(...e) {
6
6
  return "u-web-" + e.join("-");
7
7
  }
@@ -9,15 +9,15 @@ function X(...e) {
9
9
  let t = e.join("-");
10
10
  return (...e) => Y(t, ...e);
11
11
  }
12
- function oe(e) {
12
+ function se(e) {
13
13
  return e.substring(0, 1).toUpperCase() + e.substring(1);
14
14
  }
15
- const se = [
15
+ const ce = [
16
16
  "Capture",
17
17
  "Passive",
18
18
  "Once"
19
- ], ce = /* @__PURE__ */ RegExp(`^(${se.join("|")})*$`);
20
- function le(...e) {
19
+ ], le = /* @__PURE__ */ RegExp(`^(${ce.join("|")})*$`);
20
+ function ue(...e) {
21
21
  if (!e.length) return !1;
22
22
  let t = p();
23
23
  if (!t) return !1;
@@ -25,37 +25,37 @@ function le(...e) {
25
25
  if (!r) return !1;
26
26
  let i = r.props || {}, a = [...Object.keys(n).filter((e) => e.startsWith("on")), ...Object.keys(i).filter((e) => e.startsWith("on"))];
27
27
  for (let t of e) {
28
- let e = t.startsWith("on") ? t : `on${oe(t)}`;
28
+ let e = t.startsWith("on") ? t : `on${se(t)}`;
29
29
  if (a.includes(e)) return !0;
30
30
  for (let t of a) if (t.startsWith(e)) {
31
31
  let n = t.slice(e.length);
32
- if (n && ce.test(n)) return !0;
32
+ if (n && le.test(n)) return !0;
33
33
  }
34
34
  }
35
35
  return !1;
36
36
  }
37
- function ue(e) {
37
+ function de(e) {
38
38
  return typeof e == "function";
39
39
  }
40
- function de(e) {
40
+ function fe(e) {
41
41
  return e === null;
42
42
  }
43
- function fe(e) {
43
+ function pe(e) {
44
44
  return e === void 0;
45
45
  }
46
- function pe(e) {
46
+ function me(e) {
47
47
  return typeof e == "number" && !isNaN(e);
48
48
  }
49
- function me(e) {
49
+ function he(e) {
50
50
  return typeof e == "object" && !!e && !Array.isArray(e);
51
51
  }
52
52
  function Z(e, t, n) {
53
53
  e.addEventListener(t, n);
54
54
  }
55
- function Q(e, t, n) {
55
+ function ge(e, t, n) {
56
56
  e.removeEventListener(t, n);
57
57
  }
58
- var he = /* @__PURE__ */ f({
58
+ var _e = /* @__PURE__ */ f({
59
59
  __name: "BackTop",
60
60
  props: {
61
61
  visibleHeight: { default: 200 },
@@ -120,7 +120,7 @@ var he = /* @__PURE__ */ f({
120
120
  _: 3
121
121
  }));
122
122
  }
123
- }), ge = he, _e = /* @__PURE__ */ f({
123
+ }), ve = _e, ye = /* @__PURE__ */ f({
124
124
  __name: "WebBaseLayout",
125
125
  setup(e) {
126
126
  return (e, t) => {
@@ -146,14 +146,14 @@ var he = /* @__PURE__ */ f({
146
146
  });
147
147
  };
148
148
  }
149
- }), ve = _e;
150
- let $ = /* @__PURE__ */ function(e) {
149
+ }), be = ye;
150
+ let xe = /* @__PURE__ */ function(e) {
151
151
  return e.Refresh = "u:leftMenu:refresh", e;
152
152
  }({});
153
- const ye = { refresh: () => {
154
- window.dispatchEvent(new CustomEvent($.Refresh));
153
+ const Se = { refresh: () => {
154
+ window.dispatchEvent(new CustomEvent(xe.Refresh));
155
155
  } };
156
- var be = /* @__PURE__ */ f({
156
+ var Ce = /* @__PURE__ */ f({
157
157
  __name: "LeftMenu",
158
158
  props: /* @__PURE__ */ h({
159
159
  hideOperations: {
@@ -195,7 +195,7 @@ var be = /* @__PURE__ */ f({
195
195
  function _(e) {
196
196
  return e.children ? e.children.filter((e) => e.meta?.menu) : [];
197
197
  }
198
- return r.refreshEventListener && ae(document, $.Refresh, h), n({
198
+ return r.refreshEventListener && ae(document, xe.Refresh, h), n({
199
199
  changeCollapsed: s,
200
200
  refreshRouter: h
201
201
  }), (t, n) => {
@@ -259,7 +259,7 @@ var be = /* @__PURE__ */ f({
259
259
  ]);
260
260
  };
261
261
  }
262
- }), xe = be, Se = /* @__PURE__ */ f({
262
+ }), we = Ce, Te = /* @__PURE__ */ f({
263
263
  __name: "ContextMenuItem",
264
264
  props: {
265
265
  label: {},
@@ -303,7 +303,7 @@ var be = /* @__PURE__ */ f({
303
303
  class: v([N(i)("icon"), e.icon])
304
304
  }, A(e.icon), 3)) : a("", !0), s("span", { class: v(N(i)("label")) }, A(e.label), 3)], 34));
305
305
  }
306
- }), Ce = Se, we = /* @__PURE__ */ f({
306
+ }), Ee = Te, De = /* @__PURE__ */ f({
307
307
  __name: "ContextMenuGroup",
308
308
  props: { title: {} },
309
309
  setup(e) {
@@ -313,12 +313,12 @@ var be = /* @__PURE__ */ f({
313
313
  class: v(N(t)("title"))
314
314
  }, A(e.title), 3)) : a("", !0), D(e.$slots, "default")], 2));
315
315
  }
316
- }), Te = we, Ee = /* @__PURE__ */ f({
316
+ }), Oe = De, ke = /* @__PURE__ */ f({
317
317
  __name: "ContextMenuDivider",
318
318
  setup(e) {
319
319
  return (e, t) => (S(), o("div", { class: v(N(Y)("context-menu-divider")) }, null, 2));
320
320
  }
321
- }), De = Ee, Oe = /* @__PURE__ */ f({
321
+ }), Ae = ke, je = /* @__PURE__ */ f({
322
322
  __name: "ContextMenuSubmenu",
323
323
  props: {
324
324
  label: {},
@@ -431,7 +431,7 @@ var be = /* @__PURE__ */ f({
431
431
  }, [D(e.$slots, "default")], 38)) : a("", !0)
432
432
  ], 34));
433
433
  }
434
- }), ke = Oe, Ae = /* @__PURE__ */ f({
434
+ }), Me = je, Ne = /* @__PURE__ */ f({
435
435
  __name: "ContextMenu",
436
436
  props: {
437
437
  hideOnSelect: {
@@ -504,12 +504,12 @@ var be = /* @__PURE__ */ f({
504
504
  }, null, 34)) : a("", !0)]))
505
505
  ], 64));
506
506
  }
507
- }), je = Ae, Me = /* @__PURE__ */ f({
507
+ }), Pe = Ne, Fe = /* @__PURE__ */ f({
508
508
  __name: "WebLayout",
509
509
  setup(e) {
510
510
  return (e, t) => {
511
511
  let n = W, r = O("router-view");
512
- return S(), i(ve, null, {
512
+ return S(), i(be, null, {
513
513
  header: R(() => [d(n, {
514
514
  value: "item1",
515
515
  height: "60px"
@@ -522,13 +522,13 @@ var be = /* @__PURE__ */ f({
522
522
  fn: R(() => [D(e.$slots, "operations")]),
523
523
  key: "1"
524
524
  } : void 0]), 1024)]),
525
- left: R(() => [D(e.$slots, "left", {}, () => [d(N(xe))])]),
525
+ left: R(() => [D(e.$slots, "left", {}, () => [d(N(we))])]),
526
526
  default: R(() => [D(e.$slots, "default", {}, () => [s("div", { class: v([N(Y)("main-content-inner")]) }, [d(r)], 2)])]),
527
527
  _: 3
528
528
  });
529
529
  };
530
530
  }
531
- }), Ne = Me, Pe = /* @__PURE__ */ f({
531
+ }), Ie = Fe, Le = /* @__PURE__ */ f({
532
532
  __name: "SplitPanel",
533
533
  props: {
534
534
  component: { default: "div" },
@@ -680,7 +680,7 @@ var be = /* @__PURE__ */ f({
680
680
  _: 3
681
681
  }, 8, ["class"]));
682
682
  }
683
- }), Fe = Pe, Ie = /* @__PURE__ */ f({
683
+ }), Re = Le, ze = /* @__PURE__ */ f({
684
684
  __name: "UtoolsBaseLayout",
685
685
  setup(e) {
686
686
  return (e, t) => {
@@ -700,12 +700,12 @@ var be = /* @__PURE__ */ f({
700
700
  });
701
701
  };
702
702
  }
703
- }), Le = Ie;
704
- const Re = { class: "utools" }, ze = { class: "w-8 h-auto overflow-hidden" }, Be = ["src"], Ve = { class: "title pl-5" }, He = { class: "flex justify-end h-full pr-3 w-full" }, Ue = { class: "content" }, We = { class: "content-inner" }, Ge = {
703
+ }), Be = ze;
704
+ const Ve = { class: "utools" }, He = { class: "w-8 h-auto overflow-hidden" }, Ue = ["src"], We = { class: "title pl-5" }, Ge = { class: "flex justify-end h-full pr-3 w-full" }, Ke = { class: "content" }, qe = { class: "content-inner" }, Je = {
705
705
  class: "flex items-center justify-center",
706
706
  style: { "font-size": "10px" }
707
707
  };
708
- var Ke = /* @__PURE__ */ f({
708
+ var Ye = /* @__PURE__ */ f({
709
709
  __name: "UtoolsLayout",
710
710
  props: {
711
711
  avatar: { default: "https://www.u-tools.cn/assets/favicon.png" },
@@ -718,11 +718,11 @@ var Ke = /* @__PURE__ */ f({
718
718
  let t = T(), n = T(!0);
719
719
  return (e, r) => {
720
720
  let i = O("router-view");
721
- return S(), o("div", Re, [d(Le, null, {
721
+ return S(), o("div", Ve, [d(Be, null, {
722
722
  left: R(() => [s("div", { class: v(N(Y)("utools", "left-menu")) }, [s("div", {
723
723
  class: v(["flex items-center justify-center", N(Y)("utools", "left-menu", "collapse")]),
724
724
  onClick: r[0] ||= (e) => t.value?.changeCollapsed()
725
- }, [s("div", { class: v(["w-5 h-5 font-bold", n.value ? "i-p-expandLeft" : "i-p-expandRight"]) }, null, 2)], 2), d(N(xe), g({
725
+ }, [s("div", { class: v(["w-5 h-5 font-bold", n.value ? "i-p-expandLeft" : "i-p-expandRight"]) }, null, 2)], 2), d(N(we), g({
726
726
  ref_key: "leftMenuRef",
727
727
  ref: t
728
728
  }, {
@@ -734,23 +734,23 @@ var Ke = /* @__PURE__ */ f({
734
734
  "onUpdate:collapsed": r[1] ||= (e) => n.value = e,
735
735
  hideOperations: ""
736
736
  }), {
737
- logo: R(() => [s("div", ze, [s("img", {
737
+ logo: R(() => [s("div", He, [s("img", {
738
738
  class: "logo w-full h-full rounded-full",
739
739
  src: e.avatar,
740
740
  alt: "logo"
741
- }, null, 8, Be)]), s("div", Ve, A(e.title), 1)]),
741
+ }, null, 8, Ue)]), s("div", We, A(e.title), 1)]),
742
742
  _: 1
743
743
  }, 16, ["collapsed"])], 2)]),
744
744
  default: R(() => [s("div", { class: v(N(Y)("utools", "content-wrapper")) }, [
745
- s("div", He, [D(e.$slots, "header-tips")]),
746
- s("div", Ue, [s("div", We, [d(i)])]),
747
- D(e.$slots, "footer", {}, () => [s("div", Ge, " © " + A((/* @__PURE__ */ new Date()).getFullYear()) + " [xiaou]。保留所有权利 ", 1)])
745
+ s("div", Ge, [D(e.$slots, "header-tips")]),
746
+ s("div", Ke, [s("div", qe, [d(i)])]),
747
+ D(e.$slots, "footer", {}, () => [s("div", Je, " © " + A((/* @__PURE__ */ new Date()).getFullYear()) + " [xiaou]。保留所有权利 ", 1)])
748
748
  ], 2)]),
749
749
  _: 3
750
750
  })]);
751
751
  };
752
752
  }
753
- }), qe = Ke, Je = /* @__PURE__ */ f({
753
+ }), Xe = Ye, Ze = /* @__PURE__ */ f({
754
754
  __name: "PageHeader",
755
755
  props: {
756
756
  title: { default: "" },
@@ -762,7 +762,7 @@ var Ke = /* @__PURE__ */ f({
762
762
  let t = e, n = X("page-header"), i = r(() => {
763
763
  let e = [n()];
764
764
  return t.size !== "default" && e.push(n(t.size)), e;
765
- }), c = r(() => le("onBack"));
765
+ }), c = r(() => ue("onBack"));
766
766
  return (e, t) => {
767
767
  let r = K, l = V, f = U;
768
768
  return S(), o("div", { class: v(i.value) }, [s("div", { class: v(["flex items-center", N(n)("header")]) }, [
@@ -787,40 +787,40 @@ var Ke = /* @__PURE__ */ f({
787
787
  }, [D(e.$slots, "extra")], 2)) : a("", !0)], 2);
788
788
  };
789
789
  }
790
- }), Ye = Je, Xe = (e, t) => {
790
+ }), Qe = Ze, $e = (e, t) => {
791
791
  let n = e.__vccOpts || e;
792
792
  for (let [e, r] of t) n[e] = r;
793
793
  return n;
794
794
  };
795
- const Ze = {}, Qe = { class: "result-error-icon" };
796
- function $e(e, t) {
797
- return S(), o("div", Qe, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-fc6ebdc7><g opacity=\"0.8\" data-v-fc6ebdc7><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-fc6ebdc7></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-fc6ebdc7></path><circle cx=\"120\" cy=\"80\" r=\"20\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" data-v-fc6ebdc7></circle><path d=\"M110 70L130 90M130 70L110 90\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-fc6ebdc7></path></svg><div class=\"result-error-text\" data-v-fc6ebdc7>403</div>", 2)]);
795
+ const et = {}, tt = { class: "result-error-icon" };
796
+ function nt(e, t) {
797
+ return S(), o("div", tt, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-fc6ebdc7><g opacity=\"0.8\" data-v-fc6ebdc7><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-fc6ebdc7></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-fc6ebdc7></path><circle cx=\"120\" cy=\"80\" r=\"20\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" data-v-fc6ebdc7></circle><path d=\"M110 70L130 90M130 70L110 90\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-fc6ebdc7></path></svg><div class=\"result-error-text\" data-v-fc6ebdc7>403</div>", 2)]);
798
798
  }
799
- var et = /* @__PURE__ */ Xe(Ze, [["render", $e], ["__scopeId", "data-v-fc6ebdc7"]]);
800
- const tt = {}, nt = { class: "result-error-icon" };
801
- function rt(e, t) {
802
- return S(), o("div", nt, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cdc3b8a1><g opacity=\"0.8\" data-v-cdc3b8a1><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cdc3b8a1></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"120\" cy=\"80\" r=\"25\" fill=\"none\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" data-v-cdc3b8a1></circle><path d=\"M105 65L135 95\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"110\" cy=\"75\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle><circle cx=\"130\" cy=\"85\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle></svg><div class=\"result-error-text\" data-v-cdc3b8a1>404</div>", 2)]);
799
+ var rt = /* @__PURE__ */ $e(et, [["render", nt], ["__scopeId", "data-v-fc6ebdc7"]]);
800
+ const it = {}, at = { class: "result-error-icon" };
801
+ function ot(e, t) {
802
+ return S(), o("div", at, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cdc3b8a1><g opacity=\"0.8\" data-v-cdc3b8a1><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cdc3b8a1></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"120\" cy=\"80\" r=\"25\" fill=\"none\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" data-v-cdc3b8a1></circle><path d=\"M105 65L135 95\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"110\" cy=\"75\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle><circle cx=\"130\" cy=\"85\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle></svg><div class=\"result-error-text\" data-v-cdc3b8a1>404</div>", 2)]);
803
803
  }
804
- var it = /* @__PURE__ */ Xe(tt, [["render", rt], ["__scopeId", "data-v-cdc3b8a1"]]);
805
- const at = {}, ot = { class: "result-error-icon" };
806
- function st(e, t) {
807
- return S(), o("div", ot, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cb66ef61><g opacity=\"0.8\" data-v-cb66ef61><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><rect x=\"100\" y=\"65\" width=\"40\" height=\"30\" rx=\"4\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M110 75L130 85M130 75L110 85\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><path d=\"M115 55L125 65\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><circle cx=\"118\" cy=\"52\" r=\"2\" fill=\"rgb(var(--red-6))\" data-v-cb66ef61></circle></svg><div class=\"result-error-text\" data-v-cb66ef61>500</div>", 2)]);
804
+ var st = /* @__PURE__ */ $e(it, [["render", ot], ["__scopeId", "data-v-cdc3b8a1"]]);
805
+ const ct = {}, lt = { class: "result-error-icon" };
806
+ function ut(e, t) {
807
+ return S(), o("div", lt, t[0] ||= [l("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cb66ef61><g opacity=\"0.8\" data-v-cb66ef61><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><rect x=\"100\" y=\"65\" width=\"40\" height=\"30\" rx=\"4\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M110 75L130 85M130 75L110 85\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><path d=\"M115 55L125 65\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><circle cx=\"118\" cy=\"52\" r=\"2\" fill=\"rgb(var(--red-6))\" data-v-cb66ef61></circle></svg><div class=\"result-error-text\" data-v-cb66ef61>500</div>", 2)]);
808
808
  }
809
- var ct = /* @__PURE__ */ Xe(at, [["render", st], ["__scopeId", "data-v-cb66ef61"]]);
810
- const lt = {
809
+ var dt = /* @__PURE__ */ $e(ct, [["render", ut], ["__scopeId", "data-v-cb66ef61"]]);
810
+ const ft = {
811
811
  key: 0,
812
812
  class: "i-p-info w-12 h-12"
813
- }, ut = {
813
+ }, pt = {
814
814
  key: 1,
815
815
  class: "i-p-check"
816
- }, dt = {
816
+ }, mt = {
817
817
  key: 2,
818
818
  class: "i-p-info w-12 h-12"
819
- }, ft = {
819
+ }, ht = {
820
820
  key: 3,
821
821
  class: "i-p-close"
822
822
  };
823
- var pt = /* @__PURE__ */ f({
823
+ var gt = /* @__PURE__ */ f({
824
824
  __name: "Result",
825
825
  props: {
826
826
  status: { default: "info" },
@@ -844,7 +844,7 @@ var pt = /* @__PURE__ */ f({
844
844
  s("div", { class: v([`${N(c)}-icon`, {
845
845
  [`${N(c)}-icon-${e.status}`]: e.status,
846
846
  [`${N(c)}-icon-custom`]: e.status === null
847
- }]) }, [s("div", { class: v(`${N(c)}-icon-tip`) }, [D(e.$slots, "icon", {}, () => [e.status === "info" ? (S(), o("span", lt)) : e.status === "success" ? (S(), o("span", ut)) : e.status === "warning" ? (S(), o("span", dt)) : e.status === "error" ? (S(), o("span", ft)) : e.status === "403" ? (S(), i(et, { key: 4 })) : e.status === "404" ? (S(), i(it, { key: 5 })) : e.status === "500" ? (S(), i(ct, { key: 6 })) : a("", !0)])], 2)], 2),
847
+ }]) }, [s("div", { class: v(`${N(c)}-icon-tip`) }, [D(e.$slots, "icon", {}, () => [e.status === "info" ? (S(), o("span", ft)) : e.status === "success" ? (S(), o("span", pt)) : e.status === "warning" ? (S(), o("span", mt)) : e.status === "error" ? (S(), o("span", ht)) : e.status === "403" ? (S(), i(rt, { key: 4 })) : e.status === "404" ? (S(), i(st, { key: 5 })) : e.status === "500" ? (S(), i(dt, { key: 6 })) : a("", !0)])], 2)], 2),
848
848
  e.title || e.$slots.title ? (S(), o("div", {
849
849
  key: 0,
850
850
  class: v(`${N(c)}-title`)
@@ -863,9 +863,9 @@ var pt = /* @__PURE__ */ f({
863
863
  }, [D(e.$slots, "default")], 2)) : a("", !0)
864
864
  ], 2));
865
865
  }
866
- }), mt = pt;
867
- const ht = { class: "flex justify-between items-center" };
868
- var gt = /* @__PURE__ */ f({
866
+ }), _t = gt;
867
+ const vt = { class: "flex justify-between items-center" };
868
+ var yt = /* @__PURE__ */ f({
869
869
  __name: "SettingItem",
870
870
  props: {
871
871
  title: {},
@@ -883,22 +883,22 @@ var gt = /* @__PURE__ */ f({
883
883
  return (e, t) => (S(), o("div", g({
884
884
  class: [...a.value],
885
885
  style: { background: e.background }
886
- }, j({ ...i.value && { click: e.$attrs.onClick || e.$attrs.onClickCapture } }, !0)), [s("div", ht, [s("div", null, [s("div", { class: v(["u-fx u-gap5 u-fac", N(Y)("setting-item-title")]) }, [D(e.$slots, "title", {}, () => [u(A(e.title), 1)])], 2), D(e.$slots, "desc", {}, () => [s("div", { class: v(N(Y)("setting-item-desc")) }, A(e.desc), 3)])]), s("div", null, [D(e.$slots, "default")])]), s("div", null, [D(e.$slots, "extra")])], 16));
886
+ }, j({ ...i.value && { click: e.$attrs.onClick || e.$attrs.onClickCapture } }, !0)), [s("div", vt, [s("div", null, [s("div", { class: v(["u-fx u-gap5 u-fac", N(Y)("setting-item-title")]) }, [D(e.$slots, "title", {}, () => [u(A(e.title), 1)])], 2), D(e.$slots, "desc", {}, () => [s("div", { class: v(N(Y)("setting-item-desc")) }, A(e.desc), 3)])]), s("div", null, [D(e.$slots, "default")])]), s("div", null, [D(e.$slots, "extra")])], 16));
887
887
  }
888
- }), _t = gt, vt = /* @__PURE__ */ f({
888
+ }), bt = yt, xt = /* @__PURE__ */ f({
889
889
  __name: "SettingDivision",
890
890
  setup(e) {
891
891
  return (e, t) => (S(), o("div", { class: v(N(Y)("setting-division")) }, null, 2));
892
892
  }
893
- }), yt = vt;
894
- const bt = { key: 0 };
895
- var xt = /* @__PURE__ */ f({
893
+ }), St = xt;
894
+ const Ct = { key: 0 };
895
+ var wt = /* @__PURE__ */ f({
896
896
  __name: "SettingGroup",
897
897
  props: { title: {} },
898
898
  setup(e) {
899
- return (e, t) => (S(), o("div", { class: v([N(Y)("setting-group")]) }, [s("div", { class: v(N(Y)("setting-group-header")) }, [s("div", { class: v(N(Y)("setting-group-title")) }, A(e.title), 3), e.$slots.desc ? (S(), o("div", bt, [D(e.$slots, "desc")])) : a("", !0)], 2), s("div", null, [D(e.$slots, "default")])], 2));
899
+ return (e, t) => (S(), o("div", { class: v([N(Y)("setting-group")]) }, [s("div", { class: v(N(Y)("setting-group-header")) }, [s("div", { class: v(N(Y)("setting-group-title")) }, A(e.title), 3), e.$slots.desc ? (S(), o("div", Ct, [D(e.$slots, "desc")])) : a("", !0)], 2), s("div", null, [D(e.$slots, "default")])], 2));
900
900
  }
901
- }), St = xt, Ct = /* @__PURE__ */ f({
901
+ }), Tt = wt, Et = /* @__PURE__ */ f({
902
902
  name: "SwitchEnable",
903
903
  inheritAttrs: !1,
904
904
  __name: "SwitchEnable",
@@ -945,9 +945,9 @@ var xt = /* @__PURE__ */ f({
945
945
  }), null, 16, ["class", "modelValue"]);
946
946
  };
947
947
  }
948
- }), wt = Ct;
949
- const Tt = ["aria-checked", "disabled"];
950
- var Et = /* @__PURE__ */ f({
948
+ }), Dt = Et;
949
+ const Ot = ["aria-checked", "disabled"];
950
+ var kt = /* @__PURE__ */ f({
951
951
  name: "SwitchPlus",
952
952
  __name: "SwitchPlus",
953
953
  props: /* @__PURE__ */ h({
@@ -1017,7 +1017,7 @@ var Et = /* @__PURE__ */ f({
1017
1017
  }, w = async (e) => {
1018
1018
  if (x.value || h.value) return;
1019
1019
  let t = !_.value, n = t ? c.checkedValue : c.uncheckedValue, r = c.beforeChange;
1020
- if (ue(r)) {
1020
+ if (de(r)) {
1021
1021
  b.value = !0;
1022
1022
  try {
1023
1023
  let i = await r(n);
@@ -1032,7 +1032,7 @@ var Et = /* @__PURE__ */ f({
1032
1032
  l("blur", e);
1033
1033
  };
1034
1034
  L(i, (e) => {
1035
- (fe(e) || de(e)) && (i.value = c.uncheckedValue);
1035
+ (pe(e) || fe(e)) && (i.value = c.uncheckedValue);
1036
1036
  });
1037
1037
  let k = r(() => [
1038
1038
  m,
@@ -1071,9 +1071,9 @@ var Et = /* @__PURE__ */ f({
1071
1071
  }, [s("span", { class: v(`${N(m)}-handle-icon`) }, [x.value ? (S(), o("span", {
1072
1072
  key: 0,
1073
1073
  class: v(["i-p-loading", `${N(m)}-loading-icon`])
1074
- }, null, 2)) : (S(), o(e, { key: 1 }, [_.value ? D(t.$slots, "checked-icon", { key: 0 }) : D(t.$slots, "unchecked-icon", { key: 1 })], 64))], 2)], 6), t.type !== "line" && N(f) !== "small" && (N(d).checked || t.checkedText || N(d).unchecked || t.uncheckedText) ? (S(), o(e, { key: 0 }, [s("span", { class: v(`${N(m)}-text-holder`) }, [_.value ? D(t.$slots, "checked", { key: 0 }, () => [u(A(t.checkedText), 1)]) : D(t.$slots, "unchecked", { key: 1 }, () => [u(A(t.uncheckedText), 1)])], 2), s("span", { class: v(`${N(m)}-text`) }, [_.value ? D(t.$slots, "checked", { key: 0 }, () => [u(A(t.checkedText), 1)]) : D(t.$slots, "unchecked", { key: 1 }, () => [u(A(t.uncheckedText), 1)])], 2)], 64)) : a("", !0)], 46, Tt));
1074
+ }, null, 2)) : (S(), o(e, { key: 1 }, [_.value ? D(t.$slots, "checked-icon", { key: 0 }) : D(t.$slots, "unchecked-icon", { key: 1 })], 64))], 2)], 6), t.type !== "line" && N(f) !== "small" && (N(d).checked || t.checkedText || N(d).unchecked || t.uncheckedText) ? (S(), o(e, { key: 0 }, [s("span", { class: v(`${N(m)}-text-holder`) }, [_.value ? D(t.$slots, "checked", { key: 0 }, () => [u(A(t.checkedText), 1)]) : D(t.$slots, "unchecked", { key: 1 }, () => [u(A(t.uncheckedText), 1)])], 2), s("span", { class: v(`${N(m)}-text`) }, [_.value ? D(t.$slots, "checked", { key: 0 }, () => [u(A(t.checkedText), 1)]) : D(t.$slots, "unchecked", { key: 1 }, () => [u(A(t.uncheckedText), 1)])], 2)], 64)) : a("", !0)], 46, Ot));
1075
1075
  }
1076
- }), Dt = Et, Ot = /* @__PURE__ */ f({
1076
+ }), At = kt, jt = /* @__PURE__ */ f({
1077
1077
  __name: "SwitchPlusEnable",
1078
1078
  props: /* @__PURE__ */ h({
1079
1079
  modelValue: { type: [
@@ -1130,7 +1130,7 @@ var Et = /* @__PURE__ */ f({
1130
1130
  emits: ["update:value"],
1131
1131
  setup(e) {
1132
1132
  let t = F(e, "value"), n = e;
1133
- return (e, r) => (S(), i(Dt, g({
1133
+ return (e, r) => (S(), i(At, g({
1134
1134
  value: t.value,
1135
1135
  "onUpdate:value": r[0] ||= (e) => t.value = e
1136
1136
  }, n), {
@@ -1151,7 +1151,7 @@ var Et = /* @__PURE__ */ f({
1151
1151
  _: 1
1152
1152
  }, 16, ["value"]));
1153
1153
  }
1154
- }), kt = Ot, At = /* @__PURE__ */ f({
1154
+ }), Mt = jt, Nt = /* @__PURE__ */ f({
1155
1155
  __name: "thumb",
1156
1156
  props: {
1157
1157
  data: {},
@@ -1193,7 +1193,7 @@ var Et = /* @__PURE__ */ f({
1193
1193
  t !== f.value && (f.value = t, a("scroll", t));
1194
1194
  }
1195
1195
  }, C = () => {
1196
- p.value = !1, Q(window, "mousemove", x), Q(window, "mouseup", C);
1196
+ p.value = !1, ge(window, "mousemove", x), ge(window, "mouseup", C);
1197
1197
  }, w = (e) => {
1198
1198
  p.value || (e = b(e), e !== f.value && (f.value = e));
1199
1199
  }, E = r(() => [
@@ -1214,7 +1214,7 @@ var Et = /* @__PURE__ */ f({
1214
1214
  onMousedown: g
1215
1215
  }, [s("div", { class: v(`${N(c)}-thumb-bar`) }, null, 2)], 38)], 34));
1216
1216
  }
1217
- }), jt = At, Mt = /* @__PURE__ */ f({
1217
+ }), Pt = Nt, Ft = /* @__PURE__ */ f({
1218
1218
  __name: "Scrollbar",
1219
1219
  props: {
1220
1220
  type: { default: "embed" },
@@ -1300,7 +1300,7 @@ var Et = /* @__PURE__ */ f({
1300
1300
  { [`${u}-both`]: O.value },
1301
1301
  c.outerClass
1302
1302
  ]), R = (e, t) => {
1303
- me(e) ? d.value?.scrollTo(e) : (e || t) && d.value?.scrollTo(e, t);
1303
+ he(e) ? d.value?.scrollTo(e) : (e || t) && d.value?.scrollTo(e, t);
1304
1304
  }, z = (e) => {
1305
1305
  d.value?.scrollTo({ top: e });
1306
1306
  }, B = (e) => {
@@ -1319,7 +1319,7 @@ var Et = /* @__PURE__ */ f({
1319
1319
  ref: d,
1320
1320
  class: `${N(u)}-container`
1321
1321
  }, e.$attrs, { onScroll: M }), [D(e.$slots, "default")], 16),
1322
- !e.hide && w.value ? (S(), i(jt, {
1322
+ !e.hide && w.value ? (S(), i(Pt, {
1323
1323
  key: 0,
1324
1324
  ref_key: "horizontalThumbRef",
1325
1325
  ref: m,
@@ -1328,7 +1328,7 @@ var Et = /* @__PURE__ */ f({
1328
1328
  both: O.value,
1329
1329
  onScroll: P
1330
1330
  }, null, 8, ["data", "both"])) : a("", !0),
1331
- !e.hide && E.value ? (S(), i(jt, {
1331
+ !e.hide && E.value ? (S(), i(Pt, {
1332
1332
  key: 1,
1333
1333
  ref_key: "verticalThumbRef",
1334
1334
  ref: h,
@@ -1339,83 +1339,93 @@ var Et = /* @__PURE__ */ f({
1339
1339
  }, null, 8, ["data", "both"])) : a("", !0)
1340
1340
  ], 6));
1341
1341
  }
1342
- }), Nt = Mt, Pt = class {
1343
- observers = /* @__PURE__ */ new Map();
1344
- entries = /* @__PURE__ */ new Map();
1345
- getStats() {
1346
- return {
1347
- observerCount: this.observers.size,
1348
- elementCount: this.entries.size,
1349
- observerDetails: Array.from(this.observers.keys()),
1350
- memoryEstimate: `约 ${Math.round(this.entries.size * .1)}KB`
1351
- };
1352
- }
1353
- observe(e, t, n = {}) {
1354
- let r = n.rootMargin || "0px", i = `rootMargin:${r}`, a = this.observers.get(i);
1355
- a || (a = new IntersectionObserver((e) => {
1356
- e.forEach((e) => {
1357
- let t = this.entries.get(e.target);
1358
- t && t.callback(e.isIntersecting);
1359
- });
1360
- }, {
1361
- rootMargin: r,
1362
- threshold: 0
1363
- }), this.observers.set(i, a));
1364
- let o = {
1365
- element: e,
1366
- callback: t,
1367
- rootMargin: r
1368
- };
1369
- return this.entries.set(e, o), a.observe(e), () => {
1370
- this.unobserve(e);
1371
- };
1372
- }
1373
- unobserve(e) {
1374
- let t = this.entries.get(e);
1375
- if (!t) return;
1376
- let n = `rootMargin:${t.rootMargin}`, r = this.observers.get(n);
1377
- r && r.unobserve(e), this.entries.delete(e);
1378
- let i = Array.from(this.entries.values()).some((e) => e.rootMargin === t.rootMargin);
1379
- !i && r && (r.disconnect(), this.observers.delete(n));
1380
- }
1381
- };
1382
- const Ft = new Pt();
1383
- function It(e, t = {}) {
1384
- let n = null, r = (r) => {
1385
- r && !n && (n = Ft.observe(r, e, t));
1386
- }, i = () => {
1387
- n && (n(), n = null);
1388
- };
1389
- return x(() => {
1390
- i();
1391
- }), {
1392
- start: r,
1393
- stop: i
1394
- };
1395
- }
1396
- var Lt = /* @__PURE__ */ f({
1342
+ }), It = Ft, Lt = /* @__PURE__ */ f({
1397
1343
  __name: "LazyLoader",
1398
1344
  props: {
1399
1345
  w: { default: "100%" },
1400
1346
  h: { default: "100%" },
1401
1347
  distance: { default: 0 }
1402
1348
  },
1403
- emits: ["load"],
1404
- setup(e, { emit: t }) {
1405
- let n = e, r = t, i = T(!1), a = T(), { start: s, stop: c } = It((e) => {
1406
- e && (i.value = !0, r("load"), c());
1407
- }, { rootMargin: `${n.distance}px` });
1408
- return L(a, (e) => {
1409
- e && s(e);
1410
- }, { immediate: !0 }), (e, t) => i.value ? D(e.$slots, "default", { key: 0 }) : (S(), o("div", {
1349
+ setup(e) {
1350
+ let t = e, n = T(!1), r = T(), { stop: i } = oe(r, ([{ isIntersecting: e }]) => {
1351
+ e && (n.value = !0, i());
1352
+ }, {
1353
+ rootMargin: `${t.distance}px`,
1354
+ threshold: 0
1355
+ });
1356
+ return (e, i) => n.value ? D(e.$slots, "default", { key: 0 }) : (S(), o("div", {
1411
1357
  key: 1,
1412
1358
  ref_key: "box",
1413
- ref: a,
1359
+ ref: r,
1414
1360
  style: y({
1415
- height: e.h,
1416
- width: e.w
1361
+ height: t.h,
1362
+ width: t.w
1417
1363
  })
1418
1364
  }, null, 4));
1419
1365
  }
1420
1366
  }), Rt = Lt;
1421
- export { ge as BackTop, je as ContextMenu, De as ContextMenuDivider, Te as ContextMenuGroup, Ce as ContextMenuItem, ke as ContextMenuSubmenu, Rt as LazyLoader, xe as LeftMenu, ye as LeftMenuEventDispatch, $ as LeftMenuEvents, Ye as PageHeader, mt as Result, Nt as Scrollbar, yt as SettingDivision, St as SettingGroup, _t as SettingItem, Fe as SplitPanel, wt as SwitchEnable, Dt as SwitchPlus, kt as SwitchPlusEnable, jt as Thumb, Le as UtoolsBaseLayout, qe as UtoolsLayout, ve as WebBaseLayout, Ne as WebLayout, X as getBuildCurrentClassPrefix, Y as getClassPrefix, le as isEventExist, ue as isFunction, de as isNull, pe as isNumber, me as isObject, fe as isUndefined, Q as off, Z as on };
1367
+ function zt(e) {
1368
+ return e instanceof Function && e.constructor.name === "AsyncFunction";
1369
+ }
1370
+ const Bt = (e) => {
1371
+ let t = T(!1), n = (...n) => (t.value = !0, new Promise((r, i) => {
1372
+ setTimeout(async () => {
1373
+ try {
1374
+ if (zt(e)) return await e(...n);
1375
+ r(e(...n));
1376
+ } catch (e) {
1377
+ console.log("useSingleLoading", e), i(e);
1378
+ } finally {
1379
+ t.value = !1;
1380
+ }
1381
+ }, 50);
1382
+ }));
1383
+ return [n, t];
1384
+ }, Vt = (e, t) => {
1385
+ let n = T([]), i = async (...r) => {
1386
+ let i = t(...r);
1387
+ n.value.push(i);
1388
+ try {
1389
+ return zt(e) ? await e(...r) : e(...r);
1390
+ } catch (e) {
1391
+ console.error("useLoading", e);
1392
+ } finally {
1393
+ let e = n.value.findIndex((e) => e === i);
1394
+ e !== -1 && n.value.splice(e, 1);
1395
+ }
1396
+ }, a = r(() => (e) => n.value.includes(e));
1397
+ return [
1398
+ i,
1399
+ a,
1400
+ n
1401
+ ];
1402
+ }, Q = window.matchMedia("(prefers-color-scheme: dark)"), $ = T("default");
1403
+ function Ht(e) {
1404
+ function t(t) {
1405
+ if (e.getUserThemeConfig) {
1406
+ let t = e.getUserThemeConfig();
1407
+ if (t !== "auto") {
1408
+ t === "dark" ? (e.setDarkTheme(), $.value = "dark") : t === "default" && (e.setDefaultTheme(), $.value = "default");
1409
+ return;
1410
+ }
1411
+ }
1412
+ t.matches ? (e.setDarkTheme(), $.value = "dark") : (e.setDefaultTheme(), $.value = "default");
1413
+ }
1414
+ function n() {
1415
+ Q.addEventListener("change", t), Q.dispatchEvent(new MediaQueryListEvent("change", Q));
1416
+ }
1417
+ function r() {
1418
+ Q.dispatchEvent(new MediaQueryListEvent("change", Q));
1419
+ }
1420
+ return n(), console.log("mediaQueryList", Q), { themeRefresh: r };
1421
+ }
1422
+ function Ut(e) {
1423
+ Q.dispatchEvent(new MediaQueryListEvent("change", {
1424
+ matches: e === "dark",
1425
+ media: "(prefers-color-scheme: dark)"
1426
+ }));
1427
+ }
1428
+ function Wt() {
1429
+ return $.value;
1430
+ }
1431
+ export { ve as BackTop, Pe as ContextMenu, Ae as ContextMenuDivider, Oe as ContextMenuGroup, Ee as ContextMenuItem, Me as ContextMenuSubmenu, Rt as LazyLoader, we as LeftMenu, Se as LeftMenuEventDispatch, xe as LeftMenuEvents, Qe as PageHeader, _t as Result, It as Scrollbar, St as SettingDivision, Tt as SettingGroup, bt as SettingItem, Re as SplitPanel, Dt as SwitchEnable, At as SwitchPlus, Mt as SwitchPlusEnable, Pt as Thumb, Be as UtoolsBaseLayout, Xe as UtoolsLayout, be as WebBaseLayout, Ie as WebLayout, X as getBuildCurrentClassPrefix, Y as getClassPrefix, Wt as getCurrentTheme, ue as isEventExist, de as isFunction, fe as isNull, me as isNumber, he as isObject, pe as isUndefined, ge as off, Z as on, Ut as setCurrentTheme, Vt as useMultiLoading, Bt as useSingleLoading, Ht as useTheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaou66/u-web-ui",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "description": "web-ui",
5
5
  "main": "./dist/index.es.js",
6
6
  "module": "./dist/index.es.js",
@@ -1,13 +0,0 @@
1
- export declare function useGlobalIntersectionObserver(callback: (isIntersecting: boolean) => void, options?: {
2
- rootMargin?: string;
3
- }): {
4
- start: (target: HTMLElement) => void;
5
- stop: () => void;
6
- };
7
- export declare function getIntersectionObserverStats(): {
8
- observerCount: number;
9
- elementCount: number;
10
- observerDetails: string[];
11
- memoryEstimate: string;
12
- };
13
- //# sourceMappingURL=useGlobalIntersectionObserver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useGlobalIntersectionObserver.d.ts","sourceRoot":"","sources":["../../../../src/components/container/LazyLoader/useGlobalIntersectionObserver.ts"],"names":[],"mappings":"AAoFA,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,EAC3C,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO;oBAKd,WAAW;;EAqBnC;AAGD,wBAAgB,4BAA4B;;;;;EAE3C"}