@ithinkdt/ui 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components-BXPJvdEe.js → components-BOgApmgo.js} +459 -459
- package/dist/components.js +2 -2
- package/dist/directives-pSAvXd5F.js +240 -0
- package/dist/directives.js +2 -2
- package/dist/index.js +270 -270
- package/dist/page.js +194 -194
- package/dist/use-i18n-Cmb7Xx7d.js +6 -0
- package/dist/use-style.js +29 -2
- package/esm/design.d.ts +4 -4
- package/esm/page.d.ts +2 -0
- package/package.json +9 -9
- package/dist/directives-pc2Vi93X.js +0 -240
- package/dist/use-i18n-D-AJ8KbA.js +0 -6
- package/dist/use-style-BGq0HdRK.js +0 -29
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { Fragment, computed, createVNode, defineComponent, inject, isVNode, mergeProps, provide, reactive, ref, renderSlot, shallowRef, toRef, toValue, unref, useTemplateRef, watch, withDirectives } from "vue";
|
|
5
|
-
import { computedAsync, promiseTimeout, useElementHover, useElementSize, useEventListener, useFullscreen, watchDebounced } from "@vueuse/core";
|
|
6
|
-
import { NAvatar, NBadge, NBreadcrumb, NBreadcrumbItem, NButton, NDrawer, NDrawerContent, NDropdown, NEmpty, NIcon, NList, NListItem, NMenu, NPagination, NPopover, NScrollbar, NText, NThing, useThemeVars } from "ithinkdt-ui";
|
|
7
|
-
import { useAtomicBroadcast } from "@ithinkdt/common/composables";
|
|
8
|
-
import { RouterLink, useRouter } from "vue-router";
|
|
9
|
-
import { walkTree } from "@ithinkdt/common/tree";
|
|
10
|
-
import { getOpaqueColor } from "@ithinkdt/common/color";
|
|
11
|
-
import { format } from "date-fns";
|
|
12
|
-
function
|
|
13
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1
|
+
import { n as e, t } from "./use-i18n-Cmb7Xx7d.js";
|
|
2
|
+
import n, { c as r, cB as i, cE as a, cM as o } from "./use-style.js";
|
|
3
|
+
import { i as s, n as c, r as l, t as u } from "./directives-pSAvXd5F.js";
|
|
4
|
+
import { Fragment as d, computed as f, createVNode as p, defineComponent as m, inject as h, isVNode as g, mergeProps as _, provide as v, reactive as y, ref as b, renderSlot as x, shallowRef as ee, toRef as S, toValue as C, unref as w, useTemplateRef as T, watch as E, withDirectives as D } from "vue";
|
|
5
|
+
import { computedAsync as te, promiseTimeout as O, useElementHover as k, useElementSize as ne, useEventListener as re, useFullscreen as ie, watchDebounced as ae } from "@vueuse/core";
|
|
6
|
+
import { NAvatar as A, NBadge as oe, NBreadcrumb as se, NBreadcrumbItem as ce, NButton as j, NDrawer as le, NDrawerContent as M, NDropdown as N, NEmpty as P, NIcon as F, NList as I, NListItem as L, NMenu as R, NPagination as z, NPopover as B, NScrollbar as V, NText as H, NThing as U, useThemeVars as W } from "ithinkdt-ui";
|
|
7
|
+
import { useAtomicBroadcast as ue } from "@ithinkdt/common/composables";
|
|
8
|
+
import { RouterLink as de, useRouter as G } from "vue-router";
|
|
9
|
+
import { walkTree as fe } from "@ithinkdt/common/tree";
|
|
10
|
+
import { getOpaqueColor as pe } from "@ithinkdt/common/color";
|
|
11
|
+
import { format as me } from "date-fns";
|
|
12
|
+
function K(e) {
|
|
13
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const he = /* @__PURE__ */ m({
|
|
16
16
|
name: "AppAccount",
|
|
17
17
|
props: {
|
|
18
18
|
username: String,
|
|
@@ -29,29 +29,29 @@ const AppAccount = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
},
|
|
30
30
|
emit: ["logout", "change-pwd"],
|
|
31
31
|
setup(t, { emit: n, slots: r }) {
|
|
32
|
-
let i =
|
|
32
|
+
let i = f(() => /^[\u4E00-\u9FA5]+$/.test(t.nickname) ? t.nickname?.slice(t.nickname?.length > 3 ? 2 : 1) : t.nickname?.split(" ")[0]), { t: a } = e(), o = p(F, { size: "28" }, { default: () => [p("svg", {
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
34
|
width: "1em",
|
|
35
35
|
height: "1em",
|
|
36
36
|
viewBox: "-4 -4 32 32"
|
|
37
|
-
}, [
|
|
37
|
+
}, [p("path", {
|
|
38
38
|
fill: "currentColor",
|
|
39
39
|
d: "M12 12q-1.65 0-2.825-1.175T8 8t1.175-2.825T12 4t2.825 1.175T16 8t-1.175 2.825T12 12m-8 6v-.8q0-.85.438-1.562T5.6 14.55q1.55-.775 3.15-1.162T12 13t3.25.388t3.15 1.162q.725.375 1.163 1.088T20 17.2v.8q0 .825-.587 1.413T18 20H6q-.825 0-1.412-.587T4 18"
|
|
40
|
-
}, null)])] }),
|
|
40
|
+
}, null)])] }), c = p("svg", {
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
width: "1em",
|
|
43
43
|
height: "1em",
|
|
44
44
|
viewBox: "0 0 24 24"
|
|
45
|
-
}, [
|
|
45
|
+
}, [p("path", {
|
|
46
46
|
fill: "currentColor",
|
|
47
47
|
d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2a9.99 9.99 0 0 1 8 4h-2.71a8 8 0 1 0 .001 12h2.71A9.99 9.99 0 0 1 12 22m7-6v-3h-8v-2h8V8l5 4z"
|
|
48
48
|
}, null)]);
|
|
49
|
-
return () =>
|
|
50
|
-
|
|
51
|
-
trigger: () =>
|
|
49
|
+
return () => p("div", { style: "display: flex; align-items: center" }, [
|
|
50
|
+
p(B, { style: "padding: 4px" }, {
|
|
51
|
+
trigger: () => p(j, {
|
|
52
52
|
quaternary: !0,
|
|
53
53
|
style: "--n-padding: 0 12px"
|
|
54
|
-
}, { default: () => [
|
|
54
|
+
}, { default: () => [p("div", { style: "display: flex; align-items: center; gap: 8px" }, [p(A, {
|
|
55
55
|
key: t.head ? "head" : "no-head",
|
|
56
56
|
src: t.head,
|
|
57
57
|
round: !0,
|
|
@@ -62,40 +62,40 @@ const AppAccount = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
fallback: () => o,
|
|
63
63
|
placeholder: () => o,
|
|
64
64
|
default: t.head ? void 0 : () => i.value
|
|
65
|
-
}),
|
|
65
|
+
}), p("span", { style: "font-size: 14px" }, [t.username ?? ""])])] }),
|
|
66
66
|
default: () => {
|
|
67
|
-
let e = () => t.showChangePwd ?
|
|
67
|
+
let e = () => t.showChangePwd ? p(j, {
|
|
68
68
|
quaternary: !0,
|
|
69
69
|
style: "justify-content: left",
|
|
70
70
|
onClick: () => n("change-pwd")
|
|
71
71
|
}, {
|
|
72
|
-
icon: () =>
|
|
72
|
+
icon: () => p(F, null, { default: () => [p("svg", {
|
|
73
73
|
xmlns: "http://www.w3.org/2000/svg",
|
|
74
74
|
width: "1em",
|
|
75
75
|
height: "1em",
|
|
76
76
|
viewBox: "0 0 32 32"
|
|
77
|
-
}, [
|
|
77
|
+
}, [p("path", {
|
|
78
78
|
fill: "currentColor",
|
|
79
79
|
d: "M21 2a8.998 8.998 0 0 0-8.612 11.612L2 24v6h6l10.388-10.388A9 9 0 1 0 21 2m0 16a7 7 0 0 1-2.032-.302l-1.147-.348l-.847.847l-3.181 3.181L12.414 20L11 21.414l1.379 1.379l-1.586 1.586L9.414 23L8 24.414l1.379 1.379L7.172 28H4v-3.172l9.802-9.802l.848-.847l-.348-1.147A7 7 0 1 1 21 18"
|
|
80
|
-
}, null),
|
|
80
|
+
}, null), p("circle", {
|
|
81
81
|
cx: "22",
|
|
82
82
|
cy: "10",
|
|
83
83
|
r: "2",
|
|
84
84
|
fill: "currentColor"
|
|
85
85
|
}, null)])] }),
|
|
86
86
|
default: () => a("common.account.changePwd")
|
|
87
|
-
}) : void 0, i = () => t.showLogoutButton ? void 0 :
|
|
87
|
+
}) : void 0, i = () => t.showLogoutButton ? void 0 : p(j, {
|
|
88
88
|
quaternary: !0,
|
|
89
89
|
style: "justify-content: left",
|
|
90
90
|
onClick: () => n("logout")
|
|
91
91
|
}, {
|
|
92
|
-
icon: () =>
|
|
92
|
+
icon: () => p(F, null, K(c) ? c : { default: () => [c] }),
|
|
93
93
|
default: () => a("common.account.logout")
|
|
94
94
|
});
|
|
95
95
|
return r.dropdown ? r.dropdown({
|
|
96
96
|
pwd: e,
|
|
97
97
|
logout: i
|
|
98
|
-
}) :
|
|
98
|
+
}) : p("div", { style: "display: flex; flex-direction: column" }, [
|
|
99
99
|
e(),
|
|
100
100
|
r.dropdownExtra?.(),
|
|
101
101
|
i()
|
|
@@ -103,82 +103,82 @@ const AppAccount = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
}
|
|
104
104
|
}),
|
|
105
105
|
r.extra?.(),
|
|
106
|
-
t.showLogoutButton ?
|
|
106
|
+
t.showLogoutButton ? D(p(j, {
|
|
107
107
|
quaternary: !0,
|
|
108
108
|
style: "--n-padding: 0 12px",
|
|
109
109
|
onClick: () => t.username && n("logout")
|
|
110
|
-
}, { default: () => [r.logoutButton?.() ??
|
|
111
|
-
|
|
110
|
+
}, { default: () => [r.logoutButton?.() ?? p(F, { size: "16" }, K(c) ? c : { default: () => [c] })] }), [[
|
|
111
|
+
s,
|
|
112
112
|
a("common.account.logout"),
|
|
113
113
|
void 0,
|
|
114
114
|
{ "bottom-end": !0 }
|
|
115
115
|
]]) : void 0
|
|
116
116
|
]);
|
|
117
117
|
}
|
|
118
|
-
}),
|
|
118
|
+
}), ge = /* @__PURE__ */ m({
|
|
119
119
|
name: "AppAppearance",
|
|
120
120
|
props: { mode: String },
|
|
121
121
|
emit: ["update:mode"],
|
|
122
122
|
setup(t, { emit: n }) {
|
|
123
|
-
let { t: r } =
|
|
124
|
-
return () =>
|
|
123
|
+
let { t: r } = e();
|
|
124
|
+
return () => D(p(j, {
|
|
125
125
|
quaternary: !0,
|
|
126
126
|
style: "--n-padding: 0 12px",
|
|
127
127
|
onClick: () => {
|
|
128
128
|
n("update:mode", t.mode === "light" ? "dark" : t.mode === "dark" ? "auto" : "light");
|
|
129
129
|
}
|
|
130
|
-
}, { default: () => [
|
|
130
|
+
}, { default: () => [p(F, { size: "18" }, { default: () => [t.mode === "light" ? p("svg", {
|
|
131
131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
132
132
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
133
133
|
role: "img",
|
|
134
134
|
width: "1em",
|
|
135
135
|
height: "1em",
|
|
136
136
|
viewBox: "0 0 24 24"
|
|
137
|
-
}, [
|
|
137
|
+
}, [p("path", {
|
|
138
138
|
fill: "currentColor",
|
|
139
139
|
d: "M12 15q1.25 0 2.125-.875T15 12q0-1.25-.875-2.125T12 9q-1.25 0-2.125.875T9 12q0 1.25.875 2.125T12 15Zm0 2q-2.075 0-3.537-1.463Q7 14.075 7 12t1.463-3.538Q9.925 7 12 7t3.538 1.462Q17 9.925 17 12q0 2.075-1.462 3.537Q14.075 17 12 17ZM1 13v-2h4v2Zm18 0v-2h4v2Zm-8-8V1h2v4Zm0 18v-4h2v4ZM6.35 7.75L3.875 5.275l1.4-1.4L7.75 6.35Zm12.375 12.375L16.25 17.65l1.4-1.4l2.475 2.475ZM17.65 7.75l-1.4-1.4l2.475-2.475l1.4 1.4ZM5.275 20.125l-1.4-1.4L6.35 16.25l1.4 1.4ZM12 12Z"
|
|
140
|
-
}, null)]) : t.mode === "dark" ?
|
|
140
|
+
}, null)]) : t.mode === "dark" ? p("svg", {
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
142
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
143
143
|
role: "img",
|
|
144
144
|
width: "1em",
|
|
145
145
|
height: "1em",
|
|
146
146
|
viewBox: "0 0 24 24"
|
|
147
|
-
}, [
|
|
147
|
+
}, [p("path", {
|
|
148
148
|
fill: "currentColor",
|
|
149
149
|
d: "M12 21q-3.75 0-6.375-2.625T3 12q0-3.75 2.625-6.375T12 3q.35 0 .688.025q.337.025.662.075q-1.025.725-1.637 1.887Q11.1 6.15 11.1 7.5q0 2.25 1.575 3.825Q14.25 12.9 16.5 12.9q1.375 0 2.525-.613q1.15-.612 1.875-1.637q.05.325.075.662Q21 11.65 21 12q0 3.75-2.625 6.375T12 21Zm0-2q2.2 0 3.95-1.212q1.75-1.213 2.55-3.163q-.5.125-1 .2q-.5.075-1 .075q-3.075 0-5.238-2.162Q9.1 10.575 9.1 7.5q0-.5.075-1t.2-1q-1.95.8-3.162 2.55Q5 9.8 5 12q0 2.9 2.05 4.95Q9.1 19 12 19Zm-.25-6.75Z"
|
|
150
|
-
}, null)]) :
|
|
150
|
+
}, null)]) : p("svg", {
|
|
151
151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
152
152
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
153
153
|
role: "img",
|
|
154
154
|
width: "1em",
|
|
155
155
|
height: "1em",
|
|
156
156
|
viewBox: "0 0 24 24"
|
|
157
|
-
}, [
|
|
157
|
+
}, [p("path", {
|
|
158
158
|
fill: "currentColor",
|
|
159
159
|
d: "M11 19q1.35 0 2.513-.538q1.162-.537 1.987-1.487q-3.15-.2-5.325-2.488Q8 12.2 8 9q0-.325.025-.638q.025-.312.075-.612q-1.4.775-2.25 2.162Q5 11.3 5 13q0 2.5 1.75 4.25T11 19Zm0 2q-3.35 0-5.675-2.325Q3 16.35 3 13q0-3.35 2.325-5.675Q7.65 5 11 5q.125 0 .25.012q.125.013.25.013q-.725.8-1.113 1.812Q10 7.85 10 9q0 2.5 1.75 4.25T16 15q.8 0 1.525-.2q.725-.2 1.375-.55q-.45 2.875-2.662 4.812Q14.025 21 11 21Zm2.8-10L17 2h2l3.2 9h-1.9l-.7-2h-3.2l-.7 2Zm3.05-3.35h2.3L18 4Z"
|
|
160
160
|
}, null)])] })] }), [[
|
|
161
|
-
|
|
161
|
+
s,
|
|
162
162
|
t.mode === "light" ? r("common.layout.mode.light") : t.mode === "dark" ? r("common.layout.mode.dark") : r("common.layout.mode.auto"),
|
|
163
163
|
void 0,
|
|
164
164
|
{ bottom: !0 }
|
|
165
165
|
]]);
|
|
166
166
|
}
|
|
167
|
-
}),
|
|
167
|
+
}), q = "APP_SIDER_COLLAPSED", J = () => p("svg", {
|
|
168
168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
169
169
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
170
170
|
role: "img",
|
|
171
171
|
width: "1em",
|
|
172
172
|
height: "1em",
|
|
173
173
|
viewBox: "0 0 24 24"
|
|
174
|
-
}, [
|
|
174
|
+
}, [p("path", {
|
|
175
175
|
fill: "currentColor",
|
|
176
176
|
d: "m17 18l-5-2.18L7 18V5h10m0-2H7a2 2 0 0 0-2 2v16l7-3l7 3V5a2 2 0 0 0-2-2Z"
|
|
177
|
-
}, null)]),
|
|
178
|
-
function
|
|
179
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
177
|
+
}, null)]), Y = "__APP_CTX__", X = () => h(Y);
|
|
178
|
+
function _e(e) {
|
|
179
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const ve = /* @__PURE__ */ m({
|
|
182
182
|
name: "AppBreadcrumb",
|
|
183
183
|
props: {
|
|
184
184
|
items: {
|
|
@@ -191,52 +191,52 @@ const AppBreadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
193
|
setup(e) {
|
|
194
|
-
let t =
|
|
195
|
-
return
|
|
196
|
-
|
|
197
|
-
t.icon && (typeof t.icon == "string" ? (t[n] = e.getIcon?.(t.icon), t[r] = () => t[n]?.() ||
|
|
194
|
+
let t = G(), n = Symbol(), r = Symbol();
|
|
195
|
+
return E(() => e.items, (t) => {
|
|
196
|
+
fe(t, (t) => {
|
|
197
|
+
t.icon && (typeof t.icon == "string" ? (t[n] = e.getIcon?.(t.icon), t[r] = () => t[n]?.() || J()) : t[r] = t.icon);
|
|
198
198
|
});
|
|
199
199
|
}, { immediate: !0 }), () => {
|
|
200
200
|
let n;
|
|
201
|
-
return
|
|
201
|
+
return p(se, null, _e(n = e.items.map((e) => p(ce, {
|
|
202
202
|
clickable: e.href?.length > 0,
|
|
203
203
|
separator: e.separator,
|
|
204
204
|
onClick: e.href && ((n) => {
|
|
205
205
|
n.stopPropagation(), t.push(e.href);
|
|
206
206
|
})
|
|
207
|
-
}, { default: () => [e.icon ?
|
|
207
|
+
}, { default: () => [e.icon ? p(d, null, [p(F, { component: e[r] }, null), " "]) : void 0, C(e.title)] }))) ? n : { default: () => [n] });
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), ye = /* @__PURE__ */ m({
|
|
211
211
|
name: "AppFullscreen",
|
|
212
212
|
props: {},
|
|
213
213
|
emit: ["change"],
|
|
214
214
|
setup(t, { emit: n }) {
|
|
215
|
-
let { t: r } =
|
|
216
|
-
return () =>
|
|
215
|
+
let { t: r } = e(), { isFullscreen: i, toggle: a } = ie();
|
|
216
|
+
return () => D(p(j, {
|
|
217
217
|
quaternary: !0,
|
|
218
218
|
style: "--n-padding: 0 12px",
|
|
219
219
|
onClick: () => {
|
|
220
220
|
a(), n("change", i.value);
|
|
221
221
|
}
|
|
222
|
-
}, { default: () => [
|
|
222
|
+
}, { default: () => [p(F, { size: "18" }, { default: () => [i.value ? p("svg", {
|
|
223
223
|
xmlns: "http://www.w3.org/2000/svg",
|
|
224
224
|
width: "1em",
|
|
225
225
|
height: "1em",
|
|
226
226
|
viewBox: "0 0 24 24"
|
|
227
|
-
}, [
|
|
227
|
+
}, [p("path", {
|
|
228
228
|
fill: "none",
|
|
229
229
|
stroke: "currentColor",
|
|
230
230
|
"stroke-linecap": "round",
|
|
231
231
|
"stroke-linejoin": "round",
|
|
232
232
|
"stroke-width": "1.5",
|
|
233
233
|
d: "M8.345 3.75v2.095a2.5 2.5 0 0 1-2.5 2.5H3.75M8.345 20.25v-2.095a2.5 2.5 0 0 0-2.5-2.5H3.75M15.655 3.75v2.095a2.5 2.5 0 0 0 2.5 2.5h2.095M15.655 20.25v-2.095a2.5 2.5 0 0 1 2.5-2.5h2.095"
|
|
234
|
-
}, null)]) :
|
|
234
|
+
}, null)]) : p("svg", {
|
|
235
235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
236
236
|
width: "1em",
|
|
237
237
|
height: "1em",
|
|
238
238
|
viewBox: "0 0 24 24"
|
|
239
|
-
}, [
|
|
239
|
+
}, [p("path", {
|
|
240
240
|
fill: "none",
|
|
241
241
|
stroke: "currentColor",
|
|
242
242
|
"stroke-linecap": "round",
|
|
@@ -244,13 +244,13 @@ const AppBreadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
244
244
|
"stroke-width": "1.5",
|
|
245
245
|
d: "M3.75 8.345V6.25a2.5 2.5 0 0 1 2.5-2.5h2.095M3.75 15.655v2.095a2.5 2.5 0 0 0 2.5 2.5h2.095M20.25 8.345V6.25a2.5 2.5 0 0 0-2.5-2.5h-2.095m4.595 11.905v2.095a2.5 2.5 0 0 1-2.5 2.5h-2.095"
|
|
246
246
|
}, null)])] })] }), [[
|
|
247
|
-
|
|
247
|
+
s,
|
|
248
248
|
i.value ? r("common.layout.screen.exitfull") : r("common.layout.screen.full"),
|
|
249
249
|
void 0,
|
|
250
250
|
{ bottom: !0 }
|
|
251
251
|
]]);
|
|
252
252
|
}
|
|
253
|
-
}),
|
|
253
|
+
}), be = /* @__PURE__ */ m({
|
|
254
254
|
name: "AppLanguage",
|
|
255
255
|
props: {
|
|
256
256
|
lang: String,
|
|
@@ -258,32 +258,32 @@ const AppBreadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
258
258
|
},
|
|
259
259
|
emit: ["update:lang"],
|
|
260
260
|
setup(e, { emit: t }) {
|
|
261
|
-
return () =>
|
|
261
|
+
return () => p(N, {
|
|
262
262
|
options: e.supports,
|
|
263
263
|
keyField: "value",
|
|
264
264
|
showArrow: !0,
|
|
265
265
|
onSelect: (e) => t("update:lang", e)
|
|
266
|
-
}, { default: () => [
|
|
266
|
+
}, { default: () => [p(j, {
|
|
267
267
|
quaternary: !0,
|
|
268
268
|
style: "--n-padding: 0 12px"
|
|
269
|
-
}, { default: () => [
|
|
269
|
+
}, { default: () => [p(F, { size: "18" }, { default: () => [p("svg", {
|
|
270
270
|
xmlns: "http://www.w3.org/2000/svg",
|
|
271
271
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
272
272
|
role: "img",
|
|
273
273
|
width: "1em",
|
|
274
274
|
height: "1em",
|
|
275
275
|
viewBox: "0 0 24 24"
|
|
276
|
-
}, [
|
|
276
|
+
}, [p("g", {
|
|
277
277
|
fill: "none",
|
|
278
278
|
stroke: "currentColor",
|
|
279
279
|
"stroke-linecap": "round",
|
|
280
280
|
"stroke-linejoin": "round",
|
|
281
281
|
"stroke-width": "1.5"
|
|
282
|
-
}, [
|
|
282
|
+
}, [p("path", { d: "M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2S2 6.477 2 12Z" }, null), p("path", { d: "M13 2.05S16 6 16 12c0 6-3 9.95-3 9.95m-2 0S8 18 8 12c0-6 3-9.95 3-9.95M2.63 15.5h18.74m-18.74-7h18.74" }, null)])])] })] })] });
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
|
-
var
|
|
286
|
-
|
|
285
|
+
var xe = /* @__PURE__ */ r([
|
|
286
|
+
i("layout", {
|
|
287
287
|
display: "grid",
|
|
288
288
|
gridTemplateAreas: "\n 'sider header'\n 'sider content'\n 'sider footer'\n ",
|
|
289
289
|
gridTemplateRows: "auto 1fr auto",
|
|
@@ -293,19 +293,19 @@ var style = /* @__PURE__ */ c([
|
|
|
293
293
|
left: "0",
|
|
294
294
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
295
295
|
"--app-content-height": "calc(100vh - var(--app-header-height) - var(--app-footer-height))"
|
|
296
|
-
}, [
|
|
296
|
+
}, [o("full-header", { gridTemplateAreas: "\n 'header header'\n 'sider content'\n 'sider footer'\n " }), o("full-content", {
|
|
297
297
|
width: "calc(100% + var(--app-sider-width))",
|
|
298
298
|
height: "calc(100% + var(--app-header-height))",
|
|
299
299
|
left: "calc(-1 * var(--app-sider-width))",
|
|
300
300
|
top: "calc(-1 * var(--app-header-height))"
|
|
301
301
|
})]),
|
|
302
|
-
|
|
302
|
+
i("header", {
|
|
303
303
|
gridArea: "header",
|
|
304
304
|
overflow: "hidden",
|
|
305
305
|
zIndex: 2,
|
|
306
306
|
height: "var(--app-header-height, 44px)"
|
|
307
307
|
}),
|
|
308
|
-
|
|
308
|
+
i("sider", {
|
|
309
309
|
gridArea: "sider",
|
|
310
310
|
width: "var(--app-sider-width, 220px)",
|
|
311
311
|
display: "flex",
|
|
@@ -314,31 +314,31 @@ var style = /* @__PURE__ */ c([
|
|
|
314
314
|
position: "relative",
|
|
315
315
|
transition: "width 0.2s ease-in-out",
|
|
316
316
|
zIndex: "2"
|
|
317
|
-
}, [
|
|
317
|
+
}, [a("collapse-btn", {
|
|
318
318
|
"--n-padding": "0 12px",
|
|
319
319
|
position: "absolute",
|
|
320
320
|
zIndex: "2",
|
|
321
321
|
bottom: "8px",
|
|
322
322
|
right: "8px"
|
|
323
323
|
})]),
|
|
324
|
-
|
|
324
|
+
i("content", {
|
|
325
325
|
gridArea: "content",
|
|
326
326
|
position: "relative",
|
|
327
327
|
overflow: "hidden",
|
|
328
328
|
zIndex: "1"
|
|
329
329
|
}),
|
|
330
|
-
|
|
330
|
+
i("footer", {
|
|
331
331
|
gridArea: "footer",
|
|
332
332
|
lineHeight: "32px",
|
|
333
333
|
textAlign: "center",
|
|
334
334
|
color: "gray"
|
|
335
335
|
})
|
|
336
|
-
]),
|
|
336
|
+
]), Se = () => p("svg", {
|
|
337
337
|
xmlns: "http://www.w3.org/2000/svg",
|
|
338
338
|
width: "1em",
|
|
339
339
|
height: "1em",
|
|
340
340
|
viewBox: "0 0 24 24"
|
|
341
|
-
}, [
|
|
341
|
+
}, [p("path", {
|
|
342
342
|
fill: "none",
|
|
343
343
|
stroke: "currentColor",
|
|
344
344
|
"stroke-linecap": "round",
|
|
@@ -346,12 +346,12 @@ var style = /* @__PURE__ */ c([
|
|
|
346
346
|
"stroke-width": "1.5",
|
|
347
347
|
d: "M11.5 18s-6-4.419-6-6s6-6 6-6m7 12s-6-4.419-6-6s6-6 6-6",
|
|
348
348
|
color: "currentColor"
|
|
349
|
-
}, null)]),
|
|
349
|
+
}, null)]), Ce = () => p("svg", {
|
|
350
350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
351
351
|
width: "1em",
|
|
352
352
|
height: "1em",
|
|
353
353
|
viewBox: "0 0 24 24"
|
|
354
|
-
}, [
|
|
354
|
+
}, [p("path", {
|
|
355
355
|
fill: "none",
|
|
356
356
|
stroke: "currentColor",
|
|
357
357
|
"stroke-linecap": "round",
|
|
@@ -360,7 +360,7 @@ var style = /* @__PURE__ */ c([
|
|
|
360
360
|
d: "M12.5 18s6-4.419 6-6s-6-6-6-6m-7 12s6-4.419 6-6s-6-6-6-6",
|
|
361
361
|
color: "currentColor"
|
|
362
362
|
}, null)]);
|
|
363
|
-
const
|
|
363
|
+
const we = /* @__PURE__ */ m({
|
|
364
364
|
name: "AppLayout",
|
|
365
365
|
props: {
|
|
366
366
|
layout: {
|
|
@@ -370,16 +370,16 @@ const AppLayout = /* @__PURE__ */ defineComponent({
|
|
|
370
370
|
fullContent: Boolean
|
|
371
371
|
},
|
|
372
372
|
setup(e, { slots: t }) {
|
|
373
|
-
|
|
374
|
-
let r =
|
|
373
|
+
n("-layout", xe, b("app"), !1);
|
|
374
|
+
let r = y({
|
|
375
375
|
siderWidth: "0px",
|
|
376
376
|
headerHeight: "0px",
|
|
377
377
|
footerHeight: "0px",
|
|
378
378
|
hasMultiTab: !1
|
|
379
379
|
});
|
|
380
|
-
return
|
|
380
|
+
return v(Y, r), () => {
|
|
381
381
|
let { layout: n } = e;
|
|
382
|
-
return
|
|
382
|
+
return p("div", {
|
|
383
383
|
class: {
|
|
384
384
|
"app-layout": !0,
|
|
385
385
|
"app-layout--full-header": n === "top2bottom",
|
|
@@ -390,20 +390,20 @@ const AppLayout = /* @__PURE__ */ defineComponent({
|
|
|
390
390
|
"--app-header-height": r.headerHeight,
|
|
391
391
|
"--app-footer-height": r.footerHeight
|
|
392
392
|
}
|
|
393
|
-
}, [
|
|
393
|
+
}, [x(t, "default")]);
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
}),
|
|
396
|
+
}), Te = /* @__PURE__ */ m({
|
|
397
397
|
name: "AppHeader",
|
|
398
398
|
props: { height: {
|
|
399
399
|
type: Number,
|
|
400
400
|
default: 44
|
|
401
401
|
} },
|
|
402
402
|
setup(e, { slots: t }) {
|
|
403
|
-
let n =
|
|
404
|
-
return () => (n.headerHeight = e.height + "px",
|
|
403
|
+
let n = X();
|
|
404
|
+
return () => (n.headerHeight = e.height + "px", p("div", { class: "app-header" }, [x(t, "default")]));
|
|
405
405
|
}
|
|
406
|
-
}),
|
|
406
|
+
}), Ee = /* @__PURE__ */ m({
|
|
407
407
|
name: "AppSidebar",
|
|
408
408
|
props: {
|
|
409
409
|
showCollapseBtn: {
|
|
@@ -422,36 +422,36 @@ const AppLayout = /* @__PURE__ */ defineComponent({
|
|
|
422
422
|
},
|
|
423
423
|
emits: { "update:collapsed": () => !0 },
|
|
424
424
|
setup(t, { emit: n, slots: r }) {
|
|
425
|
-
|
|
426
|
-
let { t: i } =
|
|
427
|
-
return () => (a.siderWidth = (t.collapsed ? t.collapsedWidth : t.width) + "px",
|
|
425
|
+
v(q, S(t, "collapsed"));
|
|
426
|
+
let { t: i } = e(), a = X();
|
|
427
|
+
return () => (a.siderWidth = (t.collapsed ? t.collapsedWidth : t.width) + "px", p("div", { class: "app-sider" }, [x(r, "default"), t.showCollapseBtn ? D(p(j, {
|
|
428
428
|
class: "app-sider__collapse-btn",
|
|
429
429
|
quaternary: !0,
|
|
430
430
|
onClick: () => {
|
|
431
431
|
n("update:collapsed", !t.collapsed);
|
|
432
432
|
}
|
|
433
|
-
}, { default: () => [
|
|
433
|
+
}, { default: () => [p(F, { size: "20" }, { default: () => [t.collapsed ? p(Ce, null, null) : p(Se, null, null)] })] }), [[s, t.collapsed ? i("common.layout.sider.expand") : i("common.layout.sider.collapse")]]) : void 0]));
|
|
434
434
|
}
|
|
435
|
-
}),
|
|
435
|
+
}), De = /* @__PURE__ */ m({
|
|
436
436
|
name: "AppContent",
|
|
437
437
|
setup(e, { slots: t }) {
|
|
438
|
-
return () =>
|
|
438
|
+
return () => p("div", { class: "app-content" }, [x(t, "default")]);
|
|
439
439
|
}
|
|
440
|
-
}),
|
|
440
|
+
}), Oe = /* @__PURE__ */ m({
|
|
441
441
|
name: "AppFooter",
|
|
442
442
|
props: { height: {
|
|
443
443
|
type: Number,
|
|
444
444
|
default: 30
|
|
445
445
|
} },
|
|
446
446
|
setup(e, { slots: t }) {
|
|
447
|
-
let n =
|
|
448
|
-
return () => (n.footerHeight = e.height + "px",
|
|
447
|
+
let n = X();
|
|
448
|
+
return () => (n.footerHeight = e.height + "px", p("div", { class: "app-footer" }, [x(t, "default")]));
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
-
function
|
|
452
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
451
|
+
function ke(e) {
|
|
452
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
453
453
|
}
|
|
454
|
-
const
|
|
454
|
+
const Z = /* @__PURE__ */ m({
|
|
455
455
|
name: "AppLogo",
|
|
456
456
|
props: {
|
|
457
457
|
src: [String, Function],
|
|
@@ -470,12 +470,12 @@ const AppLogo = /* @__PURE__ */ defineComponent({
|
|
|
470
470
|
}
|
|
471
471
|
},
|
|
472
472
|
setup(e, { slots: t }) {
|
|
473
|
-
let n =
|
|
473
|
+
let n = te(() => typeof e.src == "function" ? e.src() : e.src), r = h(q, !1);
|
|
474
474
|
return () => {
|
|
475
475
|
let { name: i, collapsed: a, center: o, link: s } = e;
|
|
476
|
-
a ??=
|
|
477
|
-
let
|
|
478
|
-
return
|
|
476
|
+
a ??= w(r);
|
|
477
|
+
let c = a ? 1 : 1 / 1.1;
|
|
478
|
+
return p("div", {
|
|
479
479
|
class: "app-logo",
|
|
480
480
|
style: {
|
|
481
481
|
"--app-logo-img-size": "32px",
|
|
@@ -487,7 +487,7 @@ const AppLogo = /* @__PURE__ */ defineComponent({
|
|
|
487
487
|
justifyContent: o ? "center" : "flex-start",
|
|
488
488
|
cursor: s ? "pointer" : void 0
|
|
489
489
|
}
|
|
490
|
-
}, [t.default ? t.default() :
|
|
490
|
+
}, [t.default ? t.default() : p("div", {
|
|
491
491
|
class: "app-logo__img",
|
|
492
492
|
style: `
|
|
493
493
|
width: ${a ? "var(--app-sider-width, 60px)" : "56px"};
|
|
@@ -497,21 +497,21 @@ const AppLogo = /* @__PURE__ */ defineComponent({
|
|
|
497
497
|
display: flex;
|
|
498
498
|
justify-content: center
|
|
499
499
|
`
|
|
500
|
-
}, [t.icon ? t.icon() :
|
|
500
|
+
}, [t.icon ? t.icon() : p("img", {
|
|
501
501
|
src: n.value,
|
|
502
502
|
alt: "App Logo",
|
|
503
|
-
style: `transition: height 0.2s ease-in-out; height: calc(var(--app-logo-img-size) * ${
|
|
504
|
-
}, null)]), i ?
|
|
503
|
+
style: `transition: height 0.2s ease-in-out; height: calc(var(--app-logo-img-size) * ${c})`
|
|
504
|
+
}, null)]), i ? p(H, {
|
|
505
505
|
class: "app-logo__name",
|
|
506
506
|
style: "font-size: var(--app-logo-name-size); font-weight: bold; white-space: nowrap; flex: 0 1 auto; overflow: hidden"
|
|
507
|
-
},
|
|
507
|
+
}, ke(i) ? i : { default: () => [i] }) : ""]);
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
510
|
});
|
|
511
|
-
function
|
|
512
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
511
|
+
function Q(e) {
|
|
512
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
513
513
|
}
|
|
514
|
-
const
|
|
514
|
+
const Ae = /* @__PURE__ */ m({
|
|
515
515
|
name: "AppMenu",
|
|
516
516
|
props: {
|
|
517
517
|
menus: Array,
|
|
@@ -535,8 +535,8 @@ const AppMenu = /* @__PURE__ */ defineComponent({
|
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
537
|
setup(e) {
|
|
538
|
-
let t =
|
|
539
|
-
|
|
538
|
+
let t = ee([]);
|
|
539
|
+
E([() => e.menus, () => e.single], ([n, r]) => {
|
|
540
540
|
if (t.value = [], !n?.length) return;
|
|
541
541
|
let i = (t, n = 0) => {
|
|
542
542
|
let a = [];
|
|
@@ -546,7 +546,7 @@ const AppMenu = /* @__PURE__ */ defineComponent({
|
|
|
546
546
|
_: o,
|
|
547
547
|
key: o.key,
|
|
548
548
|
label: () => e.renderLabel?.(o) ?? o.name,
|
|
549
|
-
icon: n === 0 || o.icon ? e.getIcon?.(o.icon) ??
|
|
549
|
+
icon: n === 0 || o.icon ? typeof o.icon == "string" ? e.getIcon?.(o.icon, o) ?? J : o.icon : void 0,
|
|
550
550
|
children: r ? void 0 : t,
|
|
551
551
|
path: o.path || (r ? t?.[0]?.path : void 0),
|
|
552
552
|
depth: n
|
|
@@ -556,47 +556,47 @@ const AppMenu = /* @__PURE__ */ defineComponent({
|
|
|
556
556
|
return a;
|
|
557
557
|
};
|
|
558
558
|
t.value = i(n);
|
|
559
|
-
}, { immediate: !0 }),
|
|
559
|
+
}, { immediate: !0 }), E([T("menu"), () => e.current], ([e, t]) => {
|
|
560
560
|
e?.showOption(t);
|
|
561
561
|
}, { immediate: !0 });
|
|
562
|
-
let n =
|
|
563
|
-
let r = e.collapsed ??
|
|
564
|
-
if (t._.type === "view") if (t.isExternal && t.externalEmbed) i =
|
|
562
|
+
let n = h(q, !1), r = (t) => {
|
|
563
|
+
let r = e.collapsed ?? w(n), i;
|
|
564
|
+
if (t._.type === "view") if (t.isExternal && t.externalEmbed) i = p("a", {
|
|
565
565
|
href: t.externalLink,
|
|
566
566
|
target: "_blank",
|
|
567
567
|
onClick: (e) => e.stopPropagation()
|
|
568
568
|
}, [t.label()]);
|
|
569
569
|
else {
|
|
570
570
|
let e;
|
|
571
|
-
i =
|
|
571
|
+
i = p(de, { to: t.path }, Q(e = t.label()) ? e : { default: () => [e] });
|
|
572
572
|
}
|
|
573
|
-
else i =
|
|
574
|
-
return i.key = `${t.key}:${r ? 1 : 0}`, t.depth === 0 && !r && (i =
|
|
575
|
-
|
|
573
|
+
else i = p("span", null, [t.label()]);
|
|
574
|
+
return i.key = `${t.key}:${r ? 1 : 0}`, t.depth === 0 && !r && (i = D(p("div", null, [i]), [[
|
|
575
|
+
s,
|
|
576
576
|
t.label(),
|
|
577
577
|
void 0,
|
|
578
578
|
{
|
|
579
579
|
auto: !0,
|
|
580
580
|
right: !0
|
|
581
581
|
}
|
|
582
|
-
]])), t.isNew && (i =
|
|
582
|
+
]])), t.isNew && (i = p("div", { style: "display: flex; width: 100%" }, [p("span", { style: "flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis" }, [i]), p("svg", {
|
|
583
583
|
xmlns: "http://www.w3.org/2000/svg",
|
|
584
584
|
width: "24",
|
|
585
585
|
height: "24",
|
|
586
586
|
viewBox: "0 0 1024 1024",
|
|
587
587
|
style: "margin-left: 8px; flex: 0 0 auto;"
|
|
588
|
-
}, [
|
|
588
|
+
}, [p("path", {
|
|
589
589
|
d: "M245.76 286.72h552.96c124.928 0 225.28 100.352 225.28 225.28s-100.352 225.28-225.28 225.28H0V532.48c0-135.168 110.592-245.76 245.76-245.76z m133.12 348.16V401.408H348.16v178.176l-112.64-178.176H204.8V634.88h30.72v-178.176L348.16 634.88h30.72z m182.272-108.544v-24.576h-96.256v-75.776h110.592v-24.576h-141.312V634.88h143.36v-24.576h-112.64v-83.968h96.256z m100.352 28.672l-34.816-151.552h-34.816l55.296 233.472H675.84l47.104-161.792 4.096-20.48 4.096 20.48 47.104 161.792h28.672l57.344-233.472h-34.816l-32.768 151.552-4.096 30.72-6.144-30.72-40.96-151.552h-30.72l-40.96 151.552-6.144 30.72-6.144-30.72z",
|
|
590
590
|
fill: "var(--color-danger)"
|
|
591
591
|
}, null)])])), i;
|
|
592
592
|
};
|
|
593
593
|
return () => {
|
|
594
|
-
let i =
|
|
594
|
+
let i = p(R, {
|
|
595
595
|
ref: "menu",
|
|
596
596
|
options: t.value,
|
|
597
597
|
rootIndent: 16,
|
|
598
598
|
accordion: e.accordion,
|
|
599
|
-
collapsed: e.collapsed ??
|
|
599
|
+
collapsed: e.collapsed ?? w(n),
|
|
600
600
|
dropdownProps: { showArrow: !0 },
|
|
601
601
|
mode: e.horizontal ? "horizontal" : "vertical",
|
|
602
602
|
value: e.current ?? null,
|
|
@@ -605,39 +605,39 @@ const AppMenu = /* @__PURE__ */ defineComponent({
|
|
|
605
605
|
collapsedWidth: e.collapsedWidth,
|
|
606
606
|
width: e.width
|
|
607
607
|
}, null);
|
|
608
|
-
return e.horizontal ? i :
|
|
608
|
+
return e.horizontal ? i : p(V, null, Q(i) ? i : { default: () => [i] });
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
|
-
function
|
|
613
|
-
let { t: i } =
|
|
612
|
+
function je(t, n, r) {
|
|
613
|
+
let { t: i } = e(), a = y({
|
|
614
614
|
visible: !1,
|
|
615
615
|
x: 0,
|
|
616
616
|
y: 0
|
|
617
617
|
}), o = async (e, t) => {
|
|
618
|
-
e.preventDefault(), e.stopPropagation(), !(a.visible && a.tab === t) && (a.tab = t, a.visible && (a.visible = !1, await
|
|
618
|
+
e.preventDefault(), e.stopPropagation(), !(a.visible && a.tab === t) && (a.tab = t, a.visible && (a.visible = !1, await O(130)), a.visible = !0, a.x = e.clientX, a.y = e.clientY);
|
|
619
619
|
}, s = async () => {
|
|
620
620
|
requestIdleCallback(() => {
|
|
621
621
|
a.visible = !1;
|
|
622
622
|
}, { timeout: 30 });
|
|
623
|
-
},
|
|
623
|
+
}, c = G();
|
|
624
624
|
return {
|
|
625
625
|
ctx: a,
|
|
626
626
|
onCtx: o,
|
|
627
627
|
onClickOutside: s,
|
|
628
|
-
options:
|
|
628
|
+
options: f(() => [
|
|
629
629
|
{
|
|
630
630
|
key: "reload",
|
|
631
631
|
label: i("common.layout.tabs.reloadTab"),
|
|
632
632
|
disabled: !a.tab || a.tab.key !== n.value,
|
|
633
|
-
icon: () =>
|
|
633
|
+
icon: () => p(F, { size: 20 }, { default: () => [p("svg", {
|
|
634
634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
635
635
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
636
636
|
role: "img",
|
|
637
637
|
width: "1em",
|
|
638
638
|
height: "1em",
|
|
639
639
|
viewBox: "0 0 24 24"
|
|
640
|
-
}, [
|
|
640
|
+
}, [p("path", {
|
|
641
641
|
fill: "currentColor",
|
|
642
642
|
d: "M17.65 6.35A7.958 7.958 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35Z"
|
|
643
643
|
}, null)])] })
|
|
@@ -645,17 +645,17 @@ function useCtxMenu(t, n, r) {
|
|
|
645
645
|
{
|
|
646
646
|
key: "fullTab",
|
|
647
647
|
label: i("common.layout.tabs.fullTab"),
|
|
648
|
-
icon: () =>
|
|
648
|
+
icon: () => p(F, { size: 16 }, { default: () => [p("svg", {
|
|
649
649
|
xmlns: "http://www.w3.org/2000/svg",
|
|
650
650
|
width: "1em",
|
|
651
651
|
height: "1em",
|
|
652
652
|
viewBox: "0 0 24 24"
|
|
653
|
-
}, [
|
|
653
|
+
}, [p("path", {
|
|
654
654
|
fill: "currentColor",
|
|
655
655
|
"fill-rule": "evenodd",
|
|
656
656
|
d: "M18.29 2.89c-1.028-.138-2.383-.14-4.29-.14a.75.75 0 0 1 0-1.5h.056c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433V10a.75.75 0 0 1-1.5 0c0-1.907-.002-3.261-.14-4.29c-.135-1.005-.389-1.585-.812-2.008s-1.003-.677-2.009-.812M2 13.25a.75.75 0 0 1 .75.75c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V14a.75.75 0 0 1 .75-.75",
|
|
657
657
|
"clip-rule": "evenodd"
|
|
658
|
-
}, null),
|
|
658
|
+
}, null), p("path", {
|
|
659
659
|
fill: "currentColor",
|
|
660
660
|
d: "M9.944 1.25H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S3.025 4.705 2.89 5.71c-.138 1.029-.14 2.383-.14 4.29a.75.75 0 0 1-1.5 0v-.056c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153M22 13.25a.75.75 0 0 1 .75.75v.056c0 1.838 0 3.294-.153 4.433c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812s.677-1.003.812-2.009c.138-1.027.14-2.382.14-4.289a.75.75 0 0 1 .75-.75",
|
|
661
661
|
opacity: ".5"
|
|
@@ -665,14 +665,14 @@ function useCtxMenu(t, n, r) {
|
|
|
665
665
|
key: "open",
|
|
666
666
|
label: i("common.layout.tabs.openTabBlank"),
|
|
667
667
|
disabled: !a.tab,
|
|
668
|
-
icon: () =>
|
|
668
|
+
icon: () => p(F, { size: 20 }, { default: () => [p("svg", {
|
|
669
669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
670
670
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
671
671
|
role: "img",
|
|
672
672
|
width: "1em",
|
|
673
673
|
height: "1em",
|
|
674
674
|
viewBox: "0 0 15 15"
|
|
675
|
-
}, [
|
|
675
|
+
}, [p("path", {
|
|
676
676
|
fill: "currentColor",
|
|
677
677
|
"clip-rule": "evenodd",
|
|
678
678
|
"fill-rule": "evenodd",
|
|
@@ -682,14 +682,14 @@ function useCtxMenu(t, n, r) {
|
|
|
682
682
|
{
|
|
683
683
|
key: "closeAll",
|
|
684
684
|
label: i("common.layout.tabs.closeAllTabs"),
|
|
685
|
-
icon: () =>
|
|
685
|
+
icon: () => p(F, { size: 20 }, { default: () => [p("svg", {
|
|
686
686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
687
687
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
688
688
|
role: "img",
|
|
689
689
|
width: "1em",
|
|
690
690
|
height: "1em",
|
|
691
691
|
viewBox: "0 0 24 24"
|
|
692
|
-
}, [
|
|
692
|
+
}, [p("path", {
|
|
693
693
|
fill: "currentColor",
|
|
694
694
|
d: "M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6L6.4 19Z"
|
|
695
695
|
}, null)])] })
|
|
@@ -698,14 +698,14 @@ function useCtxMenu(t, n, r) {
|
|
|
698
698
|
key: "closeLeft",
|
|
699
699
|
label: i("common.layout.tabs.closeLeftTabs"),
|
|
700
700
|
disabled: !a.tab,
|
|
701
|
-
icon: () =>
|
|
701
|
+
icon: () => p(F, { size: 20 }, { default: () => [p("svg", {
|
|
702
702
|
xmlns: "http://www.w3.org/2000/svg",
|
|
703
703
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
704
704
|
role: "img",
|
|
705
705
|
width: "1em",
|
|
706
706
|
height: "1em",
|
|
707
707
|
viewBox: "0 0 24 24"
|
|
708
|
-
}, [
|
|
708
|
+
}, [p("path", {
|
|
709
709
|
fill: "currentColor",
|
|
710
710
|
d: "M11 16v-3h10v-2H11V8l-4 4l4 4m-8 4h2V4H3v16Z"
|
|
711
711
|
}, null)])] })
|
|
@@ -714,14 +714,14 @@ function useCtxMenu(t, n, r) {
|
|
|
714
714
|
key: "closeRight",
|
|
715
715
|
label: i("common.layout.tabs.closeRightTabs"),
|
|
716
716
|
disabled: !a.tab,
|
|
717
|
-
icon: () =>
|
|
717
|
+
icon: () => p(F, { size: 20 }, { default: () => [p("svg", {
|
|
718
718
|
xmlns: "http://www.w3.org/2000/svg",
|
|
719
719
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
720
720
|
role: "img",
|
|
721
721
|
width: "1em",
|
|
722
722
|
height: "1em",
|
|
723
723
|
viewBox: "0 0 24 24"
|
|
724
|
-
}, [
|
|
724
|
+
}, [p("path", {
|
|
725
725
|
fill: "currentColor",
|
|
726
726
|
d: "M13 8v3H3v2h10v3l4-4l-4-4m6 12h2V4h-2v16Z"
|
|
727
727
|
}, null)])] })
|
|
@@ -730,14 +730,14 @@ function useCtxMenu(t, n, r) {
|
|
|
730
730
|
key: "closeOther",
|
|
731
731
|
label: i("common.layout.tabs.closeOtherTabs"),
|
|
732
732
|
disabled: !a.tab,
|
|
733
|
-
icon: () =>
|
|
733
|
+
icon: () => p(F, { size: 20 }, { default: () => [" ", p("svg", {
|
|
734
734
|
xmlns: "http://www.w3.org/2000/svg",
|
|
735
735
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
736
736
|
role: "img",
|
|
737
737
|
width: "1em",
|
|
738
738
|
height: "1em",
|
|
739
739
|
viewBox: "0 0 1024 1024"
|
|
740
|
-
}, [
|
|
740
|
+
}, [p("path", {
|
|
741
741
|
fill: "currentColor",
|
|
742
742
|
d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 0 0-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 0 0 0 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
|
|
743
743
|
}, null)])] })
|
|
@@ -747,7 +747,7 @@ function useCtxMenu(t, n, r) {
|
|
|
747
747
|
a.visible = !1;
|
|
748
748
|
let i = [...t.value];
|
|
749
749
|
if (e === "closeAll") {
|
|
750
|
-
await
|
|
750
|
+
await c.push("/");
|
|
751
751
|
for (let e of i) e.key !== n.value && e.close(!1);
|
|
752
752
|
return;
|
|
753
753
|
}
|
|
@@ -760,28 +760,28 @@ function useCtxMenu(t, n, r) {
|
|
|
760
760
|
window.open(a.tab.href, "_blank");
|
|
761
761
|
break;
|
|
762
762
|
case "reload":
|
|
763
|
-
a.tab.reloading || (a.tab.reloading = !0, await
|
|
763
|
+
a.tab.reloading || (a.tab.reloading = !0, await O(220), a.tab.reloading = !1);
|
|
764
764
|
break;
|
|
765
765
|
case "close":
|
|
766
766
|
a.tab?.close();
|
|
767
767
|
break;
|
|
768
768
|
case "closeOther":
|
|
769
|
-
n.value !== a.tab.key && await
|
|
769
|
+
n.value !== a.tab.key && await c.push(a.tab.fullPath);
|
|
770
770
|
for (let e of i) e.key !== a.tab.key && e.close(!1);
|
|
771
771
|
break;
|
|
772
772
|
case "closeLeft":
|
|
773
|
-
n.value !== a.tab.key && await
|
|
773
|
+
n.value !== a.tab.key && await c.push(a.tab.fullPath);
|
|
774
774
|
for (let e of t.value.slice(0, i.indexOf(a.tab))) e.close(!1);
|
|
775
775
|
break;
|
|
776
776
|
case "closeRight":
|
|
777
|
-
n.value !== a.tab.key && await
|
|
777
|
+
n.value !== a.tab.key && await c.push(a.tab.fullPath);
|
|
778
778
|
for (let e of t.value.slice(i.indexOf(a.tab) + 1)) e.close(!1);
|
|
779
779
|
break;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function Me(e, t, n) {
|
|
785
785
|
function r(n) {
|
|
786
786
|
if (n === -1 || !t.value?.children.length) return;
|
|
787
787
|
let r = t.value.children[n];
|
|
@@ -790,52 +790,52 @@ function useContentScroll(e, t, n) {
|
|
|
790
790
|
left: Math.max(0, t.value.offsetLeft + r.offsetLeft - e.value.clientWidth / 2 + r.clientWidth / 2 + 10)
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
|
-
return
|
|
793
|
+
return ae(k(e), (e) => {
|
|
794
794
|
e || r(n.value);
|
|
795
|
-
}, { debounce: 333 }),
|
|
795
|
+
}, { debounce: 333 }), E(n, r, { flush: "post" }), re(e, "wheel", (t) => {
|
|
796
796
|
t.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (t.preventDefault(), e.value.scrollBy({ left: t.deltaY }));
|
|
797
797
|
}, { passive: !1 }), {
|
|
798
798
|
el: e,
|
|
799
799
|
content: t
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
var
|
|
803
|
-
|
|
804
|
-
|
|
802
|
+
var Ne = (e) => p("svg", e, [
|
|
803
|
+
p("defs", null, [
|
|
804
|
+
p("symbol", {
|
|
805
805
|
id: "geometry-left",
|
|
806
806
|
viewBox: "0 0 214 36"
|
|
807
|
-
}, [
|
|
808
|
-
|
|
807
|
+
}, [p("path", { d: "M17 0h197v36H0v-2c4.5 0 9-3.5 9-8V8c0-4.5 3.5-8 8-8z" }, null)]),
|
|
808
|
+
p("symbol", {
|
|
809
809
|
id: "geometry-right",
|
|
810
810
|
viewBox: "0 0 214 36"
|
|
811
|
-
}, [
|
|
812
|
-
|
|
811
|
+
}, [p("use", { "xlink:href": "#geometry-left" }, null)]),
|
|
812
|
+
p("clipPath", null, [p("rect", {
|
|
813
813
|
width: "100%",
|
|
814
814
|
height: "100%",
|
|
815
815
|
x: "0"
|
|
816
816
|
}, null)])
|
|
817
817
|
]),
|
|
818
|
-
|
|
818
|
+
p("svg", {
|
|
819
819
|
width: "50%",
|
|
820
820
|
height: "100%"
|
|
821
|
-
}, [
|
|
821
|
+
}, [p("use", {
|
|
822
822
|
"xlink:href": "#geometry-left",
|
|
823
823
|
width: "214",
|
|
824
824
|
height: "36",
|
|
825
825
|
fill: "currentColor"
|
|
826
826
|
}, null)]),
|
|
827
|
-
|
|
827
|
+
p("g", { transform: "scale(-1, 1)" }, [p("svg", {
|
|
828
828
|
width: "50%",
|
|
829
829
|
height: "100%",
|
|
830
830
|
x: "-100%",
|
|
831
831
|
y: "0"
|
|
832
|
-
}, [
|
|
832
|
+
}, [p("use", {
|
|
833
833
|
"xlink:href": "#geometry-right",
|
|
834
834
|
width: "214",
|
|
835
835
|
height: "36",
|
|
836
836
|
fill: "currentColor"
|
|
837
837
|
}, null)])])
|
|
838
|
-
]),
|
|
838
|
+
]), Pe = /* @__PURE__ */ m({
|
|
839
839
|
name: "AppTab",
|
|
840
840
|
props: {
|
|
841
841
|
path: String,
|
|
@@ -846,54 +846,54 @@ var IBg = (e) => createVNode("svg", e, [
|
|
|
846
846
|
},
|
|
847
847
|
emits: ["close"],
|
|
848
848
|
setup(e, { emit: t, slots: n }) {
|
|
849
|
-
let r =
|
|
850
|
-
|
|
851
|
-
await
|
|
849
|
+
let r = b(), i = k(r), a = b(), o = b(), { width: s } = ne(o);
|
|
850
|
+
E(s, async () => {
|
|
851
|
+
await O(1), a.value.style.width = o.value.scrollWidth + "px";
|
|
852
852
|
});
|
|
853
|
-
let
|
|
853
|
+
let c = W(), l = f(() => ({
|
|
854
854
|
fontSize: "14px",
|
|
855
|
-
color: e.isCurrent ?
|
|
855
|
+
color: e.isCurrent ? c.value.primaryColor : c.value.textColor3,
|
|
856
856
|
maxWidth: "355px",
|
|
857
857
|
overflow: "hidden"
|
|
858
|
-
})),
|
|
858
|
+
})), u = f(() => ({
|
|
859
859
|
width: "calc(100% + 27px)",
|
|
860
860
|
height: "100%",
|
|
861
861
|
position: "absolute",
|
|
862
862
|
top: "0",
|
|
863
863
|
left: "-14px",
|
|
864
864
|
zIndex: e.isCurrent ? -1 : -2,
|
|
865
|
-
color: e.isCurrent ?
|
|
865
|
+
color: e.isCurrent ? pe(c.value.primaryColor, e.dark ? .3 : .12, e.dark ? "#000" : "#fff") : i.value ? c.value.borderColor : "transparent"
|
|
866
866
|
}));
|
|
867
|
-
return () =>
|
|
867
|
+
return () => p("div", {
|
|
868
868
|
ref: r,
|
|
869
869
|
style: "position: relative; padding: 2px 10px 5px; cursor: pointer"
|
|
870
870
|
}, [
|
|
871
|
-
|
|
871
|
+
p("div", {
|
|
872
872
|
ref: a,
|
|
873
873
|
style: "transition: width 300ms; overflow: hidden"
|
|
874
|
-
}, [
|
|
874
|
+
}, [p("div", {
|
|
875
875
|
ref: o,
|
|
876
876
|
style: "display: flex; align-items: center; gap: 4px; width: fit-content"
|
|
877
|
-
}, [
|
|
877
|
+
}, [p("span", { style: l.value }, [n.default?.()]), e.closable !== !1 && (e.isCurrent || i.value) ? p("span", { style: "line-height: 0; display: inline-block; text-align: right; padding-top: 2px" }, [p(j, {
|
|
878
878
|
text: !0,
|
|
879
879
|
onClick: (e) => {
|
|
880
880
|
e.stopPropagation(), t("close");
|
|
881
881
|
}
|
|
882
|
-
}, { default: () => [
|
|
882
|
+
}, { default: () => [p(F, { size: 18 }, { default: () => [p("svg", {
|
|
883
883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
884
884
|
width: "1em",
|
|
885
885
|
height: "1em",
|
|
886
886
|
viewBox: "0 0 24 24"
|
|
887
|
-
}, [
|
|
887
|
+
}, [p("path", {
|
|
888
888
|
fill: "currentColor",
|
|
889
889
|
d: "m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"
|
|
890
890
|
}, null)])] })] })]) : void 0])]),
|
|
891
|
-
|
|
892
|
-
|
|
891
|
+
p("span", { style: "height: 50%; width: 1px; background: #aaa; display: inline-block; position: absolute; top: 20%; right: -4px; z-index: -3" }, null),
|
|
892
|
+
p(Ne, { style: u.value }, null)
|
|
893
893
|
]);
|
|
894
894
|
}
|
|
895
895
|
});
|
|
896
|
-
const
|
|
896
|
+
const Fe = /* @__PURE__ */ m({
|
|
897
897
|
name: "AppMultiTabs",
|
|
898
898
|
props: {
|
|
899
899
|
fullTab: Boolean,
|
|
@@ -904,21 +904,21 @@ const AppMultiTabs = /* @__PURE__ */ defineComponent({
|
|
|
904
904
|
},
|
|
905
905
|
emits: ["update:fullTab"],
|
|
906
906
|
setup(e, { emit: t, slots: n }) {
|
|
907
|
-
let r =
|
|
907
|
+
let r = X();
|
|
908
908
|
r.hasMultiTab = !0;
|
|
909
|
-
let i =
|
|
910
|
-
return
|
|
911
|
-
ref:
|
|
909
|
+
let i = G(), { ctx: a, onCtx: o, onClickOutside: s, options: c, onSelect: l } = je(S(e, "tabs"), f(() => e.current?.key), () => t("update:fullTab", !e.fullTab)), u = f(() => e.current ? e.tabs.findIndex((t) => t.key === e.current?.key) : -1), d = b(), m = b();
|
|
910
|
+
return Me(d, m, u), () => p("div", { style: "width: 100%; height: 100%; overflow: hidden; display: flex; justify-content: space-between" }, [p("div", {
|
|
911
|
+
ref: d,
|
|
912
912
|
style: "flex: 1 1 100%; height: 100%; display: flex; overflow: hidden; align-items: center; position: relative"
|
|
913
913
|
}, [
|
|
914
|
-
|
|
915
|
-
|
|
914
|
+
p("div", { style: "height: 100%; flex: 0 0 16px; z-index: 1; position: sticky; left: 0; backdrop-filter: opacity(0.9) blur(5px)" }, null),
|
|
915
|
+
p("div", {
|
|
916
916
|
ref: m,
|
|
917
917
|
style: "padding-inline: 12px; flex: 1 1 auto; display: flex; align-items: end; gap: 8px; height: 100%",
|
|
918
918
|
onContextmenu: (e) => o(e)
|
|
919
919
|
}, [e.tabs.map((t, r, a) => {
|
|
920
|
-
let s = e.current?.key === t.key,
|
|
921
|
-
return
|
|
920
|
+
let s = e.current?.key === t.key, c = t.title ?? t.path;
|
|
921
|
+
return p(Pe, {
|
|
922
922
|
key: t.key,
|
|
923
923
|
isCurrent: s,
|
|
924
924
|
isLast: r === a.length - 1,
|
|
@@ -931,27 +931,27 @@ const AppMultiTabs = /* @__PURE__ */ defineComponent({
|
|
|
931
931
|
onContextmenu: (e) => o(e, t)
|
|
932
932
|
}, { default: () => [n.name ? n.name({
|
|
933
933
|
isCurrent: s,
|
|
934
|
-
name:
|
|
934
|
+
name: c,
|
|
935
935
|
tab: t
|
|
936
|
-
}) :
|
|
936
|
+
}) : c] });
|
|
937
937
|
})]),
|
|
938
|
-
|
|
939
|
-
]),
|
|
938
|
+
p("div", { style: "height: 100%; flex: 0 0 16px; z-index: 1; position: sticky; right: 0; backdrop-filter: opacity(0.9) blur(5px)" }, null)
|
|
939
|
+
]), p(N, {
|
|
940
940
|
placement: "bottom-start",
|
|
941
941
|
trigger: "manual",
|
|
942
942
|
show: a.visible,
|
|
943
943
|
x: a.x,
|
|
944
944
|
y: a.y,
|
|
945
|
-
options:
|
|
945
|
+
options: c.value,
|
|
946
946
|
onClickoutside: s,
|
|
947
|
-
onSelect:
|
|
947
|
+
onSelect: l
|
|
948
948
|
}, null)]);
|
|
949
949
|
}
|
|
950
950
|
});
|
|
951
|
-
function
|
|
952
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
951
|
+
function $(e) {
|
|
952
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
|
|
953
953
|
}
|
|
954
|
-
const
|
|
954
|
+
const Ie = /* @__PURE__ */ m({
|
|
955
955
|
name: "AppNotification",
|
|
956
956
|
inheritAttrs: !1,
|
|
957
957
|
props: {
|
|
@@ -965,82 +965,82 @@ const AppNotification = /* @__PURE__ */ defineComponent({
|
|
|
965
965
|
}
|
|
966
966
|
},
|
|
967
967
|
setup(t, { slots: n, attrs: r }) {
|
|
968
|
-
let { t: i } =
|
|
968
|
+
let { t: i } = e(), a = b(!1), o = b("unread"), l = y({
|
|
969
969
|
page: 1,
|
|
970
970
|
size: 10,
|
|
971
971
|
loading: !1,
|
|
972
972
|
records: [],
|
|
973
973
|
total: 0,
|
|
974
974
|
unread: 0
|
|
975
|
-
}), { sync:
|
|
975
|
+
}), { sync: u, post: f } = ue({
|
|
976
976
|
channel: "__ithinkdt_mc_shared_channel",
|
|
977
977
|
onMsg: (e) => {
|
|
978
|
-
|
|
978
|
+
l.unread = e;
|
|
979
979
|
},
|
|
980
|
-
getMsg: () => (a.value && (
|
|
981
|
-
|
|
980
|
+
getMsg: () => (a.value && (l.loading = !0, Promise.resolve(t.getPage?.(o.value, l.page, l.size) ?? []).then(({ records: e, total: t }) => {
|
|
981
|
+
l.records = e, o.value === "unread" ? (l.unread = t, f(t)) : l.total = t;
|
|
982
982
|
}).finally(() => {
|
|
983
|
-
|
|
983
|
+
l.loading = !1;
|
|
984
984
|
})), t.getUnreadCount?.() ?? 0),
|
|
985
985
|
timeout: () => t.interval,
|
|
986
986
|
immediate: !0
|
|
987
987
|
});
|
|
988
988
|
return () => {
|
|
989
|
-
let e =
|
|
989
|
+
let e = D(p(j, _(r, {
|
|
990
990
|
quaternary: !0,
|
|
991
991
|
style: "--n-padding: 0 12px",
|
|
992
992
|
onClick: () => {
|
|
993
|
-
a.value = !0, o.value =
|
|
993
|
+
a.value = !0, o.value = l.unread > 0 ? "unread" : "all", setTimeout(u, 300);
|
|
994
994
|
}
|
|
995
|
-
}), { default: () => [n.icon ? n.icon() :
|
|
996
|
-
show:
|
|
995
|
+
}), { default: () => [n.icon ? n.icon() : p(oe, {
|
|
996
|
+
show: l.unread > 0,
|
|
997
997
|
dot: !0,
|
|
998
998
|
offset: [-2, 5],
|
|
999
999
|
processing: !0
|
|
1000
|
-
}, { default: () => [
|
|
1000
|
+
}, { default: () => [p(F, { size: "18" }, { default: () => [p("svg", {
|
|
1001
1001
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1002
1002
|
width: "1em",
|
|
1003
1003
|
height: "1em",
|
|
1004
1004
|
viewBox: "0 0 24 24"
|
|
1005
|
-
}, [
|
|
1005
|
+
}, [p("g", {
|
|
1006
1006
|
fill: "none",
|
|
1007
1007
|
stroke: "currentColor",
|
|
1008
1008
|
"stroke-linecap": "round",
|
|
1009
1009
|
"stroke-linejoin": "round",
|
|
1010
1010
|
"stroke-width": "1.5",
|
|
1011
1011
|
color: "currentColor"
|
|
1012
|
-
}, [
|
|
1013
|
-
|
|
1014
|
-
i("common.notification.tip", { count:
|
|
1012
|
+
}, [p("path", { d: "M2.53 14.77c-.213 1.394.738 2.361 1.902 2.843c4.463 1.85 10.673 1.85 15.136 0c1.164-.482 2.115-1.45 1.902-2.843c-.13-.857-.777-1.57-1.256-2.267c-.627-.924-.689-1.931-.69-3.003C19.525 5.358 16.157 2 12 2S4.475 5.358 4.475 9.5c0 1.072-.062 2.08-.69 3.003c-.478.697-1.124 1.41-1.255 2.267" }, null), p("path", { d: "M8 19c.458 1.725 2.076 3 4 3c1.925 0 3.541-1.275 4-3" }, null)])])] })] })] }), [[
|
|
1013
|
+
s,
|
|
1014
|
+
i("common.notification.tip", { count: l.unread }),
|
|
1015
1015
|
void 0,
|
|
1016
1016
|
{ bottom: !0 }
|
|
1017
|
-
]]),
|
|
1017
|
+
]]), f = () => {
|
|
1018
1018
|
let e, t;
|
|
1019
|
-
return
|
|
1020
|
-
|
|
1021
|
-
|
|
1019
|
+
return p("div", { style: "display: flex; align-items: baseline; gap: 20px" }, [
|
|
1020
|
+
p("div", { style: "padding-right: 12px" }, [i("common.notification.title")]),
|
|
1021
|
+
p(j, {
|
|
1022
1022
|
text: !0,
|
|
1023
1023
|
type: o.value === "all" ? "primary" : "default",
|
|
1024
1024
|
onClick: () => {
|
|
1025
|
-
o.value = "all",
|
|
1025
|
+
o.value = "all", u();
|
|
1026
1026
|
}
|
|
1027
|
-
},
|
|
1028
|
-
|
|
1027
|
+
}, $(e = i("common.notification.all")) ? e : { default: () => [e] }),
|
|
1028
|
+
p(j, {
|
|
1029
1029
|
text: !0,
|
|
1030
1030
|
type: o.value === "unread" ? "primary" : "default",
|
|
1031
1031
|
onClick: () => {
|
|
1032
|
-
o.value = "unread",
|
|
1032
|
+
o.value = "unread", u();
|
|
1033
1033
|
}
|
|
1034
|
-
},
|
|
1034
|
+
}, $(t = i("common.notification.unread", { count: l.unread > 99 ? "99+" : l.unread.toString() })) ? t : { default: () => [t] })
|
|
1035
1035
|
]);
|
|
1036
|
-
}, m = (e) =>
|
|
1036
|
+
}, m = (e) => p(L, {
|
|
1037
1037
|
key: e.key,
|
|
1038
1038
|
onClick: () => {
|
|
1039
1039
|
e.status === "unread" && (t.markRead?.([e.key]).then(() => {
|
|
1040
1040
|
e.status = "read";
|
|
1041
|
-
}),
|
|
1041
|
+
}), l.unread--), e.link && window.open(e.link, "_target");
|
|
1042
1042
|
}
|
|
1043
|
-
}, { default: () => [
|
|
1043
|
+
}, { default: () => [p(U, {
|
|
1044
1044
|
bordered: !1,
|
|
1045
1045
|
closable: !0,
|
|
1046
1046
|
contentIndented: !0,
|
|
@@ -1049,112 +1049,112 @@ const AppNotification = /* @__PURE__ */ defineComponent({
|
|
|
1049
1049
|
onMouseleave: () => e.hover = !1,
|
|
1050
1050
|
style: "padding: 0 4px"
|
|
1051
1051
|
}, {
|
|
1052
|
-
avatar: () =>
|
|
1052
|
+
avatar: () => p(F, {
|
|
1053
1053
|
size: 22,
|
|
1054
1054
|
color: e.status === "unread" ? "var(--color-primary)" : void 0
|
|
1055
|
-
}, { default: () => [
|
|
1055
|
+
}, { default: () => [p("svg", {
|
|
1056
1056
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1057
1057
|
width: "1em",
|
|
1058
1058
|
height: "1em",
|
|
1059
1059
|
viewBox: "0 0 24 24"
|
|
1060
|
-
}, [
|
|
1060
|
+
}, [p("path", {
|
|
1061
1061
|
fill: "currentColor",
|
|
1062
1062
|
d: "M12.3 7.29c.2-.18.44-.29.7-.29c.27 0 .5.11.71.29c.19.21.29.45.29.71c0 .27-.1.5-.29.71c-.21.19-.44.29-.71.29c-.26 0-.5-.1-.7-.29c-.19-.21-.3-.44-.3-.71c0-.26.11-.5.3-.71m-2.5 4.68s2.17-1.72 2.96-1.79c.74-.06.59.79.52 1.23l-.01.06c-.14.53-.31 1.17-.48 1.78c-.38 1.39-.75 2.75-.66 3c.1.34.72-.09 1.17-.39c.06-.04.11-.08.16-.11c0 0 .08-.08.16.03c.02.03.04.06.06.08c.09.14.14.19.02.27l-.04.02c-.22.15-1.16.81-1.54 1.05c-.41.27-1.98 1.17-1.74-.58c.21-1.23.49-2.29.71-3.12c.41-1.5.59-2.18-.33-1.59c-.37.22-.59.36-.72.45c-.11.08-.12.08-.19-.05l-.03-.06l-.05-.08c-.07-.1-.07-.11.03-.2M22 12c0 5.5-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2s10 4.5 10 10m-2 0c0-4.42-3.58-8-8-8s-8 3.58-8 8s3.58 8 8 8s8-3.58 8-8"
|
|
1063
1063
|
}, null)])] }),
|
|
1064
1064
|
header: () => e.title,
|
|
1065
1065
|
"header-extra": () => {
|
|
1066
1066
|
let n, r;
|
|
1067
|
-
return e.hover ?
|
|
1067
|
+
return e.hover ? p("div", {
|
|
1068
1068
|
style: "display: flex; justify-content: end; gap: 12px",
|
|
1069
1069
|
onClick: (e) => {
|
|
1070
1070
|
e.preventDefault(), e.stopPropagation();
|
|
1071
1071
|
}
|
|
1072
|
-
}, [e.status === "unread" ?
|
|
1072
|
+
}, [e.status === "unread" ? p(j, {
|
|
1073
1073
|
text: !0,
|
|
1074
1074
|
type: "primary",
|
|
1075
1075
|
onClick: () => {
|
|
1076
1076
|
t.markRead?.([e.key]).then(() => {
|
|
1077
|
-
e.status = "read",
|
|
1077
|
+
e.status = "read", l.unread--;
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
},
|
|
1080
|
+
}, $(n = i("common.notification.markRead")) ? n : { default: () => [n] }) : void 0, p(j, {
|
|
1081
1081
|
text: !0,
|
|
1082
1082
|
type: "error",
|
|
1083
1083
|
onClick: () => {
|
|
1084
|
-
|
|
1084
|
+
l.records === 1 ? (l.records = [], u()) : l.records.splice(l.records.findIndex((t) => t.key == e.key), 1), t.markDelete?.([e.key]);
|
|
1085
1085
|
}
|
|
1086
|
-
},
|
|
1086
|
+
}, $(r = i("common.notification.markDelete")) ? r : { default: () => [r] })]) : void 0;
|
|
1087
1087
|
},
|
|
1088
1088
|
default: e.content,
|
|
1089
|
-
footer: () =>
|
|
1089
|
+
footer: () => p("span", { style: "color: gray" }, [e.hover ? me(e.date, i("common.notification.time")) : i("common.timeago", { time: e.date })])
|
|
1090
1090
|
})] }), h = () => {
|
|
1091
1091
|
let e;
|
|
1092
|
-
return
|
|
1092
|
+
return D(l.records.length > 0 ? p(I, {
|
|
1093
1093
|
clickable: !0,
|
|
1094
1094
|
hoverable: !0,
|
|
1095
1095
|
style: "min-height: 50vh"
|
|
1096
|
-
},
|
|
1097
|
-
}, g = () =>
|
|
1096
|
+
}, $(e = l.records.map((e) => m(e))) ? e : { default: () => [e] }) : p(P, { style: "margin-top: 30vh" }, null), [[c, l.loading]]);
|
|
1097
|
+
}, g = () => p("div", { style: "display: flex; justify-content: space-between; width: 100%" }, [o.value === "unread" ? p(j, {
|
|
1098
1098
|
text: !0,
|
|
1099
1099
|
type: "primary",
|
|
1100
|
-
disabled:
|
|
1100
|
+
disabled: l.records.length === 0,
|
|
1101
1101
|
onClick: () => {
|
|
1102
|
-
let e =
|
|
1102
|
+
let e = l.records.filter((e) => e.status === "unread").map((e) => e.key);
|
|
1103
1103
|
t.markRead(e).then(() => {
|
|
1104
|
-
for (;
|
|
1105
|
-
|
|
1104
|
+
for (; l.unread - e.length <= l.size * (l.page - 1);) l.page--;
|
|
1105
|
+
u();
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
}, {
|
|
1109
|
-
icon: () =>
|
|
1109
|
+
icon: () => p(F, { size: "20" }, { default: () => [p("svg", {
|
|
1110
1110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1111
1111
|
width: "1em",
|
|
1112
1112
|
height: "1em",
|
|
1113
1113
|
viewBox: "0 0 24 24"
|
|
1114
|
-
}, [
|
|
1114
|
+
}, [p("path", {
|
|
1115
1115
|
fill: "currentColor",
|
|
1116
1116
|
d: "M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"
|
|
1117
1117
|
}, null)])] }),
|
|
1118
1118
|
default: () => i("common.notification.markPageRead")
|
|
1119
|
-
}) :
|
|
1119
|
+
}) : p("span", null, null), p(z, {
|
|
1120
1120
|
simple: !0,
|
|
1121
|
-
pageSize:
|
|
1122
|
-
page:
|
|
1123
|
-
itemCount: o.value === "unread" ?
|
|
1121
|
+
pageSize: l.size,
|
|
1122
|
+
page: l.page,
|
|
1123
|
+
itemCount: o.value === "unread" ? l.unread : l.total,
|
|
1124
1124
|
onUpdatePage: (e) => {
|
|
1125
|
-
|
|
1125
|
+
l.page = e, u();
|
|
1126
1126
|
}
|
|
1127
1127
|
}, null)]);
|
|
1128
|
-
return
|
|
1128
|
+
return p(d, null, [e, p(le, {
|
|
1129
1129
|
show: a.value,
|
|
1130
1130
|
"onUpdate:show": (e) => a.value = e,
|
|
1131
1131
|
showMask: !1,
|
|
1132
1132
|
width: 400
|
|
1133
|
-
}, { default: () => [
|
|
1133
|
+
}, { default: () => [p(M, {
|
|
1134
1134
|
title: i("common.notification.title"),
|
|
1135
1135
|
closable: !0,
|
|
1136
1136
|
nativeScrollbar: !1,
|
|
1137
1137
|
bodyContentStyle: { padding: "0" }
|
|
1138
1138
|
}, {
|
|
1139
|
-
header:
|
|
1139
|
+
header: f,
|
|
1140
1140
|
default: h,
|
|
1141
1141
|
footer: g
|
|
1142
1142
|
})] })]);
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
1145
1145
|
});
|
|
1146
|
-
var
|
|
1146
|
+
var Le = (e) => p("svg", _({
|
|
1147
1147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1148
1148
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1149
1149
|
role: "img",
|
|
1150
1150
|
width: "1em",
|
|
1151
1151
|
height: "1em",
|
|
1152
1152
|
viewBox: "0 0 24 24"
|
|
1153
|
-
}, e), [
|
|
1153
|
+
}, e), [p("path", {
|
|
1154
1154
|
fill: "currentColor",
|
|
1155
1155
|
d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
|
|
1156
1156
|
}, null)]);
|
|
1157
|
-
const
|
|
1157
|
+
const Re = /* @__PURE__ */ m({
|
|
1158
1158
|
name: "AppTenant",
|
|
1159
1159
|
props: {
|
|
1160
1160
|
options: Array,
|
|
@@ -1162,11 +1162,11 @@ const AppTenant = /* @__PURE__ */ defineComponent({
|
|
|
1162
1162
|
},
|
|
1163
1163
|
emit: ["update:current"],
|
|
1164
1164
|
setup(t, { emit: n }) {
|
|
1165
|
-
let { t: r } =
|
|
1165
|
+
let { t: r } = e(), i = (e) => e.disabled ? p("div", null, [e.name]) : p("div", { style: "display: flex; align-items: center; justify-content: space-between; gap: 20px" }, [p("div", { style: "display: flex; align-items: center; gap: 8px" }, [p(A, {
|
|
1166
1166
|
round: !0,
|
|
1167
1167
|
size: 22,
|
|
1168
1168
|
color: "var(--color-primary-hover)"
|
|
1169
|
-
}, { default: () => [e.icon?.() || e.name[0]] }),
|
|
1169
|
+
}, { default: () => [e.icon?.() || e.name[0]] }), p("span", { style: e.id === t.current ? "color: var(--color-primary)" : "" }, [e.name])]), e.id === t.current ? p(Le, { style: "color: var(--color-primary); font-size: 20px" }, null) : p("div", null, null)]), a = f(() => [{
|
|
1170
1170
|
id: "___",
|
|
1171
1171
|
name: r("common.account.changeTenant"),
|
|
1172
1172
|
disabled: !0
|
|
@@ -1174,7 +1174,7 @@ const AppTenant = /* @__PURE__ */ defineComponent({
|
|
|
1174
1174
|
return () => {
|
|
1175
1175
|
if (!t.options?.length) return;
|
|
1176
1176
|
let e = t.options.find((e) => e.id === t.current);
|
|
1177
|
-
return
|
|
1177
|
+
return p(N, {
|
|
1178
1178
|
options: a.value,
|
|
1179
1179
|
placement: "bottom-end",
|
|
1180
1180
|
keyField: "id",
|
|
@@ -1182,18 +1182,18 @@ const AppTenant = /* @__PURE__ */ defineComponent({
|
|
|
1182
1182
|
showArrow: !0,
|
|
1183
1183
|
renderLabel: i,
|
|
1184
1184
|
onSelect: (e) => e !== t.current && n("update:current", e)
|
|
1185
|
-
}, { default: () => [
|
|
1185
|
+
}, { default: () => [p(j, {
|
|
1186
1186
|
quaternary: !0,
|
|
1187
1187
|
style: "--n-padding: 0 6px"
|
|
1188
1188
|
}, {
|
|
1189
|
-
icon: () =>
|
|
1189
|
+
icon: () => p(F, { size: "18" }, { default: () => [p("svg", {
|
|
1190
1190
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1191
1191
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1192
1192
|
viewBox: "0 0 1024 1024",
|
|
1193
1193
|
width: "1em",
|
|
1194
1194
|
height: "1em",
|
|
1195
1195
|
role: "img"
|
|
1196
|
-
}, [
|
|
1196
|
+
}, [p("path", {
|
|
1197
1197
|
d: "M728 600.2c8.1-13.2 4-30.4-9.1-38.5-30.7-19-63.6-33.8-97.8-44.4 69.4-43 115.6-119.8 115.6-207.4C736.7 175.2 627.5 66 492.8 66S249 175.2 249 309.9c0 88.2 46.8 165.5 117 208.3-12.9 4.1-25.6 8.8-38.1 14.1-51.1 21.8-97 53-136.4 92.7-39.4 39.7-70.3 85.9-91.9 137.4-22.4 53.3-33.7 109.9-33.7 168.2 0 15.5 12.5 28 28 28s28-12.5 28-28c0-207.5 167.4-376.3 373.2-376.3 68.8 0 136.1 19 194.4 55 13.1 8.2 30.4 4.1 38.5-9.1zM305 309.9c0-50.2 19.5-97.4 55-132.8 35.5-35.5 82.7-55 132.8-55 50.2 0 97.4 19.5 132.8 55 35.5 35.5 55 82.7 55 132.8s-19.5 97.4-55 132.8c-35.5 35.5-82.7 55-132.8 55-50.2 0-97.4-19.5-132.8-55-35.5-35.5-55-82.6-55-132.8zM606.2 746.4h325.1c11.3 0 21.5-6.8 25.9-17.3s1.9-22.5-6.1-30.5L844.5 592.1c-10.9-10.9-28.7-10.9-39.6 0-10.9 10.9-10.9 28.7 0 39.6l58.7 58.6H606.2c-15.5 0-28 12.5-28 28s12.6 28.1 28 28.1zM931.4 794.6H606.3c-11.3 0-21.5 6.8-25.9 17.3s-1.9 22.5 6.1 30.5l106.6 106.4c5.5 5.5 12.6 8.2 19.8 8.2 7.2 0 14.4-2.7 19.8-8.2 10.9-10.9 10.9-28.7 0-39.6L674 850.6h257.4c15.5 0 28-12.5 28-28s-12.5-28-28-28z",
|
|
1198
1198
|
fill: "currentColor"
|
|
1199
1199
|
}, null)])] }),
|
|
@@ -1201,11 +1201,11 @@ const AppTenant = /* @__PURE__ */ defineComponent({
|
|
|
1201
1201
|
})] });
|
|
1202
1202
|
};
|
|
1203
1203
|
}
|
|
1204
|
-
}),
|
|
1204
|
+
}), ze = /* @__PURE__ */ m({
|
|
1205
1205
|
name: "UIProvider",
|
|
1206
1206
|
props: { i18n: Function },
|
|
1207
1207
|
setup(e, { slots: n }) {
|
|
1208
|
-
return
|
|
1208
|
+
return v(t, S(e, "i18n")), () => n.default();
|
|
1209
1209
|
}
|
|
1210
1210
|
});
|
|
1211
|
-
export { AppAccount, AppAppearance, AppBreadcrumb, AppContent, AppFooter, AppFullscreen, AppHeader, AppLanguage, AppLayout, AppLogo, AppMenu, AppMultiTabs, AppNotification, AppSidebar, AppTenant, SpinDirectiveProvider, TooltipDirectiveProvider, UIProvider, vSpin, vTooltip };
|
|
1211
|
+
export { he as AppAccount, ge as AppAppearance, ve as AppBreadcrumb, De as AppContent, Oe as AppFooter, ye as AppFullscreen, Te as AppHeader, be as AppLanguage, we as AppLayout, Z as AppLogo, Ae as AppMenu, Fe as AppMultiTabs, Ie as AppNotification, Ee as AppSidebar, Re as AppTenant, u as SpinDirectiveProvider, l as TooltipDirectiveProvider, ze as UIProvider, c as vSpin, s as vTooltip };
|