@huyooo/ui 2.0.8 → 2.0.10
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/{AuthkitAppSetting-eXw1JiyT.js → AuthkitAppSetting-DoC2RJh7.js} +1 -1
- package/dist/{Contact-C5T90358.js → Contact-EqPBWd-E.js} +86 -86
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-B3CA1z6v.js → FeedbackModal.vue_vue_type_script_setup_true_lang-hveEkBb4.js} +1 -1
- package/dist/{LandingPageLinkGroup-BZJ48Yss.js → LandingPageLinkGroup-C4iHX7Hz.js} +70 -65
- package/dist/{LandingPageSectionTabs-jRjkWlM-.js → LandingPageSectionTabs-BT08gT7_.js} +357 -357
- package/dist/{LegalDocViewer-Dxl4FngI.js → LegalDocViewer-DBr0x1ZE.js} +426 -410
- package/dist/{Logo-D7fyXyB-.js → Logo-B9DFBxDU.js} +1 -1
- package/dist/{ReferrerReferees-D4VEC8QJ.js → ReferrerReferees-CGrH-gYJ.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BdibAudA.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js} +195 -211
- package/dist/WidthContainer-Clc_WxY_.js +706 -0
- package/dist/authkit.js +3 -3
- package/dist/common.js +2 -2
- package/dist/components/Gradientbackground.vue.d.ts +1 -1
- package/dist/components/UserMenu/UserMenu.vue.d.ts +2 -2
- package/dist/composables/Authkit/useAppBrand.d.ts +7 -0
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
- package/dist/composables.d.ts +1 -0
- package/dist/composables.js +36 -35
- package/dist/feedback.js +1 -1
- package/dist/landingPage.js +3 -3
- package/dist/main.js +234 -233
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/useAuthkitUsersProfile-8FzLTfUJ.js +55 -0
- package/dist/useRoutePermission-DYPZgvYv.js +247 -0
- package/dist/user.js +1 -1
- package/dist/utils/copyright.d.ts +1 -0
- package/package.json +1 -1
- package/dist/WidthContainer-AZl-9MdF.js +0 -717
- package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +0 -7
- package/dist/useAuthkitUsersProfile-CTd6PP-a.js +0 -50
- package/dist/useRoutePermission-B_g-WmDZ.js +0 -226
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import "./userMenuModal-D-nDaYqM.js";
|
|
3
|
+
import { defineComponent as P, ref as A, watch as N, openBlock as n, createElementBlock as s, createElementVNode as a, createVNode as r, unref as u, withCtx as B, createTextVNode as H, renderSlot as W, toDisplayString as T, createCommentVNode as x, onMounted as F, onBeforeUnmount as J, normalizeClass as M, Fragment as L, renderList as D, createBlock as Q, Teleport as ge, nextTick as j, computed as U, normalizeStyle as O } from "vue";
|
|
4
|
+
import { Spin as X } from "@arco-design/web-vue";
|
|
5
|
+
import { u as Y } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
6
|
+
import "./apiClients-Ctcq8NZs.js";
|
|
7
|
+
import { u as ye } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
8
|
+
import { s as be, a as ke } from "./runtime-Dp7MgwhI.js";
|
|
9
|
+
import "@vafast/api-client";
|
|
10
|
+
import "./useAuthkitUsersProfile-8FzLTfUJ.js";
|
|
11
|
+
import { useRouter as Z, useRoute as ee } from "vue-router";
|
|
12
|
+
import { b as te, c as ne, f as oe, w as se, a as ae, d as re } from "./useRoutePermission-DYPZgvYv.js";
|
|
13
|
+
import "@unhead/vue";
|
|
14
|
+
import "./useUserMenu-ClPBlvaM.js";
|
|
15
|
+
import { c as ie, h as ue, k as le, _ as ce, f as de, j as me, d as pe, g as R, U as we, i as he } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js";
|
|
16
|
+
import "./PaySubscriptions-Bv6LQ_Pf.js";
|
|
17
|
+
/* empty css */
|
|
18
|
+
/* empty css */
|
|
19
|
+
import { M as $e } from "./Menu-uCexrsKP.js";
|
|
20
|
+
import "./CollapseItem-DUzZA6tx.js";
|
|
21
|
+
/* empty css */
|
|
22
|
+
/* empty css */
|
|
23
|
+
import "./index-Cn6LcfZO.js";
|
|
24
|
+
/* empty css */
|
|
25
|
+
import "./CustomTable-HDwqEcmB.js";
|
|
26
|
+
import "@vueuse/core";
|
|
27
|
+
import "./index-D56hUMeD.js";
|
|
28
|
+
import { Icon as z } from "@iconify/vue";
|
|
29
|
+
import { L as fe } from "./Logo-B9DFBxDU.js";
|
|
30
|
+
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
31
|
+
const Ce = {
|
|
32
|
+
class: "SidebarCom"
|
|
33
|
+
}, Me = {
|
|
34
|
+
class: "LogoContent"
|
|
35
|
+
}, Te = {
|
|
36
|
+
class: "MenuContent"
|
|
37
|
+
}, Se = {
|
|
38
|
+
class: "sidebar-footer"
|
|
39
|
+
}, Ie = /* @__PURE__ */ P({
|
|
40
|
+
__name: "AppSidebar",
|
|
41
|
+
props: {
|
|
42
|
+
menuType: {
|
|
43
|
+
default: "system"
|
|
44
|
+
},
|
|
45
|
+
showUserPanel: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
setup(p) {
|
|
51
|
+
const e = p, {
|
|
52
|
+
brandLogoUrl: m,
|
|
53
|
+
brandName: h,
|
|
54
|
+
navigateToAppHome: l
|
|
55
|
+
} = te(), {
|
|
56
|
+
signOut: f
|
|
57
|
+
} = Y(), {
|
|
58
|
+
menus: _
|
|
59
|
+
} = ne(e.menuType), b = Z();
|
|
60
|
+
async function $() {
|
|
61
|
+
await f(), l();
|
|
62
|
+
}
|
|
63
|
+
const y = ee(), w = A([""]);
|
|
64
|
+
function C(t) {
|
|
65
|
+
const i = t.path;
|
|
66
|
+
se(() => {
|
|
67
|
+
b.push({
|
|
68
|
+
path: i,
|
|
69
|
+
query: y.query
|
|
70
|
+
}), w.value = [i], window.scrollTo({
|
|
71
|
+
top: 0,
|
|
72
|
+
behavior: "smooth"
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return N(() => [y.path, _.value], () => {
|
|
77
|
+
const t = oe(_.value, y.path, {
|
|
78
|
+
// Sidebar 中,子路由应该选中子菜单项
|
|
79
|
+
returnParentOnChildMatch: !1,
|
|
80
|
+
// 后备查找函数
|
|
81
|
+
fallback: (i) => ae(y.matched, e.menuType, i)
|
|
82
|
+
});
|
|
83
|
+
t && (w.value = [t]);
|
|
84
|
+
}, {
|
|
85
|
+
immediate: !0,
|
|
86
|
+
deep: !0
|
|
87
|
+
}), (t, i) => (n(), s("div", Ce, [a("div", Me, [r(u(fe), {
|
|
88
|
+
icon: u(m),
|
|
89
|
+
name: u(h),
|
|
90
|
+
onTo: u(l)
|
|
91
|
+
}, null, 8, ["icon", "name", "onTo"])]), a("div", Te, [r($e, {
|
|
92
|
+
"selected-keys": w.value,
|
|
93
|
+
"onUpdate:selectedKeys": i[0] || (i[0] = (d) => w.value = d),
|
|
94
|
+
menus: u(_),
|
|
95
|
+
onChange: C
|
|
96
|
+
}, null, 8, ["selected-keys", "menus"])]), a("div", Se, [r(u(ie), {
|
|
97
|
+
position: "tr",
|
|
98
|
+
"dropdown-offset-y": "30px"
|
|
99
|
+
}, {
|
|
100
|
+
trigger: B(() => [r(u(we))]),
|
|
101
|
+
items: B(() => [r(u(ue)), r(u(le)), r(u(ce)), r(u(de)), r(u(me)), r(u(pe)), r(u(R), {
|
|
102
|
+
icon: "lucide:home",
|
|
103
|
+
onClick: u(l)
|
|
104
|
+
}, {
|
|
105
|
+
default: B(() => [...i[1] || (i[1] = [H("主页", -1)])]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["onClick"]), r(u(R), {
|
|
108
|
+
icon: "lucide:log-out",
|
|
109
|
+
danger: "",
|
|
110
|
+
onClick: $
|
|
111
|
+
}, {
|
|
112
|
+
default: B(() => [...i[2] || (i[2] = [H("退出登录", -1)])]),
|
|
113
|
+
_: 1
|
|
114
|
+
})]),
|
|
115
|
+
_: 1
|
|
116
|
+
}), r(u(he))])]));
|
|
117
|
+
}
|
|
118
|
+
}), xe = /* @__PURE__ */ S(Ie, [["__scopeId", "data-v-6d97a54a"]]), Ae = {
|
|
119
|
+
class: "layout"
|
|
120
|
+
}, Pe = {
|
|
121
|
+
class: "leftContent"
|
|
122
|
+
}, Be = {
|
|
123
|
+
class: "content"
|
|
124
|
+
}, Le = {
|
|
125
|
+
class: "contentCenter"
|
|
126
|
+
}, Ue = {
|
|
127
|
+
class: "pages"
|
|
128
|
+
}, He = {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "loading"
|
|
131
|
+
}, Ke = /* @__PURE__ */ P({
|
|
132
|
+
__name: "AppLayout",
|
|
133
|
+
props: {
|
|
134
|
+
menuType: {
|
|
135
|
+
default: "system"
|
|
136
|
+
},
|
|
137
|
+
showUserPanel: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !0
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
setup(p) {
|
|
143
|
+
const e = p, {
|
|
144
|
+
isChecking: m
|
|
145
|
+
} = re();
|
|
146
|
+
return (h, l) => (n(), s("div", Ae, [a("div", Pe, [r(xe, {
|
|
147
|
+
"menu-type": e.menuType,
|
|
148
|
+
"show-user-panel": e.showUserPanel
|
|
149
|
+
}, null, 8, ["menu-type", "show-user-panel"])]), a("div", Be, [a("div", Le, [a("div", Ue, [u(m) ? (n(), s("div", He, [r(u(X), {
|
|
150
|
+
size: 40
|
|
151
|
+
})])) : W(h.$slots, "default", {
|
|
152
|
+
key: 1
|
|
153
|
+
}, void 0, !0)])])])]));
|
|
154
|
+
}
|
|
155
|
+
}), sn = /* @__PURE__ */ S(Ke, [["__scopeId", "data-v-410ad52b"]]), Ee = {
|
|
156
|
+
class: "ContentHead"
|
|
157
|
+
}, De = {
|
|
158
|
+
class: "title"
|
|
159
|
+
}, Re = {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "description"
|
|
162
|
+
}, ze = /* @__PURE__ */ P({
|
|
163
|
+
__name: "ContentHead",
|
|
164
|
+
props: {
|
|
165
|
+
title: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: !0,
|
|
168
|
+
default: () => ""
|
|
169
|
+
},
|
|
170
|
+
description: {
|
|
171
|
+
type: String,
|
|
172
|
+
required: !0,
|
|
173
|
+
default: () => ""
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
setup(p) {
|
|
177
|
+
const e = p;
|
|
178
|
+
return (m, h) => (n(), s("div", Ee, [a("h1", De, T(e.title), 1), e.description ? (n(), s("p", Re, T(e.description), 1)) : x("", !0)]));
|
|
179
|
+
}
|
|
180
|
+
}), an = /* @__PURE__ */ S(ze, [["__scopeId", "data-v-209a7bef"]]), Oe = {
|
|
181
|
+
class: "desktop-menus"
|
|
182
|
+
}, Ne = {
|
|
183
|
+
key: 0,
|
|
184
|
+
class: "header-menu-item"
|
|
185
|
+
}, We = {
|
|
186
|
+
class: "submenu-popup"
|
|
187
|
+
}, Ve = {
|
|
188
|
+
class: "submenu-content"
|
|
189
|
+
}, qe = ["onClick"], Ge = {
|
|
190
|
+
key: 0,
|
|
191
|
+
class: "submenu-item-icon"
|
|
192
|
+
}, je = {
|
|
193
|
+
class: "submenu-item-content"
|
|
194
|
+
}, Fe = {
|
|
195
|
+
class: "submenu-item-title"
|
|
196
|
+
}, Je = {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "submenu-item-description"
|
|
199
|
+
}, Qe = ["onClick"], Xe = ["aria-expanded", "aria-label"], Ye = {
|
|
200
|
+
class: "mobile-menu-content",
|
|
201
|
+
"aria-label": "主导航"
|
|
202
|
+
}, Ze = {
|
|
203
|
+
key: 0,
|
|
204
|
+
class: "mobile-menu-group"
|
|
205
|
+
}, et = ["aria-expanded", "onClick"], tt = {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: "mobile-submenu"
|
|
208
|
+
}, nt = ["onClick"], ot = ["onClick"], st = /* @__PURE__ */ P({
|
|
209
|
+
__name: "HeaderMenus",
|
|
210
|
+
props: {
|
|
211
|
+
menus: {
|
|
212
|
+
type: Array,
|
|
213
|
+
required: !0
|
|
214
|
+
},
|
|
215
|
+
activateKey: {
|
|
216
|
+
type: String,
|
|
217
|
+
required: !0
|
|
218
|
+
},
|
|
219
|
+
theme: {
|
|
220
|
+
type: String,
|
|
221
|
+
default: "light"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
emits: ["change"],
|
|
225
|
+
setup(p, {
|
|
226
|
+
emit: e
|
|
227
|
+
}) {
|
|
228
|
+
const m = p, h = e, l = A(!1), f = A({}), _ = A(null), b = A(null);
|
|
229
|
+
let $ = "";
|
|
230
|
+
function y(o) {
|
|
231
|
+
return Array.from(o.querySelectorAll('button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));
|
|
232
|
+
}
|
|
233
|
+
function w() {
|
|
234
|
+
l.value || ($ = document.body.style.overflow, document.body.style.overflow = "hidden", l.value = !0, j(() => {
|
|
235
|
+
var o;
|
|
236
|
+
return (o = y(b.value ?? document.body)[0]) == null ? void 0 : o.focus();
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
function C() {
|
|
240
|
+
l.value && (l.value = !1, document.body.style.overflow = $, j(() => {
|
|
241
|
+
var o;
|
|
242
|
+
return (o = _.value) == null ? void 0 : o.focus();
|
|
243
|
+
}));
|
|
244
|
+
}
|
|
245
|
+
function t() {
|
|
246
|
+
l.value && (l.value = !1, document.body.style.overflow = $);
|
|
247
|
+
}
|
|
248
|
+
function i() {
|
|
249
|
+
l.value ? C() : w();
|
|
250
|
+
}
|
|
251
|
+
function d(o) {
|
|
252
|
+
h("change", o);
|
|
253
|
+
}
|
|
254
|
+
function I(o) {
|
|
255
|
+
h("change", o), t();
|
|
256
|
+
}
|
|
257
|
+
function K(o) {
|
|
258
|
+
f.value[o] = !f.value[o];
|
|
259
|
+
}
|
|
260
|
+
function E(o) {
|
|
261
|
+
const v = m.activateKey, c = o.path;
|
|
262
|
+
if (v === c || v.startsWith(c + "/"))
|
|
263
|
+
return !0;
|
|
264
|
+
if (o.children && o.children.length > 0) {
|
|
265
|
+
for (const k of o.children)
|
|
266
|
+
if (v === k.path || v.startsWith(k.path + "/"))
|
|
267
|
+
return !0;
|
|
268
|
+
}
|
|
269
|
+
return !1;
|
|
270
|
+
}
|
|
271
|
+
function V(o) {
|
|
272
|
+
const v = m.activateKey, c = o.path;
|
|
273
|
+
return !!(v === c || v.startsWith(c + "/"));
|
|
274
|
+
}
|
|
275
|
+
function _e(o) {
|
|
276
|
+
h("change", o);
|
|
277
|
+
}
|
|
278
|
+
function q(o) {
|
|
279
|
+
o.key === "Escape" && l.value && C();
|
|
280
|
+
}
|
|
281
|
+
function ve(o) {
|
|
282
|
+
if (o.key !== "Tab" || !b.value) return;
|
|
283
|
+
const v = y(b.value);
|
|
284
|
+
if (v.length === 0) return;
|
|
285
|
+
const c = v[0], k = v[v.length - 1];
|
|
286
|
+
o.shiftKey && document.activeElement === c ? (o.preventDefault(), k.focus()) : !o.shiftKey && document.activeElement === k && (o.preventDefault(), c.focus());
|
|
287
|
+
}
|
|
288
|
+
return F(() => document.addEventListener("keydown", q)), J(() => {
|
|
289
|
+
document.removeEventListener("keydown", q), document.body.style.overflow = $;
|
|
290
|
+
}), (o, v) => (n(), s("div", {
|
|
291
|
+
class: M(["HeaderMenus", {
|
|
292
|
+
"HeaderMenus--dark": m.theme === "dark"
|
|
293
|
+
}])
|
|
294
|
+
}, [a("div", Oe, [(n(!0), s(L, null, D(m.menus, (c, k) => (n(), s(L, {
|
|
295
|
+
key: k
|
|
296
|
+
}, [c.children && c.children.length > 0 ? (n(), s("div", Ne, [a("div", {
|
|
297
|
+
class: M(["headerLink hasChildren", {
|
|
298
|
+
activate: E(c)
|
|
299
|
+
}])
|
|
300
|
+
}, [H(T(c.name) + " ", 1), r(u(z), {
|
|
301
|
+
icon: "mingcute:down-line",
|
|
302
|
+
class: "dropdown-arrow"
|
|
303
|
+
})], 2), a("div", We, [a("div", Ve, [(n(!0), s(L, null, D(c.children, (g, G) => (n(), s("div", {
|
|
304
|
+
key: G,
|
|
305
|
+
class: M(["submenu-item", {
|
|
306
|
+
active: V(g)
|
|
307
|
+
}]),
|
|
308
|
+
onClick: (St) => d(g)
|
|
309
|
+
}, [g.icon ? (n(), s("div", Ge, [r(u(z), {
|
|
310
|
+
icon: g.icon
|
|
311
|
+
}, null, 8, ["icon"])])) : x("", !0), a("div", je, [a("div", Fe, T(g.name), 1), g.description ? (n(), s("div", Je, T(g.description), 1)) : x("", !0)])], 10, qe))), 128))])])])) : (n(), s("div", {
|
|
312
|
+
key: 1,
|
|
313
|
+
class: M(["headerLink", {
|
|
314
|
+
activate: E(c)
|
|
315
|
+
}]),
|
|
316
|
+
onClick: (g) => _e(c)
|
|
317
|
+
}, T(c.name), 11, Qe))], 64))), 128))]), a("button", {
|
|
318
|
+
ref_key: "menuToggleRef",
|
|
319
|
+
ref: _,
|
|
320
|
+
type: "button",
|
|
321
|
+
class: M(["mobile-menu-toggle", {
|
|
322
|
+
active: l.value
|
|
323
|
+
}]),
|
|
324
|
+
"aria-expanded": l.value,
|
|
325
|
+
"aria-controls": "site-mobile-menu",
|
|
326
|
+
"aria-label": l.value ? "关闭导航菜单" : "打开导航菜单",
|
|
327
|
+
onClick: i
|
|
328
|
+
}, [...v[0] || (v[0] = [a("span", {
|
|
329
|
+
class: "hamburger-line"
|
|
330
|
+
}, null, -1), a("span", {
|
|
331
|
+
class: "hamburger-line"
|
|
332
|
+
}, null, -1), a("span", {
|
|
333
|
+
class: "hamburger-line"
|
|
334
|
+
}, null, -1)])], 10, Xe), (n(), Q(ge, {
|
|
335
|
+
to: "body"
|
|
336
|
+
}, [l.value ? (n(), s("div", {
|
|
337
|
+
key: 0,
|
|
338
|
+
class: "mobile-menu-overlay",
|
|
339
|
+
"aria-hidden": "true",
|
|
340
|
+
onClick: C
|
|
341
|
+
})) : x("", !0), l.value ? (n(), s("div", {
|
|
342
|
+
key: 1,
|
|
343
|
+
id: "site-mobile-menu",
|
|
344
|
+
ref_key: "mobileMenuRef",
|
|
345
|
+
ref: b,
|
|
346
|
+
class: "mobile-menu",
|
|
347
|
+
role: "dialog",
|
|
348
|
+
"aria-label": "移动导航",
|
|
349
|
+
"aria-modal": "true",
|
|
350
|
+
onKeydown: ve
|
|
351
|
+
}, [a("nav", Ye, [(n(!0), s(L, null, D(m.menus, (c, k) => (n(), s(L, {
|
|
352
|
+
key: c.path
|
|
353
|
+
}, [c.children && c.children.length > 0 ? (n(), s("div", Ze, [a("button", {
|
|
354
|
+
type: "button",
|
|
355
|
+
class: M(["mobile-menu-item mobile-menu-item-header", {
|
|
356
|
+
activate: E(c)
|
|
357
|
+
}]),
|
|
358
|
+
"aria-expanded": f.value[k] ?? !1,
|
|
359
|
+
onClick: (g) => K(k)
|
|
360
|
+
}, [a("span", null, T(c.name), 1), r(u(z), {
|
|
361
|
+
icon: f.value[k] ? "mingcute:up-line" : "mingcute:down-line",
|
|
362
|
+
class: "mobile-submenu-arrow"
|
|
363
|
+
}, null, 8, ["icon"])], 10, et), f.value[k] ? (n(), s("div", tt, [(n(!0), s(L, null, D(c.children, (g) => (n(), s("button", {
|
|
364
|
+
key: g.path,
|
|
365
|
+
type: "button",
|
|
366
|
+
class: M(["mobile-submenu-item", {
|
|
367
|
+
active: V(g)
|
|
368
|
+
}]),
|
|
369
|
+
onClick: (G) => I(g)
|
|
370
|
+
}, T(g.name), 11, nt))), 128))])) : x("", !0)])) : (n(), s("button", {
|
|
371
|
+
key: 1,
|
|
372
|
+
type: "button",
|
|
373
|
+
class: M(["mobile-menu-item", {
|
|
374
|
+
activate: E(c)
|
|
375
|
+
}]),
|
|
376
|
+
onClick: (g) => I(c)
|
|
377
|
+
}, T(c.name), 11, ot))], 64))), 128))])], 544)) : x("", !0)]))], 2));
|
|
378
|
+
}
|
|
379
|
+
}), at = /* @__PURE__ */ S(st, [["__scopeId", "data-v-884ca88b"]]), rt = {
|
|
380
|
+
class: "HeaderCom"
|
|
381
|
+
}, it = {
|
|
382
|
+
class: "HeaderCom-inner"
|
|
383
|
+
}, ut = {
|
|
384
|
+
class: "left"
|
|
385
|
+
}, lt = {
|
|
386
|
+
class: "right"
|
|
387
|
+
}, ct = ["aria-label"], dt = {
|
|
388
|
+
key: 0,
|
|
389
|
+
class: "theme-icon",
|
|
390
|
+
"aria-hidden": "true"
|
|
391
|
+
}, mt = {
|
|
392
|
+
key: 1,
|
|
393
|
+
class: "theme-icon",
|
|
394
|
+
"aria-hidden": "true"
|
|
395
|
+
}, pt = /* @__PURE__ */ P({
|
|
396
|
+
__name: "Header",
|
|
397
|
+
props: {
|
|
398
|
+
menuType: {
|
|
399
|
+
default: "header"
|
|
400
|
+
},
|
|
401
|
+
showUserPanel: {
|
|
402
|
+
type: Boolean,
|
|
403
|
+
default: !0
|
|
404
|
+
},
|
|
405
|
+
showThemeToggle: {
|
|
406
|
+
type: Boolean,
|
|
407
|
+
default: !0
|
|
408
|
+
},
|
|
409
|
+
theme: {
|
|
410
|
+
default: "light"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
setup(p) {
|
|
414
|
+
const e = p, {
|
|
415
|
+
brandLogoUrl: m,
|
|
416
|
+
brandName: h,
|
|
417
|
+
navigateToAppHome: l
|
|
418
|
+
} = te(), {
|
|
419
|
+
signOut: f
|
|
420
|
+
} = Y(), {
|
|
421
|
+
menus: _
|
|
422
|
+
} = ne(e.menuType), b = A(""), $ = Z(), y = ee();
|
|
423
|
+
async function w() {
|
|
424
|
+
await f(), l();
|
|
425
|
+
}
|
|
426
|
+
function C(i) {
|
|
427
|
+
const d = i.path;
|
|
428
|
+
se(() => {
|
|
429
|
+
$.push(d), b.value = d, window.scrollTo({
|
|
430
|
+
top: 0,
|
|
431
|
+
behavior: "smooth"
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
function t() {
|
|
436
|
+
be(e.theme === "dark" ? "light" : "dark");
|
|
437
|
+
}
|
|
438
|
+
return N(() => [y.path, _.value], () => {
|
|
439
|
+
b.value = oe(_.value, y.path, {
|
|
440
|
+
// Header 中,子菜单匹配时返回父菜单路径
|
|
441
|
+
returnParentOnChildMatch: !0,
|
|
442
|
+
// 后备查找函数
|
|
443
|
+
fallback: (i) => ae(y.matched, e.menuType, i)
|
|
444
|
+
});
|
|
445
|
+
}, {
|
|
446
|
+
immediate: !0,
|
|
447
|
+
deep: !0
|
|
448
|
+
}), (i, d) => (n(), s("header", rt, [a("div", it, [a("div", ut, [r(fe, {
|
|
449
|
+
icon: u(m),
|
|
450
|
+
name: u(h),
|
|
451
|
+
onTo: u(l)
|
|
452
|
+
}, null, 8, ["icon", "name", "onTo"])]), a("div", lt, [r(at, {
|
|
453
|
+
menus: u(_),
|
|
454
|
+
activateKey: b.value,
|
|
455
|
+
theme: e.theme,
|
|
456
|
+
onChange: C
|
|
457
|
+
}, null, 8, ["menus", "activateKey", "theme"]), e.showThemeToggle ? (n(), s("button", {
|
|
458
|
+
key: 0,
|
|
459
|
+
type: "button",
|
|
460
|
+
class: "theme-toggle",
|
|
461
|
+
"aria-label": e.theme === "dark" ? "切换为浅色" : "切换为深色",
|
|
462
|
+
onClick: t
|
|
463
|
+
}, [e.theme === "dark" ? (n(), s("span", dt, [...d[0] || (d[0] = [a("svg", {
|
|
464
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
465
|
+
width: "20",
|
|
466
|
+
height: "20",
|
|
467
|
+
viewBox: "0 0 24 24",
|
|
468
|
+
fill: "none",
|
|
469
|
+
stroke: "currentColor",
|
|
470
|
+
"stroke-width": "2",
|
|
471
|
+
"stroke-linecap": "round",
|
|
472
|
+
"stroke-linejoin": "round"
|
|
473
|
+
}, [a("circle", {
|
|
474
|
+
cx: "12",
|
|
475
|
+
cy: "12",
|
|
476
|
+
r: "4"
|
|
477
|
+
}), a("path", {
|
|
478
|
+
d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"
|
|
479
|
+
})], -1)])])) : (n(), s("span", mt, [...d[1] || (d[1] = [a("svg", {
|
|
480
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
481
|
+
width: "20",
|
|
482
|
+
height: "20",
|
|
483
|
+
viewBox: "0 0 24 24",
|
|
484
|
+
fill: "none",
|
|
485
|
+
stroke: "currentColor",
|
|
486
|
+
"stroke-width": "2",
|
|
487
|
+
"stroke-linecap": "round",
|
|
488
|
+
"stroke-linejoin": "round"
|
|
489
|
+
}, [a("path", {
|
|
490
|
+
d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"
|
|
491
|
+
})], -1)])]))], 8, ct)) : x("", !0), e.showUserPanel ? (n(), Q(ie, {
|
|
492
|
+
key: 1
|
|
493
|
+
}, {
|
|
494
|
+
items: B(() => [r(ue), r(le), r(ce), r(de), r(me), r(pe), r(R, {
|
|
495
|
+
icon: "lucide:home",
|
|
496
|
+
onClick: u(l)
|
|
497
|
+
}, {
|
|
498
|
+
default: B(() => [...d[2] || (d[2] = [H("主页", -1)])]),
|
|
499
|
+
_: 1
|
|
500
|
+
}, 8, ["onClick"]), r(R, {
|
|
501
|
+
icon: "lucide:log-out",
|
|
502
|
+
danger: "",
|
|
503
|
+
onClick: w
|
|
504
|
+
}, {
|
|
505
|
+
default: B(() => [...d[3] || (d[3] = [H("退出登录", -1)])]),
|
|
506
|
+
_: 1
|
|
507
|
+
})]),
|
|
508
|
+
_: 1
|
|
509
|
+
})) : x("", !0), r(he)])])]));
|
|
510
|
+
}
|
|
511
|
+
}), ht = /* @__PURE__ */ S(pt, [["__scopeId", "data-v-86f0336c"]]), ft = {
|
|
512
|
+
class: "layout-inner"
|
|
513
|
+
}, _t = {
|
|
514
|
+
key: 0,
|
|
515
|
+
class: "loading"
|
|
516
|
+
}, vt = "none", gt = "var(--huyooo-layout-dark-background)", yt = /* @__PURE__ */ P({
|
|
517
|
+
__name: "DefaultLayout",
|
|
518
|
+
props: {
|
|
519
|
+
menuType: {
|
|
520
|
+
default: "header"
|
|
521
|
+
},
|
|
522
|
+
showUserPanel: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
default: !0
|
|
525
|
+
},
|
|
526
|
+
showThemeToggle: {
|
|
527
|
+
type: Boolean,
|
|
528
|
+
default: !0
|
|
529
|
+
},
|
|
530
|
+
enableRoutePermission: {
|
|
531
|
+
type: Boolean,
|
|
532
|
+
default: !0
|
|
533
|
+
},
|
|
534
|
+
backgroundImage: {
|
|
535
|
+
default: ""
|
|
536
|
+
},
|
|
537
|
+
theme: {
|
|
538
|
+
default: void 0
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
setup(p) {
|
|
542
|
+
var w, C;
|
|
543
|
+
const e = p, {
|
|
544
|
+
appsData: m
|
|
545
|
+
} = ye(), h = A(typeof window < "u" && ((C = (w = window.matchMedia) == null ? void 0 : w.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : C.matches));
|
|
546
|
+
function l() {
|
|
547
|
+
var t, i;
|
|
548
|
+
typeof window > "u" || (h.value = ((i = (t = window.matchMedia) == null ? void 0 : t.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : i.matches) ?? !1);
|
|
549
|
+
}
|
|
550
|
+
let f;
|
|
551
|
+
F(() => {
|
|
552
|
+
var i, d;
|
|
553
|
+
l();
|
|
554
|
+
const t = (i = window.matchMedia) == null ? void 0 : i.call(window, "(prefers-color-scheme: dark)");
|
|
555
|
+
(d = t == null ? void 0 : t.addEventListener) == null || d.call(t, "change", l), f = () => {
|
|
556
|
+
var I;
|
|
557
|
+
return (I = t == null ? void 0 : t.removeEventListener) == null ? void 0 : I.call(t, "change", l);
|
|
558
|
+
};
|
|
559
|
+
});
|
|
560
|
+
const _ = U(() => {
|
|
561
|
+
var I, K;
|
|
562
|
+
const t = e.theme;
|
|
563
|
+
if (t && t !== "system") return t;
|
|
564
|
+
if (t === "system") return h.value ? "dark" : "light";
|
|
565
|
+
const i = ke.value;
|
|
566
|
+
if (i === "dark" || i === "light") return i;
|
|
567
|
+
if (i === "system") return h.value ? "dark" : "light";
|
|
568
|
+
const d = (K = (I = m.value) == null ? void 0 : I.brand) == null ? void 0 : K.theme;
|
|
569
|
+
return d === "dark" || d === "light" ? d : "light";
|
|
570
|
+
}), b = U(() => e.backgroundImage ? e.backgroundImage : _.value === "dark" ? gt : vt), $ = U(() => {
|
|
571
|
+
const t = b.value;
|
|
572
|
+
return !t || t === "none" ? {
|
|
573
|
+
backgroundImage: "none",
|
|
574
|
+
backgroundColor: "transparent"
|
|
575
|
+
} : {
|
|
576
|
+
backgroundImage: t,
|
|
577
|
+
backgroundAttachment: "fixed"
|
|
578
|
+
};
|
|
579
|
+
});
|
|
580
|
+
N(_, (t) => {
|
|
581
|
+
typeof document > "u" || (t === "dark" ? (document.body.setAttribute("arco-theme", "dark"), document.body.classList.add("dark")) : (document.body.removeAttribute("arco-theme"), document.body.classList.remove("dark")));
|
|
582
|
+
}, {
|
|
583
|
+
immediate: !0
|
|
584
|
+
}), J(() => {
|
|
585
|
+
f == null || f();
|
|
586
|
+
});
|
|
587
|
+
const y = e.enableRoutePermission ? re().isChecking : A(!1);
|
|
588
|
+
return (t, i) => (n(), s("div", {
|
|
589
|
+
class: M(["layout", {
|
|
590
|
+
"layout--dark": _.value === "dark"
|
|
591
|
+
}]),
|
|
592
|
+
style: O($.value)
|
|
593
|
+
}, [r(ht, {
|
|
594
|
+
"menu-type": e.menuType,
|
|
595
|
+
"show-user-panel": e.showUserPanel,
|
|
596
|
+
"show-theme-toggle": e.showThemeToggle,
|
|
597
|
+
theme: _.value
|
|
598
|
+
}, null, 8, ["menu-type", "show-user-panel", "show-theme-toggle", "theme"]), a("main", ft, [u(y) ? (n(), s("div", _t, [r(u(X), {
|
|
599
|
+
size: 40
|
|
600
|
+
})])) : W(t.$slots, "default", {
|
|
601
|
+
key: 1
|
|
602
|
+
}, void 0, !0)])], 6));
|
|
603
|
+
}
|
|
604
|
+
}), rn = /* @__PURE__ */ S(yt, [["__scopeId", "data-v-6bfe720c"]]), bt = /* @__PURE__ */ P({
|
|
605
|
+
__name: "Gradientbackground",
|
|
606
|
+
props: {
|
|
607
|
+
width: {
|
|
608
|
+
type: String,
|
|
609
|
+
default: "100%"
|
|
610
|
+
},
|
|
611
|
+
height: {
|
|
612
|
+
type: String,
|
|
613
|
+
default: "100%"
|
|
614
|
+
},
|
|
615
|
+
zIndex: {
|
|
616
|
+
type: String,
|
|
617
|
+
default: "-1"
|
|
618
|
+
},
|
|
619
|
+
top: {
|
|
620
|
+
type: String,
|
|
621
|
+
default: "10%"
|
|
622
|
+
},
|
|
623
|
+
left: {
|
|
624
|
+
type: String,
|
|
625
|
+
default: "0%"
|
|
626
|
+
},
|
|
627
|
+
right: {
|
|
628
|
+
type: String,
|
|
629
|
+
default: "auto"
|
|
630
|
+
},
|
|
631
|
+
blur: {
|
|
632
|
+
type: String,
|
|
633
|
+
default: "0px"
|
|
634
|
+
},
|
|
635
|
+
background: {
|
|
636
|
+
type: String,
|
|
637
|
+
required: !1,
|
|
638
|
+
default: () => "var(--huyooo-gradient-background)"
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
setup(p) {
|
|
642
|
+
const e = p, m = U(() => ({
|
|
643
|
+
pointerEvents: "none",
|
|
644
|
+
position: "absolute",
|
|
645
|
+
zIndex: e.zIndex,
|
|
646
|
+
width: e.width,
|
|
647
|
+
height: e.height,
|
|
648
|
+
filter: `blur(${e.blur})`
|
|
649
|
+
})), h = U(() => ({
|
|
650
|
+
width: "100%",
|
|
651
|
+
height: "100%",
|
|
652
|
+
background: e.background
|
|
653
|
+
}));
|
|
654
|
+
return (l, f) => (n(), s("div", {
|
|
655
|
+
class: "ellipsis",
|
|
656
|
+
style: O(m.value)
|
|
657
|
+
}, [a("div", {
|
|
658
|
+
class: "ellipsis-item",
|
|
659
|
+
style: O(h.value)
|
|
660
|
+
}, null, 4)], 4));
|
|
661
|
+
}
|
|
662
|
+
}), un = /* @__PURE__ */ S(bt, [["__scopeId", "data-v-64c41f65"]]), kt = {
|
|
663
|
+
class: "SvgIcon"
|
|
664
|
+
}, wt = ["href", "fill"], $t = /* @__PURE__ */ P({
|
|
665
|
+
__name: "SvgIcon",
|
|
666
|
+
props: {
|
|
667
|
+
prefix: {
|
|
668
|
+
type: String,
|
|
669
|
+
required: !1,
|
|
670
|
+
default: "icon"
|
|
671
|
+
},
|
|
672
|
+
name: {
|
|
673
|
+
type: String,
|
|
674
|
+
required: !0
|
|
675
|
+
},
|
|
676
|
+
color: {
|
|
677
|
+
type: String,
|
|
678
|
+
required: !1,
|
|
679
|
+
default: "currentColor"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
setup(p) {
|
|
683
|
+
const e = p, m = U(() => `#${e.prefix ?? "icon"}-${e.name}`);
|
|
684
|
+
return (h, l) => (n(), s("svg", kt, [a("use", {
|
|
685
|
+
href: m.value,
|
|
686
|
+
fill: e.color
|
|
687
|
+
}, null, 8, wt)]));
|
|
688
|
+
}
|
|
689
|
+
}), ln = /* @__PURE__ */ S($t, [["__scopeId", "data-v-9d0b08a0"]]), Ct = {}, Mt = {
|
|
690
|
+
class: "WidthContainer"
|
|
691
|
+
};
|
|
692
|
+
function Tt(p, e) {
|
|
693
|
+
return n(), s("div", Mt, [W(p.$slots, "default", {}, void 0, !0)]);
|
|
694
|
+
}
|
|
695
|
+
const cn = /* @__PURE__ */ S(Ct, [["render", Tt], ["__scopeId", "data-v-d06aac1f"]]);
|
|
696
|
+
export {
|
|
697
|
+
sn as A,
|
|
698
|
+
an as C,
|
|
699
|
+
rn as D,
|
|
700
|
+
un as G,
|
|
701
|
+
ht as H,
|
|
702
|
+
ln as S,
|
|
703
|
+
cn as W,
|
|
704
|
+
xe as a,
|
|
705
|
+
at as b
|
|
706
|
+
};
|