@xiaou66/u-web-ui 0.0.55 → 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.
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useLoading.d.ts +19 -0
- package/dist/hooks/useLoading.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +13 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +137 -73
- package/package.json +1 -1
|
@@ -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
package/dist/index.d.ts.map
CHANGED
|
@@ -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
|
@@ -52,10 +52,10 @@ function he(e) {
|
|
|
52
52
|
function Z(e, t, n) {
|
|
53
53
|
e.addEventListener(t, n);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ge(e, t, n) {
|
|
56
56
|
e.removeEventListener(t, n);
|
|
57
57
|
}
|
|
58
|
-
var
|
|
58
|
+
var _e = /* @__PURE__ */ f({
|
|
59
59
|
__name: "BackTop",
|
|
60
60
|
props: {
|
|
61
61
|
visibleHeight: { default: 200 },
|
|
@@ -120,7 +120,7 @@ var ge = /* @__PURE__ */ f({
|
|
|
120
120
|
_: 3
|
|
121
121
|
}));
|
|
122
122
|
}
|
|
123
|
-
}),
|
|
123
|
+
}), ve = _e, ye = /* @__PURE__ */ f({
|
|
124
124
|
__name: "WebBaseLayout",
|
|
125
125
|
setup(e) {
|
|
126
126
|
return (e, t) => {
|
|
@@ -146,14 +146,14 @@ var ge = /* @__PURE__ */ f({
|
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
}),
|
|
150
|
-
let
|
|
149
|
+
}), be = ye;
|
|
150
|
+
let xe = /* @__PURE__ */ function(e) {
|
|
151
151
|
return e.Refresh = "u:leftMenu:refresh", e;
|
|
152
152
|
}({});
|
|
153
|
-
const
|
|
154
|
-
window.dispatchEvent(new CustomEvent(
|
|
153
|
+
const Se = { refresh: () => {
|
|
154
|
+
window.dispatchEvent(new CustomEvent(xe.Refresh));
|
|
155
155
|
} };
|
|
156
|
-
var
|
|
156
|
+
var Ce = /* @__PURE__ */ f({
|
|
157
157
|
__name: "LeftMenu",
|
|
158
158
|
props: /* @__PURE__ */ h({
|
|
159
159
|
hideOperations: {
|
|
@@ -195,7 +195,7 @@ var xe = /* @__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,
|
|
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 xe = /* @__PURE__ */ f({
|
|
|
259
259
|
]);
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
}),
|
|
262
|
+
}), we = Ce, Te = /* @__PURE__ */ f({
|
|
263
263
|
__name: "ContextMenuItem",
|
|
264
264
|
props: {
|
|
265
265
|
label: {},
|
|
@@ -303,7 +303,7 @@ var xe = /* @__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
|
-
}),
|
|
306
|
+
}), Ee = Te, De = /* @__PURE__ */ f({
|
|
307
307
|
__name: "ContextMenuGroup",
|
|
308
308
|
props: { title: {} },
|
|
309
309
|
setup(e) {
|
|
@@ -313,12 +313,12 @@ var xe = /* @__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
|
-
}),
|
|
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
|
-
}),
|
|
321
|
+
}), Ae = ke, je = /* @__PURE__ */ f({
|
|
322
322
|
__name: "ContextMenuSubmenu",
|
|
323
323
|
props: {
|
|
324
324
|
label: {},
|
|
@@ -431,7 +431,7 @@ var xe = /* @__PURE__ */ f({
|
|
|
431
431
|
}, [D(e.$slots, "default")], 38)) : a("", !0)
|
|
432
432
|
], 34));
|
|
433
433
|
}
|
|
434
|
-
}),
|
|
434
|
+
}), Me = je, Ne = /* @__PURE__ */ f({
|
|
435
435
|
__name: "ContextMenu",
|
|
436
436
|
props: {
|
|
437
437
|
hideOnSelect: {
|
|
@@ -504,12 +504,12 @@ var xe = /* @__PURE__ */ f({
|
|
|
504
504
|
}, null, 34)) : a("", !0)]))
|
|
505
505
|
], 64));
|
|
506
506
|
}
|
|
507
|
-
}),
|
|
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(
|
|
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 xe = /* @__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(
|
|
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
|
-
}),
|
|
531
|
+
}), Ie = Fe, Le = /* @__PURE__ */ f({
|
|
532
532
|
__name: "SplitPanel",
|
|
533
533
|
props: {
|
|
534
534
|
component: { default: "div" },
|
|
@@ -680,7 +680,7 @@ var xe = /* @__PURE__ */ f({
|
|
|
680
680
|
_: 3
|
|
681
681
|
}, 8, ["class"]));
|
|
682
682
|
}
|
|
683
|
-
}),
|
|
683
|
+
}), Re = Le, ze = /* @__PURE__ */ f({
|
|
684
684
|
__name: "UtoolsBaseLayout",
|
|
685
685
|
setup(e) {
|
|
686
686
|
return (e, t) => {
|
|
@@ -700,12 +700,12 @@ var xe = /* @__PURE__ */ f({
|
|
|
700
700
|
});
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
}),
|
|
704
|
-
const
|
|
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
|
|
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 qe = /* @__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",
|
|
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(
|
|
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 qe = /* @__PURE__ */ f({
|
|
|
734
734
|
"onUpdate:collapsed": r[1] ||= (e) => n.value = e,
|
|
735
735
|
hideOperations: ""
|
|
736
736
|
}), {
|
|
737
|
-
logo: R(() => [s("div",
|
|
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,
|
|
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",
|
|
746
|
-
s("div",
|
|
747
|
-
D(e.$slots, "footer", {}, () => [s("div",
|
|
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
|
-
}),
|
|
753
|
+
}), Xe = Ye, Ze = /* @__PURE__ */ f({
|
|
754
754
|
__name: "PageHeader",
|
|
755
755
|
props: {
|
|
756
756
|
title: { default: "" },
|
|
@@ -787,40 +787,40 @@ var qe = /* @__PURE__ */ f({
|
|
|
787
787
|
}, [D(e.$slots, "extra")], 2)) : a("", !0)], 2);
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
}),
|
|
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
|
|
796
|
-
function
|
|
797
|
-
return S(), o("div",
|
|
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
|
|
800
|
-
const
|
|
801
|
-
function
|
|
802
|
-
return S(), o("div",
|
|
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
|
|
805
|
-
const
|
|
806
|
-
function
|
|
807
|
-
return S(), o("div",
|
|
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
|
|
810
|
-
const
|
|
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
|
-
},
|
|
813
|
+
}, pt = {
|
|
814
814
|
key: 1,
|
|
815
815
|
class: "i-p-check"
|
|
816
|
-
},
|
|
816
|
+
}, mt = {
|
|
817
817
|
key: 2,
|
|
818
818
|
class: "i-p-info w-12 h-12"
|
|
819
|
-
},
|
|
819
|
+
}, ht = {
|
|
820
820
|
key: 3,
|
|
821
821
|
class: "i-p-close"
|
|
822
822
|
};
|
|
823
|
-
var
|
|
823
|
+
var gt = /* @__PURE__ */ f({
|
|
824
824
|
__name: "Result",
|
|
825
825
|
props: {
|
|
826
826
|
status: { default: "info" },
|
|
@@ -844,7 +844,7 @@ var mt = /* @__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",
|
|
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 mt = /* @__PURE__ */ f({
|
|
|
863
863
|
}, [D(e.$slots, "default")], 2)) : a("", !0)
|
|
864
864
|
], 2));
|
|
865
865
|
}
|
|
866
|
-
}),
|
|
867
|
-
const
|
|
868
|
-
var
|
|
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 _t = /* @__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",
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
894
|
-
const
|
|
895
|
-
var
|
|
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",
|
|
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
|
-
}),
|
|
901
|
+
}), Tt = wt, Et = /* @__PURE__ */ f({
|
|
902
902
|
name: "SwitchEnable",
|
|
903
903
|
inheritAttrs: !1,
|
|
904
904
|
__name: "SwitchEnable",
|
|
@@ -945,9 +945,9 @@ var St = /* @__PURE__ */ f({
|
|
|
945
945
|
}), null, 16, ["class", "modelValue"]);
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
|
-
}),
|
|
949
|
-
const
|
|
950
|
-
var
|
|
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({
|
|
@@ -1071,9 +1071,9 @@ var Dt = /* @__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,
|
|
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
|
-
}),
|
|
1076
|
+
}), At = kt, jt = /* @__PURE__ */ f({
|
|
1077
1077
|
__name: "SwitchPlusEnable",
|
|
1078
1078
|
props: /* @__PURE__ */ h({
|
|
1079
1079
|
modelValue: { type: [
|
|
@@ -1130,7 +1130,7 @@ var Dt = /* @__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(
|
|
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 Dt = /* @__PURE__ */ f({
|
|
|
1151
1151
|
_: 1
|
|
1152
1152
|
}, 16, ["value"]));
|
|
1153
1153
|
}
|
|
1154
|
-
}),
|
|
1154
|
+
}), Mt = jt, Nt = /* @__PURE__ */ f({
|
|
1155
1155
|
__name: "thumb",
|
|
1156
1156
|
props: {
|
|
1157
1157
|
data: {},
|
|
@@ -1193,7 +1193,7 @@ var Dt = /* @__PURE__ */ f({
|
|
|
1193
1193
|
t !== f.value && (f.value = t, a("scroll", t));
|
|
1194
1194
|
}
|
|
1195
1195
|
}, C = () => {
|
|
1196
|
-
p.value = !1,
|
|
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 Dt = /* @__PURE__ */ f({
|
|
|
1214
1214
|
onMousedown: g
|
|
1215
1215
|
}, [s("div", { class: v(`${N(c)}-thumb-bar`) }, null, 2)], 38)], 34));
|
|
1216
1216
|
}
|
|
1217
|
-
}),
|
|
1217
|
+
}), Pt = Nt, Ft = /* @__PURE__ */ f({
|
|
1218
1218
|
__name: "Scrollbar",
|
|
1219
1219
|
props: {
|
|
1220
1220
|
type: { default: "embed" },
|
|
@@ -1319,7 +1319,7 @@ var Dt = /* @__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(
|
|
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 Dt = /* @__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(
|
|
1331
|
+
!e.hide && E.value ? (S(), i(Pt, {
|
|
1332
1332
|
key: 1,
|
|
1333
1333
|
ref_key: "verticalThumbRef",
|
|
1334
1334
|
ref: h,
|
|
@@ -1339,7 +1339,7 @@ var Dt = /* @__PURE__ */ f({
|
|
|
1339
1339
|
}, null, 8, ["data", "both"])) : a("", !0)
|
|
1340
1340
|
], 6));
|
|
1341
1341
|
}
|
|
1342
|
-
}),
|
|
1342
|
+
}), It = Ft, Lt = /* @__PURE__ */ f({
|
|
1343
1343
|
__name: "LazyLoader",
|
|
1344
1344
|
props: {
|
|
1345
1345
|
w: { default: "100%" },
|
|
@@ -1363,5 +1363,69 @@ var Dt = /* @__PURE__ */ f({
|
|
|
1363
1363
|
})
|
|
1364
1364
|
}, null, 4));
|
|
1365
1365
|
}
|
|
1366
|
-
}),
|
|
1367
|
-
|
|
1366
|
+
}), Rt = Lt;
|
|
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 };
|