@xiaou66/u-web-ui 0.0.39 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,49 +1,60 @@
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
- import { Aside as B, Avatar as V, Button as H, Content as U, Divider as W, HeadMenu as G, Header as K, Icon as q, Layout as J, Menu as ee, MenuItem as te, Submenu as ne, Switch as re } from "tdesign-vue-next";
3
- import { useRoute as ie, useRouter as ae } from "vue-router";
4
- import { useEventListener as oe } from "@vueuse/core";
5
- const se = "u-web";
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
+ import { useRoute as re, useRouter as ie } from "vue-router";
4
+ import { useEventListener as ae } from "@vueuse/core";
6
5
  function Y(...e) {
7
- return se + "-" + e.join("-");
6
+ return "u-web-" + e.join("-");
8
7
  }
9
8
  function X(...e) {
10
9
  let t = e.join("-");
11
10
  return (...e) => Y(t, ...e);
12
11
  }
13
- function ce(e) {
12
+ function oe(e) {
14
13
  return e.substring(0, 1).toUpperCase() + e.substring(1);
15
14
  }
16
- const Z = "on", le = [
15
+ const se = [
17
16
  "Capture",
18
17
  "Passive",
19
18
  "Once"
20
- ], ue = /* @__PURE__ */ RegExp(`^(${le.join("|")})*$`);
21
- function de(...e) {
19
+ ], ce = /* @__PURE__ */ RegExp(`^(${se.join("|")})*$`);
20
+ function le(...e) {
22
21
  if (!e.length) return !1;
23
22
  let t = p();
24
23
  if (!t) return !1;
25
24
  let { attrs: n = {}, vnode: r } = t;
26
25
  if (!r) return !1;
27
- let i = r.props || {}, a = [...Object.keys(n).filter((e) => e.startsWith(Z)), ...Object.keys(i).filter((e) => e.startsWith(Z))];
26
+ let i = r.props || {}, a = [...Object.keys(n).filter((e) => e.startsWith("on")), ...Object.keys(i).filter((e) => e.startsWith("on"))];
28
27
  for (let t of e) {
29
- let e = t.startsWith(Z) ? t : `${Z}${ce(t)}`;
28
+ let e = t.startsWith("on") ? t : `on${oe(t)}`;
30
29
  if (a.includes(e)) return !0;
31
30
  for (let t of a) if (t.startsWith(e)) {
32
31
  let n = t.slice(e.length);
33
- if (n && ue.test(n)) return !0;
32
+ if (n && ce.test(n)) return !0;
34
33
  }
35
34
  }
36
35
  return !1;
37
36
  }
38
- function fe(e) {
37
+ function ue(e) {
39
38
  return typeof e == "function";
40
39
  }
41
- function pe(e) {
40
+ function de(e) {
42
41
  return e === null;
43
42
  }
44
- function me(e) {
43
+ function fe(e) {
45
44
  return e === void 0;
46
45
  }
46
+ function pe(e) {
47
+ return typeof e == "number" && !isNaN(e);
48
+ }
49
+ function me(e) {
50
+ return typeof e == "object" && !!e && !Array.isArray(e);
51
+ }
52
+ function Z(e, t, n) {
53
+ e.addEventListener(t, n);
54
+ }
55
+ function Q(e, t, n) {
56
+ e.removeEventListener(t, n);
57
+ }
47
58
  var he = /* @__PURE__ */ f({
48
59
  __name: "BackTop",
49
60
  props: {
@@ -113,7 +124,7 @@ var he = /* @__PURE__ */ f({
113
124
  __name: "WebBaseLayout",
114
125
  setup(e) {
115
126
  return (e, t) => {
116
- let n = K, r = B, o = U, s = J;
127
+ let n = G, r = B, o = H, s = q;
117
128
  return S(), i(s, { class: "h-screen" }, {
118
129
  default: R(() => [e.$slots.header ? (S(), i(n, { key: 0 }, {
119
130
  default: R(() => [D(e.$slots, "header")]),
@@ -136,11 +147,11 @@ var he = /* @__PURE__ */ f({
136
147
  };
137
148
  }
138
149
  }), ve = _e;
139
- let Q = /* @__PURE__ */ function(e) {
150
+ let $ = /* @__PURE__ */ function(e) {
140
151
  return e.Refresh = "u:leftMenu:refresh", e;
141
152
  }({});
142
153
  const ye = { refresh: () => {
143
- window.dispatchEvent(new CustomEvent(Q.Refresh));
154
+ window.dispatchEvent(new CustomEvent($.Refresh));
144
155
  } };
145
156
  var be = /* @__PURE__ */ f({
146
157
  __name: "LeftMenu",
@@ -153,7 +164,8 @@ var be = /* @__PURE__ */ f({
153
164
  refreshEventListener: {
154
165
  type: Boolean,
155
166
  default: !1
156
- }
167
+ },
168
+ size: { default: "default" }
157
169
  }, {
158
170
  collapsed: {
159
171
  type: Boolean,
@@ -167,7 +179,7 @@ var be = /* @__PURE__ */ f({
167
179
  function s() {
168
180
  a.value = !a.value;
169
181
  }
170
- let l = ae(), f = ie(), p = T([]);
182
+ let l = ie(), f = re(), p = T([]);
171
183
  function m() {
172
184
  p.value = l.getRoutes().filter((e) => e.meta).filter((e) => e.path.split("/").length <= 2).filter((e) => e.meta.menu);
173
185
  }
@@ -183,16 +195,17 @@ var be = /* @__PURE__ */ f({
183
195
  function _(e) {
184
196
  return e.children ? e.children.filter((e) => e.meta?.menu) : [];
185
197
  }
186
- return r.refreshEventListener && oe(document, Q.Refresh, h), n({
198
+ return r.refreshEventListener && ae(document, $.Refresh, h), n({
187
199
  changeCollapsed: s,
188
200
  refreshRouter: h
189
201
  }), (t, n) => {
190
- let r = q, l = H, m = te, h = ne, y = ee;
202
+ let r = K, l = V, m = ee, h = te, y = J;
191
203
  return S(), i(y, {
192
204
  value: N(f).name,
193
205
  collapsed: a.value,
194
206
  "onUpdate:collapsed": n[0] ||= (e) => a.value = e,
195
- width: ["180px", "52px"]
207
+ width: ["180px", t.size === "small" ? "42px" : "52px"],
208
+ class: v([{ "u-web-left-menu-small": t.size === "small" }])
196
209
  }, c({
197
210
  default: R(() => [(S(!0), o(e, null, E(p.value, (t) => (S(), o(e, { key: String(t.name) }, [_(t).length > 0 ? (S(), i(h, {
198
211
  key: 0,
@@ -238,10 +251,15 @@ var be = /* @__PURE__ */ f({
238
251
  name: "logo",
239
252
  fn: R(() => [D(t.$slots, "logo")]),
240
253
  key: "1"
241
- } : void 0]), 1032, ["value", "collapsed"]);
254
+ } : void 0]), 1032, [
255
+ "value",
256
+ "collapsed",
257
+ "width",
258
+ "class"
259
+ ]);
242
260
  };
243
261
  }
244
- }), $ = be, xe = /* @__PURE__ */ f({
262
+ }), xe = be, Se = /* @__PURE__ */ f({
245
263
  __name: "ContextMenu",
246
264
  props: { hideOnSelect: {
247
265
  type: Boolean,
@@ -304,7 +322,7 @@ var be = /* @__PURE__ */ f({
304
322
  }, null, 34)) : a("", !0)]))
305
323
  ], 64));
306
324
  }
307
- }), Se = xe, Ce = /* @__PURE__ */ f({
325
+ }), Ce = Se, we = /* @__PURE__ */ f({
308
326
  __name: "ContextMenuItem",
309
327
  props: {
310
328
  label: {},
@@ -348,7 +366,7 @@ var be = /* @__PURE__ */ f({
348
366
  class: v([N(i)("icon"), e.icon])
349
367
  }, A(e.icon), 3)) : a("", !0), s("span", { class: v(N(i)("label")) }, A(e.label), 3)], 34));
350
368
  }
351
- }), we = Ce, Te = /* @__PURE__ */ f({
369
+ }), Te = we, Ee = /* @__PURE__ */ f({
352
370
  __name: "ContextMenuGroup",
353
371
  props: { title: {} },
354
372
  setup(e) {
@@ -358,12 +376,12 @@ var be = /* @__PURE__ */ f({
358
376
  class: v(N(t)("title"))
359
377
  }, A(e.title), 3)) : a("", !0), D(e.$slots, "default")], 2));
360
378
  }
361
- }), Ee = Te, De = /* @__PURE__ */ f({
379
+ }), De = Ee, Oe = /* @__PURE__ */ f({
362
380
  __name: "ContextMenuDivider",
363
381
  setup(e) {
364
382
  return (e, t) => (S(), o("div", { class: v(N(Y)("context-menu-divider")) }, null, 2));
365
383
  }
366
- }), Oe = De, ke = /* @__PURE__ */ f({
384
+ }), ke = Oe, Ae = /* @__PURE__ */ f({
367
385
  __name: "ContextMenuSubmenu",
368
386
  props: {
369
387
  label: {},
@@ -476,11 +494,11 @@ var be = /* @__PURE__ */ f({
476
494
  }, [D(e.$slots, "default")], 38)) : a("", !0)
477
495
  ], 34));
478
496
  }
479
- }), Ae = ke, je = /* @__PURE__ */ f({
497
+ }), je = Ae, Me = /* @__PURE__ */ f({
480
498
  __name: "WebLayout",
481
499
  setup(e) {
482
500
  return (e, t) => {
483
- let n = G, r = O("router-view");
501
+ let n = W, r = O("router-view");
484
502
  return S(), i(ve, null, {
485
503
  header: R(() => [d(n, {
486
504
  value: "item1",
@@ -494,13 +512,13 @@ var be = /* @__PURE__ */ f({
494
512
  fn: R(() => [D(e.$slots, "operations")]),
495
513
  key: "1"
496
514
  } : void 0]), 1024)]),
497
- left: R(() => [D(e.$slots, "left", {}, () => [d(N($))])]),
515
+ left: R(() => [D(e.$slots, "left", {}, () => [d(N(xe))])]),
498
516
  default: R(() => [D(e.$slots, "default", {}, () => [s("div", { class: v([N(Y)("main-content-inner")]) }, [d(r)], 2)])]),
499
517
  _: 3
500
518
  });
501
519
  };
502
520
  }
503
- }), Me = je, Ne = /* @__PURE__ */ f({
521
+ }), Ne = Me, Pe = /* @__PURE__ */ f({
504
522
  __name: "SplitPanel",
505
523
  props: {
506
524
  component: { default: "div" },
@@ -652,11 +670,11 @@ var be = /* @__PURE__ */ f({
652
670
  _: 3
653
671
  }, 8, ["class"]));
654
672
  }
655
- }), Pe = Ne, Fe = /* @__PURE__ */ f({
673
+ }), Fe = Pe, Ie = /* @__PURE__ */ f({
656
674
  __name: "UtoolsBaseLayout",
657
675
  setup(e) {
658
676
  return (e, t) => {
659
- let n = B, r = U, a = J;
677
+ let n = B, r = H, a = q;
660
678
  return S(), i(a, { class: "h-screen min-h-0" }, {
661
679
  default: R(() => [d(n, { width: "auto" }, {
662
680
  default: R(() => [D(e.$slots, "left")]),
@@ -672,51 +690,56 @@ var be = /* @__PURE__ */ f({
672
690
  });
673
691
  };
674
692
  }
675
- }), Ie = Fe;
676
- const Le = { class: "utools" }, Re = { class: "title" }, ze = { class: "flex justify-end h-full pr-3 w-full" }, Be = { class: "content" }, Ve = { class: "content-inner" }, He = {
693
+ }), Le = Ie;
694
+ const Re = { class: "utools" }, ze = { class: "w-8 h-auto overflow-hidden rounded-full" }, 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 = {
677
695
  class: "flex items-center justify-center",
678
696
  style: { "font-size": "10px" }
679
697
  };
680
- var Ue = /* @__PURE__ */ f({
698
+ var Ke = /* @__PURE__ */ f({
681
699
  __name: "UtoolsLayout",
682
700
  props: {
683
701
  avatar: { default: "https://www.u-tools.cn/assets/favicon.png" },
684
702
  loadRouter: {},
685
703
  refreshEventListener: { type: Boolean },
686
- title: { default: "utools demo" }
704
+ title: { default: "utools demo" },
705
+ size: { default: "default" }
687
706
  },
688
707
  setup(e) {
689
708
  let t = T(), n = T(!0);
690
709
  return (e, r) => {
691
- let i = V, a = O("router-view");
692
- return S(), o("div", Le, [d(Ie, null, {
710
+ let i = O("router-view");
711
+ return S(), o("div", Re, [d(Le, null, {
693
712
  left: R(() => [s("div", { class: v(N(Y)("utools", "left-menu")) }, [s("div", {
694
713
  class: v(["flex items-center justify-center", N(Y)("utools", "left-menu", "collapse")]),
695
714
  onClick: r[0] ||= (e) => t.value?.changeCollapsed()
696
- }, [s("div", { class: v(["w-5 h-5 font-bold", n.value ? "i-p-expandLeft" : "i-p-expandRight"]) }, null, 2)], 2), d(N($), g({
715
+ }, [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({
697
716
  ref_key: "leftMenuRef",
698
717
  ref: t
699
718
  }, {
700
719
  loadRouter: e.loadRouter,
701
- refreshEventListener: e.refreshEventListener
720
+ refreshEventListener: e.refreshEventListener,
721
+ size: e.size
702
722
  }, {
703
723
  collapsed: n.value,
704
724
  "onUpdate:collapsed": r[1] ||= (e) => n.value = e,
705
725
  hideOperations: ""
706
726
  }), {
707
- logo: R(() => [d(i, { image: e.avatar }, null, 8, ["image"]), s("div", Re, A(e.title), 1)]),
727
+ logo: R(() => [s("div", ze, [s("img", {
728
+ class: "logo w-full h-full",
729
+ src: e.avatar
730
+ }, null, 8, Be)]), s("div", Ve, A(e.title), 1)]),
708
731
  _: 1
709
732
  }, 16, ["collapsed"])], 2)]),
710
733
  default: R(() => [s("div", { class: v(N(Y)("utools", "content-wrapper")) }, [
711
- s("div", ze, [D(e.$slots, "header-tips")]),
712
- s("div", Be, [s("div", Ve, [d(a)])]),
713
- D(e.$slots, "footer", {}, () => [s("div", He, " © " + A((/* @__PURE__ */ new Date()).getFullYear()) + " [xiaou]。保留所有权利 ", 1)])
734
+ s("div", He, [D(e.$slots, "header-tips")]),
735
+ s("div", Ue, [s("div", We, [d(i)])]),
736
+ D(e.$slots, "footer", {}, () => [s("div", Ge, " © " + A((/* @__PURE__ */ new Date()).getFullYear()) + " [xiaou]。保留所有权利 ", 1)])
714
737
  ], 2)]),
715
738
  _: 3
716
739
  })]);
717
740
  };
718
741
  }
719
- }), We = Ue, Ge = /* @__PURE__ */ f({
742
+ }), qe = Ke, Je = /* @__PURE__ */ f({
720
743
  __name: "PageHeader",
721
744
  props: {
722
745
  title: { default: "" },
@@ -728,9 +751,9 @@ var Ue = /* @__PURE__ */ f({
728
751
  let t = e, n = X("page-header"), i = r(() => {
729
752
  let e = [n()];
730
753
  return t.size !== "default" && e.push(n(t.size)), e;
731
- }), c = r(() => de("onBack"));
754
+ }), c = r(() => le("onBack"));
732
755
  return (e, t) => {
733
- let r = q, l = H, f = W;
756
+ let r = K, l = V, f = U;
734
757
  return S(), o("div", { class: v(i.value) }, [s("div", { class: v(["flex items-center", N(n)("header")]) }, [
735
758
  c.value || e.$slots.prefix ? D(e.$slots, "prefix", { key: 0 }, () => [d(l, {
736
759
  class: v(N(n)("header", "back")),
@@ -753,40 +776,40 @@ var Ue = /* @__PURE__ */ f({
753
776
  }, [D(e.$slots, "extra")], 2)) : a("", !0)], 2);
754
777
  };
755
778
  }
756
- }), Ke = Ge, qe = (e, t) => {
779
+ }), Ye = Je, Xe = (e, t) => {
757
780
  let n = e.__vccOpts || e;
758
781
  for (let [e, r] of t) n[e] = r;
759
782
  return n;
760
783
  };
761
- const Je = {}, Ye = { class: "result-error-icon" };
762
- function Xe(e, t) {
763
- return S(), o("div", Ye, 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)]);
784
+ const Ze = {}, Qe = { class: "result-error-icon" };
785
+ function $e(e, t) {
786
+ 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)]);
764
787
  }
765
- var Ze = /* @__PURE__ */ qe(Je, [["render", Xe], ["__scopeId", "data-v-fc6ebdc7"]]);
766
- const Qe = {}, $e = { class: "result-error-icon" };
767
- function et(e, t) {
768
- return S(), o("div", $e, 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)]);
788
+ var et = /* @__PURE__ */ Xe(Ze, [["render", $e], ["__scopeId", "data-v-fc6ebdc7"]]);
789
+ const tt = {}, nt = { class: "result-error-icon" };
790
+ function rt(e, t) {
791
+ 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)]);
769
792
  }
770
- var tt = /* @__PURE__ */ qe(Qe, [["render", et], ["__scopeId", "data-v-cdc3b8a1"]]);
771
- const nt = {}, rt = { class: "result-error-icon" };
772
- function it(e, t) {
773
- return S(), o("div", rt, 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)]);
793
+ var it = /* @__PURE__ */ Xe(tt, [["render", rt], ["__scopeId", "data-v-cdc3b8a1"]]);
794
+ const at = {}, ot = { class: "result-error-icon" };
795
+ function st(e, t) {
796
+ 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)]);
774
797
  }
775
- var at = /* @__PURE__ */ qe(nt, [["render", it], ["__scopeId", "data-v-cb66ef61"]]);
776
- const ot = {
798
+ var ct = /* @__PURE__ */ Xe(at, [["render", st], ["__scopeId", "data-v-cb66ef61"]]);
799
+ const lt = {
777
800
  key: 0,
778
801
  class: "i-p-info w-12 h-12"
779
- }, st = {
802
+ }, ut = {
780
803
  key: 1,
781
804
  class: "i-p-check"
782
- }, ct = {
805
+ }, dt = {
783
806
  key: 2,
784
807
  class: "i-p-info w-12 h-12"
785
- }, lt = {
808
+ }, ft = {
786
809
  key: 3,
787
810
  class: "i-p-close"
788
811
  };
789
- var ut = /* @__PURE__ */ f({
812
+ var pt = /* @__PURE__ */ f({
790
813
  __name: "Result",
791
814
  props: {
792
815
  status: { default: "info" },
@@ -810,7 +833,7 @@ var ut = /* @__PURE__ */ f({
810
833
  s("div", { class: v([`${N(c)}-icon`, {
811
834
  [`${N(c)}-icon-${e.status}`]: e.status,
812
835
  [`${N(c)}-icon-custom`]: e.status === null
813
- }]) }, [s("div", { class: v(`${N(c)}-icon-tip`) }, [D(e.$slots, "icon", {}, () => [e.status === "info" ? (S(), o("span", ot)) : e.status === "success" ? (S(), o("span", st)) : e.status === "warning" ? (S(), o("span", ct)) : e.status === "error" ? (S(), o("span", lt)) : e.status === "403" ? (S(), i(Ze, { key: 4 })) : e.status === "404" ? (S(), i(tt, { key: 5 })) : e.status === "500" ? (S(), i(at, { key: 6 })) : a("", !0)])], 2)], 2),
836
+ }]) }, [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),
814
837
  e.title || e.$slots.title ? (S(), o("div", {
815
838
  key: 0,
816
839
  class: v(`${N(c)}-title`)
@@ -829,9 +852,9 @@ var ut = /* @__PURE__ */ f({
829
852
  }, [D(e.$slots, "default")], 2)) : a("", !0)
830
853
  ], 2));
831
854
  }
832
- }), dt = ut;
833
- const ft = { class: "flex justify-between items-center" };
834
- var pt = /* @__PURE__ */ f({
855
+ }), mt = pt;
856
+ const ht = { class: "flex justify-between items-center" };
857
+ var gt = /* @__PURE__ */ f({
835
858
  __name: "SettingItem",
836
859
  props: {
837
860
  title: {},
@@ -846,22 +869,22 @@ var pt = /* @__PURE__ */ f({
846
869
  let e = [];
847
870
  return e.push(Y("setting-item")), n.value && e.push("cursor-pointer"), e;
848
871
  });
849
- return (e, t) => (S(), o("div", g({ class: i.value }, j({ ...n.value && { click: e.$attrs.onClick || e.$attrs.onClickCapture } }, !0)), [s("div", ft, [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));
872
+ return (e, t) => (S(), o("div", g({ class: i.value }, j({ ...n.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));
850
873
  }
851
- }), mt = pt, ht = /* @__PURE__ */ f({
874
+ }), _t = gt, vt = /* @__PURE__ */ f({
852
875
  __name: "SettingDivision",
853
876
  setup(e) {
854
877
  return (e, t) => (S(), o("div", { class: v(N(Y)("setting-division")) }, null, 2));
855
878
  }
856
- }), gt = ht;
857
- const _t = { key: 0 };
858
- var vt = /* @__PURE__ */ f({
879
+ }), yt = vt;
880
+ const bt = { key: 0 };
881
+ var xt = /* @__PURE__ */ f({
859
882
  __name: "SettingGroup",
860
883
  props: { title: {} },
861
884
  setup(e) {
862
- 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", _t, [D(e.$slots, "desc")])) : a("", !0)], 2), s("div", null, [D(e.$slots, "default")])], 2));
885
+ 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));
863
886
  }
864
- }), yt = vt, bt = /* @__PURE__ */ f({
887
+ }), St = xt, Ct = /* @__PURE__ */ f({
865
888
  name: "SwitchEnable",
866
889
  inheritAttrs: !1,
867
890
  __name: "SwitchEnable",
@@ -896,7 +919,7 @@ var vt = /* @__PURE__ */ f({
896
919
  style: "width: 10px; height: 10px;"
897
920
  }, null);
898
921
  return (e, t) => {
899
- let r = re;
922
+ let r = ne;
900
923
  return S(), i(r, g({ class: ["u-web-switch", { "u-web-switch-green": n.color === "green" }] }, {
901
924
  ...n,
902
925
  value: void 0
@@ -908,9 +931,9 @@ var vt = /* @__PURE__ */ f({
908
931
  }), null, 16, ["class", "modelValue"]);
909
932
  };
910
933
  }
911
- }), xt = bt;
912
- const St = ["aria-checked", "disabled"];
913
- var Ct = /* @__PURE__ */ f({
934
+ }), wt = Ct;
935
+ const Tt = ["aria-checked", "disabled"];
936
+ var Et = /* @__PURE__ */ f({
914
937
  name: "SwitchPlus",
915
938
  __name: "SwitchPlus",
916
939
  props: /* @__PURE__ */ h({
@@ -980,7 +1003,7 @@ var Ct = /* @__PURE__ */ f({
980
1003
  }, w = async (e) => {
981
1004
  if (x.value || h.value) return;
982
1005
  let t = !_.value, n = t ? c.checkedValue : c.uncheckedValue, r = c.beforeChange;
983
- if (fe(r)) {
1006
+ if (ue(r)) {
984
1007
  b.value = !0;
985
1008
  try {
986
1009
  let i = await r(n);
@@ -995,7 +1018,7 @@ var Ct = /* @__PURE__ */ f({
995
1018
  l("blur", e);
996
1019
  };
997
1020
  L(i, (e) => {
998
- (me(e) || pe(e)) && (i.value = c.uncheckedValue);
1021
+ (fe(e) || de(e)) && (i.value = c.uncheckedValue);
999
1022
  });
1000
1023
  let k = r(() => [
1001
1024
  m,
@@ -1034,9 +1057,9 @@ var Ct = /* @__PURE__ */ f({
1034
1057
  }, [s("span", { class: v(`${N(m)}-handle-icon`) }, [x.value ? (S(), o("span", {
1035
1058
  key: 0,
1036
1059
  class: v(["i-p-loading", `${N(m)}-loading-icon`])
1037
- }, 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, St));
1060
+ }, 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));
1038
1061
  }
1039
- }), wt = Ct, Tt = /* @__PURE__ */ f({
1062
+ }), Dt = Et, Ot = /* @__PURE__ */ f({
1040
1063
  __name: "SwitchPlusEnable",
1041
1064
  props: /* @__PURE__ */ h({
1042
1065
  modelValue: { type: [
@@ -1093,7 +1116,7 @@ var Ct = /* @__PURE__ */ f({
1093
1116
  emits: ["update:value"],
1094
1117
  setup(e) {
1095
1118
  let t = F(e, "value"), n = e;
1096
- return (e, r) => (S(), i(wt, g({
1119
+ return (e, r) => (S(), i(Dt, g({
1097
1120
  value: t.value,
1098
1121
  "onUpdate:value": r[0] ||= (e) => t.value = e
1099
1122
  }, n), {
@@ -1114,5 +1137,193 @@ var Ct = /* @__PURE__ */ f({
1114
1137
  _: 1
1115
1138
  }, 16, ["value"]));
1116
1139
  }
1117
- }), Et = Tt;
1118
- export { ge as BackTop, Se as ContextMenu, Oe as ContextMenuDivider, Ee as ContextMenuGroup, we as ContextMenuItem, Ae as ContextMenuSubmenu, $ as LeftMenu, ye as LeftMenuEventDispatch, Q as LeftMenuEvents, Ke as PageHeader, dt as Result, gt as SettingDivision, yt as SettingGroup, mt as SettingItem, Pe as SplitPanel, xt as SwitchEnable, wt as SwitchPlus, Et as SwitchPlusEnable, Ie as UtoolsBaseLayout, We as UtoolsLayout, ve as WebBaseLayout, Me as WebLayout, X as getBuildCurrentClassPrefix, Y as getClassPrefix, de as isEventExist, fe as isFunction, pe as isNull, me as isUndefined };
1140
+ }), kt = Ot, At = /* @__PURE__ */ f({
1141
+ __name: "thumb",
1142
+ props: {
1143
+ data: {},
1144
+ direction: { default: "horizontal" },
1145
+ alwaysShow: {
1146
+ type: Boolean,
1147
+ default: !1
1148
+ },
1149
+ both: {
1150
+ type: Boolean,
1151
+ default: !1
1152
+ }
1153
+ },
1154
+ emits: ["scroll"],
1155
+ setup(e, { expose: t, emit: n }) {
1156
+ let i = e, a = n, c = Y("scrollbar"), l = T(), u = T(), d = r(() => i.direction === "horizontal" ? {
1157
+ size: "width",
1158
+ direction: "left",
1159
+ offset: "offsetWidth",
1160
+ client: "clientX"
1161
+ } : {
1162
+ size: "height",
1163
+ direction: "top",
1164
+ offset: "offsetHeight",
1165
+ client: "clientY"
1166
+ }), f = T(0), p = T(!1), m = T(0), h = r(() => ({
1167
+ [d.value.size]: `${i.data?.thumbSize ?? 0}px`,
1168
+ [d.value.direction]: `${f.value}px`
1169
+ })), g = (e) => {
1170
+ e.preventDefault(), u.value && (m.value = e[d.value.client] - u.value.getBoundingClientRect()[d.value.direction], p.value = !0, Z(window, "mousemove", x), Z(window, "mouseup", C), Z(window, "contextmenu", C));
1171
+ }, _ = (e) => {
1172
+ if (e.preventDefault(), u.value) {
1173
+ let t = b(e[d.value.client] > u.value.getBoundingClientRect()[d.value.direction] ? f.value + (i.data?.thumbSize ?? 0) : f.value - (i.data?.thumbSize ?? 0));
1174
+ t !== f.value && (f.value = t, a("scroll", t));
1175
+ }
1176
+ }, b = (e) => e < 0 ? 0 : i.data && e > i.data.max ? i.data.max : e, x = (e) => {
1177
+ if (l.value && u.value) {
1178
+ let t = b(e[d.value.client] - l.value.getBoundingClientRect()[d.value.direction] - m.value);
1179
+ t !== f.value && (f.value = t, a("scroll", t));
1180
+ }
1181
+ }, C = () => {
1182
+ p.value = !1, Q(window, "mousemove", x), Q(window, "mouseup", C);
1183
+ }, w = (e) => {
1184
+ p.value || (e = b(e), e !== f.value && (f.value = e));
1185
+ }, E = r(() => [
1186
+ `${c}-thumb`,
1187
+ `${c}-thumb-direction-${i.direction}`,
1188
+ { [`${c}-thumb-dragging`]: p.value }
1189
+ ]);
1190
+ return t({ setOffset: w }), (e, t) => (S(), o("div", {
1191
+ ref_key: "trackRef",
1192
+ ref: l,
1193
+ class: v([`${N(c)}-track`, `${N(c)}-track-direction-${e.direction}`]),
1194
+ onMousedown: z(_, ["self"])
1195
+ }, [s("div", {
1196
+ ref_key: "thumbRef",
1197
+ ref: u,
1198
+ class: v(E.value),
1199
+ style: y(h.value),
1200
+ onMousedown: g
1201
+ }, [s("div", { class: v(`${N(c)}-thumb-bar`) }, null, 2)], 38)], 34));
1202
+ }
1203
+ }), jt = At, Mt = /* @__PURE__ */ f({
1204
+ __name: "Scrollbar",
1205
+ props: {
1206
+ type: { default: "embed" },
1207
+ outerClass: {},
1208
+ outerStyle: { type: [
1209
+ Boolean,
1210
+ null,
1211
+ String,
1212
+ Object,
1213
+ Array
1214
+ ] },
1215
+ hide: {
1216
+ type: Boolean,
1217
+ default: !1
1218
+ },
1219
+ disableHorizontal: {
1220
+ type: Boolean,
1221
+ default: !1
1222
+ },
1223
+ disableVertical: {
1224
+ type: Boolean,
1225
+ default: !1
1226
+ }
1227
+ },
1228
+ emits: ["scroll"],
1229
+ setup(e, { expose: t, emit: n }) {
1230
+ let c = e, l = n, u = Y("scrollbar"), d = T(), f = T(), p = T(), m = T(), h = T(), _ = T(!1), C = T(!1), w = r(() => _.value && !c.disableHorizontal), E = r(() => C.value && !c.disableVertical), O = T(!1), k = null, A = () => {
1231
+ if (d.value) {
1232
+ let { clientWidth: e, clientHeight: t, offsetWidth: n, offsetHeight: r, scrollWidth: i, scrollHeight: a, scrollTop: o, scrollLeft: s } = d.value;
1233
+ _.value = i > e, C.value = a > t, O.value = w.value && E.value;
1234
+ let l = c.type === "embed" && O.value ? n - 15 : n, u = c.type === "embed" && O.value ? r - 15 : r, g = Math.round(l / Math.min(i / e, l / 20)), v = l - g, y = (i - e) / v, b = Math.round(u / Math.min(a / t, u / 20)), x = u - b, S = (a - t) / x;
1235
+ if (f.value = {
1236
+ ratio: y,
1237
+ thumbSize: g,
1238
+ max: v
1239
+ }, p.value = {
1240
+ ratio: S,
1241
+ thumbSize: b,
1242
+ max: x
1243
+ }, o > 0) {
1244
+ let e = Math.round(o / (p.value?.ratio ?? 1));
1245
+ h.value?.setOffset(e);
1246
+ }
1247
+ if (s > 0) {
1248
+ let e = Math.round(s / (f.value?.ratio ?? 1));
1249
+ m.value?.setOffset(e);
1250
+ }
1251
+ }
1252
+ }, j = () => {
1253
+ A();
1254
+ };
1255
+ b(() => {
1256
+ if (A(), d.value) {
1257
+ k = new ResizeObserver(j), k.observe(d.value);
1258
+ let e = d.value.firstElementChild;
1259
+ e && k.observe(e);
1260
+ }
1261
+ }), x(() => {
1262
+ k && (k.disconnect(), k = null);
1263
+ });
1264
+ let M = (e) => {
1265
+ if (d.value) {
1266
+ if (w.value && !c.disableHorizontal) {
1267
+ let e = Math.round(d.value.scrollLeft / (f.value?.ratio ?? 1));
1268
+ m.value?.setOffset(e);
1269
+ }
1270
+ if (E.value && !c.disableVertical) {
1271
+ let e = Math.round(d.value.scrollTop / (p.value?.ratio ?? 1));
1272
+ h.value?.setOffset(e);
1273
+ }
1274
+ }
1275
+ l("scroll", e);
1276
+ }, P = (e) => {
1277
+ d.value && d.value.scrollTo({ left: e * (f.value?.ratio ?? 1) });
1278
+ }, F = (e) => {
1279
+ d.value && d.value.scrollTo({ top: e * (p.value?.ratio ?? 1) });
1280
+ }, I = r(() => {
1281
+ let e = {};
1282
+ return c.type === "track" && (w.value && (e.paddingBottom = "15px"), E.value && (e.paddingRight = "15px")), [e, c.outerStyle];
1283
+ }), L = r(() => [
1284
+ `${u}`,
1285
+ `${u}-type-${c.type}`,
1286
+ { [`${u}-both`]: O.value },
1287
+ c.outerClass
1288
+ ]), R = (e, t) => {
1289
+ me(e) ? d.value?.scrollTo(e) : (e || t) && d.value?.scrollTo(e, t);
1290
+ }, z = (e) => {
1291
+ d.value?.scrollTo({ top: e });
1292
+ }, B = (e) => {
1293
+ d.value?.scrollTo({ left: e });
1294
+ };
1295
+ return t({
1296
+ scrollTo: R,
1297
+ scrollTop: z,
1298
+ scrollLeft: B
1299
+ }), (e, t) => (S(), o("div", {
1300
+ class: v(L.value),
1301
+ style: y(I.value)
1302
+ }, [
1303
+ s("div", g({
1304
+ ref_key: "containerRef",
1305
+ ref: d,
1306
+ class: `${N(u)}-container`
1307
+ }, e.$attrs, { onScroll: M }), [D(e.$slots, "default")], 16),
1308
+ !e.hide && w.value ? (S(), i(jt, {
1309
+ key: 0,
1310
+ ref_key: "horizontalThumbRef",
1311
+ ref: m,
1312
+ data: f.value,
1313
+ direction: "horizontal",
1314
+ both: O.value,
1315
+ onScroll: P
1316
+ }, null, 8, ["data", "both"])) : a("", !0),
1317
+ !e.hide && E.value ? (S(), i(jt, {
1318
+ key: 1,
1319
+ ref_key: "verticalThumbRef",
1320
+ ref: h,
1321
+ data: p.value,
1322
+ direction: "vertical",
1323
+ both: O.value,
1324
+ onScroll: F
1325
+ }, null, 8, ["data", "both"])) : a("", !0)
1326
+ ], 6));
1327
+ }
1328
+ }), Nt = Mt;
1329
+ export { ge as BackTop, Ce as ContextMenu, ke as ContextMenuDivider, De as ContextMenuGroup, Te as ContextMenuItem, je as ContextMenuSubmenu, 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 };