@lumal/core 0.0.2-beta → 0.0.4-beta
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/CHANGELOG.md +38 -0
- package/README.md +9 -0
- package/dist/auth.cjs +1 -1
- package/dist/auth.js +13 -29
- package/dist/{components-DVnNb4-n.js → components-B5Xd-iBK.js} +15 -7
- package/dist/components-CRxtQpsQ.cjs +2 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +3 -3
- package/dist/{composables-DrGkFGvy.js → composables-BxZG0_RZ.js} +15 -9
- package/dist/composables-Dsl-todB.cjs +1 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/context-Bdx-ZJbt.js +13 -0
- package/dist/context-CWQ1OO16.cjs +1 -0
- package/dist/core.css +1 -1
- package/dist/createLumalApp-BxQL77Qt.js +38 -0
- package/dist/createLumalApp-C5o7gAlu.cjs +1 -0
- package/dist/{dictionary-CKEqfCLG.js → dictionary-DnRiNaKi.js} +1 -1
- package/dist/{dictionary-BtPCmrLY.cjs → dictionary-Dt70z10M.cjs} +1 -1
- package/dist/dictionary.cjs +1 -1
- package/dist/dictionary.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +37 -80
- package/dist/{layout-CuuRkGBF.js → layout-DQzFKvly.js} +661 -600
- package/dist/layout-zJLDCf1c.cjs +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/minimal.cjs +1 -0
- package/dist/minimal.js +10 -0
- package/dist/{permission-CCkqvnWg.js → permission-CHw9eXd8.js} +24 -34
- package/dist/permission-CoqteYAi.cjs +1 -0
- package/dist/permission.cjs +1 -1
- package/dist/permission.js +4 -3
- package/dist/request.cjs +1 -1
- package/dist/request.js +127 -93
- package/dist/src/app/createLumalAdmin.d.ts +1 -1
- package/dist/src/app/createLumalAdmin.d.ts.map +1 -1
- package/dist/src/app/createLumalApp.d.ts +7 -0
- package/dist/src/app/createLumalApp.d.ts.map +1 -0
- package/dist/src/app/types.d.ts +5 -0
- package/dist/src/app/types.d.ts.map +1 -1
- package/dist/src/auth/createAuthSession.d.ts.map +1 -1
- package/dist/src/components/crud-table/LumalCrudTable.vue.d.ts.map +1 -1
- package/dist/src/components/schema-table/LumalSchemaTable.vue.d.ts.map +1 -1
- package/dist/src/components/schema-table/LumalSchemaTableCell.vue.d.ts.map +1 -1
- package/dist/src/dictionary/store.d.ts.map +1 -1
- package/dist/src/layout/LumalGlobalSearch.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalHeader.vue.d.ts +4 -4
- package/dist/src/layout/LumalHeader.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalLayout.vue.d.ts +6 -2
- package/dist/src/layout/LumalLayout.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalRouterView.vue.d.ts +2 -0
- package/dist/src/layout/LumalRouterView.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalSidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalTabs.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalTopNav.vue.d.ts.map +1 -1
- package/dist/src/layout/LumalTopNavMenuItem.vue.d.ts +1 -0
- package/dist/src/layout/LumalTopNavMenuItem.vue.d.ts.map +1 -1
- package/dist/src/minimal/index.d.ts +5 -0
- package/dist/src/minimal/index.d.ts.map +1 -0
- package/dist/src/request/client.d.ts.map +1 -1
- package/dist/src/request/types.d.ts +12 -4
- package/dist/src/request/types.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/storage.d.ts +2 -0
- package/dist/src/utils/storage.d.ts.map +1 -1
- package/dist/storage-CCBa7Qh8.cjs +1 -0
- package/dist/storage-CorgkMJU.js +41 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +32 -54
- package/package.json +9 -3
- package/theme-chalk/index.scss +1 -0
- package/dist/components-CYwpPqgm.cjs +0 -2
- package/dist/composables-edipbw70.cjs +0 -1
- package/dist/layout-7345ntRV.cjs +0 -1
- package/dist/permission-6sXtjGMS.cjs +0 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { Fragment as t, KeepAlive as n, Teleport as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p,
|
|
3
|
-
import { LumalIcon as
|
|
4
|
-
import { ElAside as
|
|
5
|
-
import { RouterView as
|
|
2
|
+
import { Fragment as t, KeepAlive as n, Teleport as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, h as m, inject as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as ee, onMounted as te, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, useId as A, useModel as j, useTemplateRef as M, vModelText as N, vShow as ne, watch as P, withCtx as F, withDirectives as re, withModifiers as ie } from "vue";
|
|
3
|
+
import { LumalIcon as I } from "@lumal/icons-vue";
|
|
4
|
+
import { ElAside as L, ElButton as R, ElContainer as ae, ElHeader as oe, ElMain as z, ElMenu as B, ElMenuItem as se, ElScrollbar as V, ElSubMenu as H } from "element-plus";
|
|
5
|
+
import { RouterView as ce, routeLocationKey as le, routerKey as ue } from "vue-router";
|
|
6
6
|
import de from "sortablejs";
|
|
7
7
|
//#region src/layout/state/menu-layout.ts
|
|
8
|
-
function H(e, t) {
|
|
9
|
-
return e.hidden ? !1 : e.path === t ? !0 : e.children?.some((e) => H(e, t)) ?? !1;
|
|
10
|
-
}
|
|
11
8
|
function U(e, t) {
|
|
9
|
+
return e.hidden ? !1 : e.path === t ? !0 : e.children?.some((e) => U(e, t)) ?? !1;
|
|
10
|
+
}
|
|
11
|
+
function W(e, t) {
|
|
12
12
|
for (let n of e) {
|
|
13
13
|
if (n.hidden) continue;
|
|
14
14
|
if (n.path === t) return n;
|
|
15
|
-
let e =
|
|
15
|
+
let e = W(n.children ?? [], t);
|
|
16
16
|
if (e) return e;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function G(e, t) {
|
|
20
20
|
for (let n of e) {
|
|
21
21
|
if (n.hidden) continue;
|
|
22
22
|
if (n.path === t) return [n];
|
|
23
|
-
let e =
|
|
23
|
+
let e = G(n.children ?? [], t);
|
|
24
24
|
if (e.length > 0) return [n, ...e];
|
|
25
25
|
}
|
|
26
26
|
return [];
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function K(e) {
|
|
29
29
|
if (!e) return "";
|
|
30
30
|
if (e.redirect) return e.redirect;
|
|
31
31
|
let t = e.children?.filter((e) => !e.hidden) ?? [];
|
|
32
|
-
return t.length === 0 ? e.path :
|
|
32
|
+
return t.length === 0 ? e.path : K(t[0]);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return e.find((e) =>
|
|
34
|
+
function q(e, t) {
|
|
35
|
+
return e.find((e) => U(e, t))?.path ?? "";
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function fe(e) {
|
|
38
38
|
let { activeTopMenuPath: t = "", layout: n } = e, r = e.menus.filter((e) => !e.hidden);
|
|
39
39
|
return n === "sidebar-nav" ? {
|
|
40
40
|
sidebarMenus: r,
|
|
@@ -43,17 +43,17 @@ function G(e) {
|
|
|
43
43
|
sidebarMenus: [],
|
|
44
44
|
topMenus: r
|
|
45
45
|
} : {
|
|
46
|
-
sidebarMenus: (r.find((e) => e.path === t) ?? r.find((e) =>
|
|
46
|
+
sidebarMenus: (r.find((e) => e.path === t) ?? r.find((e) => U(e, t)))?.children?.filter((e) => !e.hidden) ?? [],
|
|
47
47
|
topMenus: r
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/layout/LumalBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
52
|
-
var
|
|
52
|
+
var pe = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "lumal-breadcrumb",
|
|
55
55
|
"aria-label": "面包屑"
|
|
56
|
-
},
|
|
56
|
+
}, J = { class: "lumal-breadcrumb__list" }, me = {
|
|
57
57
|
key: 1,
|
|
58
58
|
class: "lumal-breadcrumb__current",
|
|
59
59
|
"aria-current": "page"
|
|
@@ -80,7 +80,7 @@ var K = {
|
|
|
80
80
|
},
|
|
81
81
|
emits: ["select"],
|
|
82
82
|
setup(e, { emit: n }) {
|
|
83
|
-
let r = e, i = n, a =
|
|
83
|
+
let r = e, i = n, a = h(le, void 0);
|
|
84
84
|
function d(e) {
|
|
85
85
|
return {
|
|
86
86
|
icon: e.icon,
|
|
@@ -101,71 +101,71 @@ var K = {
|
|
|
101
101
|
}];
|
|
102
102
|
});
|
|
103
103
|
}), p = o(() => {
|
|
104
|
-
let e =
|
|
104
|
+
let e = G(r.menus, r.activePath), t = (e.length > 0 ? e : G(r.menus, r.activeMenuPath)).map(d), n = typeof a?.meta.title == "string" ? a.meta.title : "", i = typeof a?.meta.icon == "string" ? a.meta.icon : void 0, o = a?.meta.hideInBreadcrumb === !0;
|
|
105
105
|
return o && t.at(-1)?.path === r.activePath && t.pop(), n && !o && r.activePath && r.activePath === a?.path && !t.some((e) => e.path === r.activePath) && t.push({
|
|
106
106
|
icon: i,
|
|
107
107
|
path: r.activePath,
|
|
108
108
|
title: n
|
|
109
109
|
}), t;
|
|
110
|
-
}),
|
|
111
|
-
let e = r.homePath ?
|
|
110
|
+
}), m = o(() => f.value.length > 0 ? f.value : p.value), g = o(() => {
|
|
111
|
+
let e = r.homePath ? G(r.menus, r.homePath).at(-1) : void 0, t = r.menus.find((e) => !e.hidden), n = r.homePath || K(t);
|
|
112
112
|
if (n) return {
|
|
113
113
|
icon: e?.icon ?? t?.icon,
|
|
114
114
|
path: n,
|
|
115
115
|
title: e?.title ?? r.homeTitle
|
|
116
116
|
};
|
|
117
117
|
}), _ = o(() => {
|
|
118
|
-
let e = [...
|
|
118
|
+
let e = [...m.value], t = g.value;
|
|
119
119
|
return r.showHome && t && !e.some((e) => e.path === t.path) && e.unshift(t), e;
|
|
120
|
-
}), v = o(() => _.value.length > 0 && !(r.hideOnlyOne &&
|
|
121
|
-
return (n, r) => v.value ? (
|
|
120
|
+
}), v = o(() => _.value.length > 0 && !(r.hideOnlyOne && m.value.length <= 1));
|
|
121
|
+
return (n, r) => v.value ? (x(), l("nav", pe, [u("ol", J, [(x(!0), l(t, null, C(_.value, (t, n) => (x(), l("li", {
|
|
122
122
|
key: `${t.path}:${n}`,
|
|
123
123
|
class: "lumal-breadcrumb__item"
|
|
124
|
-
}, [n > 0 ? (
|
|
124
|
+
}, [n > 0 ? (x(), s(k(I), {
|
|
125
125
|
key: 0,
|
|
126
126
|
class: "lumal-breadcrumb__separator",
|
|
127
127
|
name: "lumal:chevron-right",
|
|
128
128
|
size: 14
|
|
129
|
-
})) : c("", !0), n === _.value.length - 1 ? (
|
|
129
|
+
})) : c("", !0), n === _.value.length - 1 ? (x(), l("span", me, [e.showIcon && t.icon ? (x(), s(k(I), {
|
|
130
130
|
key: 0,
|
|
131
131
|
name: t.icon,
|
|
132
132
|
size: 15
|
|
133
|
-
}, null, 8, ["name"])) : c("", !0), u("span", null,
|
|
133
|
+
}, null, 8, ["name"])) : c("", !0), u("span", null, O(t.title), 1)])) : (x(), l("button", {
|
|
134
134
|
key: 2,
|
|
135
135
|
class: "lumal-breadcrumb__link",
|
|
136
136
|
type: "button",
|
|
137
137
|
onClick: (e) => i("select", t.path)
|
|
138
|
-
}, [e.showIcon && t.icon ? (
|
|
138
|
+
}, [e.showIcon && t.icon ? (x(), s(k(I), {
|
|
139
139
|
key: 0,
|
|
140
140
|
name: t.icon,
|
|
141
141
|
size: 15
|
|
142
|
-
}, null, 8, ["name"])) : c("", !0), u("span", null,
|
|
142
|
+
}, null, 8, ["name"])) : c("", !0), u("span", null, O(t.title), 1)], 8, he))]))), 128))])])) : c("", !0);
|
|
143
143
|
}
|
|
144
144
|
}), [["__scopeId", "data-v-53a036d9"]]), _e = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
145
145
|
__name: "LumalContent",
|
|
146
146
|
setup(e, { expose: t }) {
|
|
147
|
-
let n =
|
|
147
|
+
let n = M("contentRef");
|
|
148
148
|
return t({
|
|
149
149
|
getContentElement: () => n.value?.$el,
|
|
150
150
|
getContentInstance: () => n.value
|
|
151
|
-
}), (e, t) => (
|
|
151
|
+
}), (e, t) => (x(), s(k(z), {
|
|
152
152
|
ref_key: "contentRef",
|
|
153
153
|
ref: n,
|
|
154
154
|
class: "lumal-content"
|
|
155
155
|
}, {
|
|
156
|
-
default:
|
|
156
|
+
default: F(() => [w(e.$slots, "default", {}, void 0, !0)]),
|
|
157
157
|
_: 3
|
|
158
158
|
}, 512));
|
|
159
159
|
}
|
|
160
|
-
}), [["__scopeId", "data-v-a0d6361c"]]), ve = { class: "lumal-global-search" },
|
|
160
|
+
}), [["__scopeId", "data-v-a0d6361c"]]), ve = { class: "lumal-global-search" }, Y = { key: 0 }, ye = ["aria-labelledby"], be = { class: "lumal-global-search__header" }, xe = ["id"], X = { class: "lumal-global-search__input-wrap" }, Se = [
|
|
161
161
|
"aria-activedescendant",
|
|
162
162
|
"aria-controls",
|
|
163
163
|
"placeholder"
|
|
164
|
-
],
|
|
164
|
+
], Z = ["id"], Ce = ["id", "aria-selected"], we = ["onMouseenter", "onClick"], Te = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "lumal-global-search__empty",
|
|
167
167
|
role: "status"
|
|
168
|
-
},
|
|
168
|
+
}, Ee = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
169
169
|
__name: "LumalGlobalSearch",
|
|
170
170
|
props: {
|
|
171
171
|
maxResults: { default: 12 },
|
|
@@ -178,101 +178,116 @@ var K = {
|
|
|
178
178
|
},
|
|
179
179
|
emits: ["select"],
|
|
180
180
|
setup(e, { expose: n, emit: i }) {
|
|
181
|
-
let a = e, d = i, p = `lumal-global-search-${
|
|
182
|
-
function
|
|
181
|
+
let a = e, d = i, p = `lumal-global-search-${A()}`, m = M("inputRef"), h = M("triggerRef"), g = M("dialogRef"), _ = S(!1), b = S(""), w = S(0), T;
|
|
182
|
+
function E(e, t = []) {
|
|
183
183
|
return e.flatMap((e) => {
|
|
184
184
|
if (e.hidden) return [];
|
|
185
185
|
let n = [...t, e.title];
|
|
186
186
|
return [{
|
|
187
187
|
item: e,
|
|
188
188
|
trail: n
|
|
189
|
-
}, ...
|
|
189
|
+
}, ...E(e.children ?? [], n)];
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
let
|
|
193
|
-
let e =
|
|
194
|
-
return (e ?
|
|
195
|
-
}), ne = o(() =>
|
|
196
|
-
function
|
|
197
|
-
|
|
192
|
+
let D = o(() => E(a.menus)), j = o(() => {
|
|
193
|
+
let e = b.value.trim().toLocaleLowerCase();
|
|
194
|
+
return (e ? D.value.filter(({ item: t, trail: n }) => `${n.join(" ")} ${t.path}`.toLocaleLowerCase().includes(e)) : D.value).slice(0, Math.max(1, a.maxResults));
|
|
195
|
+
}), ne = o(() => j.value[w.value] ? `${p}-option-${w.value}` : void 0);
|
|
196
|
+
function F() {
|
|
197
|
+
_.value || (T = document.activeElement instanceof HTMLElement ? document.activeElement : void 0, _.value = !0, b.value = "", w.value = 0, v(() => m.value?.focus()));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
199
|
+
function L(e = !0) {
|
|
200
|
+
_.value = !1, document.removeEventListener("focusin", R), e && v(() => {
|
|
201
|
+
_.value || (T?.isConnected ? T : h.value)?.focus();
|
|
202
|
+
});
|
|
201
203
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
+
function R(e) {
|
|
205
|
+
_.value && g.value && !g.value.contains(e.target) && m.value?.focus();
|
|
204
206
|
}
|
|
205
|
-
function
|
|
207
|
+
function ae(e) {
|
|
208
|
+
if (e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), L()), e.key !== "Tab") return;
|
|
209
|
+
let t = [...g.value?.querySelectorAll("button, input, [tabindex]") ?? []].filter((e) => e.tabIndex >= 0 && !e.matches(":disabled") && !e.closest("[hidden], [inert]")), n = t[0], r = t.at(-1);
|
|
210
|
+
(!n || (e.shiftKey ? document.activeElement === n : document.activeElement === r)) && (e.preventDefault(), (e.shiftKey ? r : n)?.focus());
|
|
211
|
+
}
|
|
212
|
+
function oe(e) {
|
|
213
|
+
e && (d("select", e.item.path, e.item), L());
|
|
214
|
+
}
|
|
215
|
+
function z(e) {
|
|
206
216
|
if (e.key === "Escape") {
|
|
207
|
-
e.preventDefault(),
|
|
217
|
+
e.preventDefault(), L();
|
|
208
218
|
return;
|
|
209
219
|
}
|
|
210
|
-
if (
|
|
220
|
+
if (j.value.length !== 0) {
|
|
211
221
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
212
222
|
e.preventDefault();
|
|
213
223
|
let t = e.key === "ArrowDown" ? 1 : -1;
|
|
214
|
-
|
|
224
|
+
w.value = (w.value + t + j.value.length) % j.value.length;
|
|
215
225
|
return;
|
|
216
226
|
}
|
|
217
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
227
|
+
e.key === "Enter" && (e.preventDefault(), oe(j.value[w.value]));
|
|
218
228
|
}
|
|
219
229
|
}
|
|
220
|
-
function
|
|
221
|
-
!a.shortcut || e.altKey || e.shiftKey || e.key.toLocaleLowerCase() !== "k" || !e.ctrlKey && !e.metaKey || (e.preventDefault(),
|
|
230
|
+
function B(e) {
|
|
231
|
+
!a.shortcut || e.altKey || e.shiftKey || e.key.toLocaleLowerCase() !== "k" || !e.ctrlKey && !e.metaKey || (e.preventDefault(), _.value ? L() : F());
|
|
222
232
|
}
|
|
223
|
-
return
|
|
224
|
-
|
|
233
|
+
return P(j, () => {
|
|
234
|
+
w.value = 0;
|
|
235
|
+
}), P(_, (e) => {
|
|
236
|
+
e ? document.addEventListener("focusin", R) : document.removeEventListener("focusin", R);
|
|
225
237
|
}), te(() => {
|
|
226
|
-
window.addEventListener("keydown",
|
|
238
|
+
window.addEventListener("keydown", B);
|
|
227
239
|
}), ee(() => {
|
|
228
|
-
window.removeEventListener("keydown",
|
|
240
|
+
window.removeEventListener("keydown", B), document.removeEventListener("focusin", R), _.value && T?.isConnected && T.focus();
|
|
229
241
|
}), n({
|
|
230
|
-
close:
|
|
231
|
-
open:
|
|
232
|
-
}), (n, i) => (
|
|
242
|
+
close: L,
|
|
243
|
+
open: F
|
|
244
|
+
}), (n, i) => (x(), l("div", ve, [u("button", {
|
|
233
245
|
ref_key: "triggerRef",
|
|
234
246
|
ref: h,
|
|
235
247
|
class: "lumal-global-search__trigger",
|
|
236
248
|
type: "button",
|
|
237
249
|
"aria-label": "打开全局搜索",
|
|
238
250
|
title: "全局搜索",
|
|
239
|
-
onClick:
|
|
251
|
+
onClick: F
|
|
240
252
|
}, [
|
|
241
|
-
f(
|
|
242
|
-
|
|
253
|
+
f(k(I), {
|
|
254
|
+
name: "lumal:search",
|
|
243
255
|
size: 17
|
|
244
256
|
}),
|
|
245
257
|
i[3] ||= u("span", { class: "lumal-global-search__trigger-label" }, "搜索", -1),
|
|
246
|
-
e.shortcut ? (
|
|
247
|
-
], 512), (
|
|
258
|
+
e.shortcut ? (x(), l("kbd", Y, "Ctrl K")) : c("", !0)
|
|
259
|
+
], 512), (x(), s(r, { to: "body" }, [_.value ? (x(), l("div", {
|
|
248
260
|
key: 0,
|
|
249
261
|
class: "lumal-global-search__backdrop",
|
|
250
|
-
onMousedown: i[2] ||=
|
|
262
|
+
onMousedown: i[2] ||= ie((e) => L(), ["self"])
|
|
251
263
|
}, [u("section", {
|
|
264
|
+
ref_key: "dialogRef",
|
|
265
|
+
ref: g,
|
|
252
266
|
class: "lumal-global-search__dialog",
|
|
253
267
|
role: "dialog",
|
|
254
268
|
"aria-modal": "true",
|
|
255
|
-
"aria-labelledby": `${p}-title
|
|
269
|
+
"aria-labelledby": `${p}-title`,
|
|
270
|
+
onKeydown: ae
|
|
256
271
|
}, [
|
|
257
272
|
u("header", be, [u("h2", { id: `${p}-title` }, " 全局搜索 ", 8, xe), u("button", {
|
|
258
273
|
type: "button",
|
|
259
274
|
"aria-label": "关闭全局搜索",
|
|
260
275
|
title: "关闭",
|
|
261
|
-
onClick: i[0] ||= (e) =>
|
|
262
|
-
}, [f(
|
|
276
|
+
onClick: i[0] ||= (e) => L()
|
|
277
|
+
}, [f(k(I), {
|
|
263
278
|
name: "lumal:close",
|
|
264
279
|
size: 17
|
|
265
280
|
})])]),
|
|
266
|
-
u("label",
|
|
281
|
+
u("label", X, [
|
|
267
282
|
i[4] ||= u("span", { class: "lumal-global-search__sr-only" }, "搜索菜单", -1),
|
|
268
|
-
f(
|
|
269
|
-
|
|
283
|
+
f(k(I), {
|
|
284
|
+
name: "lumal:search",
|
|
270
285
|
size: 18
|
|
271
286
|
}),
|
|
272
|
-
|
|
287
|
+
re(u("input", {
|
|
273
288
|
ref_key: "inputRef",
|
|
274
289
|
ref: m,
|
|
275
|
-
"onUpdate:modelValue": i[1] ||= (e) =>
|
|
290
|
+
"onUpdate:modelValue": i[1] ||= (e) => b.value = e,
|
|
276
291
|
role: "combobox",
|
|
277
292
|
autocomplete: "off",
|
|
278
293
|
"aria-activedescendant": ne.value,
|
|
@@ -280,46 +295,46 @@ var K = {
|
|
|
280
295
|
"aria-controls": `${p}-results`,
|
|
281
296
|
"aria-expanded": "true",
|
|
282
297
|
placeholder: e.placeholder,
|
|
283
|
-
onKeydown:
|
|
284
|
-
}, null, 40,
|
|
298
|
+
onKeydown: z
|
|
299
|
+
}, null, 40, Se), [[N, b.value]])
|
|
285
300
|
]),
|
|
286
301
|
u("ul", {
|
|
287
302
|
id: `${p}-results`,
|
|
288
303
|
class: "lumal-global-search__results",
|
|
289
304
|
role: "listbox"
|
|
290
|
-
}, [(
|
|
305
|
+
}, [(x(!0), l(t, null, C(j.value, (e, t) => (x(), l("li", {
|
|
291
306
|
id: `${p}-option-${t}`,
|
|
292
307
|
key: e.item.path,
|
|
293
308
|
role: "option",
|
|
294
|
-
"aria-selected": t ===
|
|
309
|
+
"aria-selected": t === w.value
|
|
295
310
|
}, [u("button", {
|
|
296
311
|
type: "button",
|
|
297
|
-
class:
|
|
298
|
-
onMouseenter: (e) =>
|
|
299
|
-
onClick: (t) =>
|
|
312
|
+
class: y({ "is-active": t === w.value }),
|
|
313
|
+
onMouseenter: (e) => w.value = t,
|
|
314
|
+
onClick: (t) => oe(e)
|
|
300
315
|
}, [
|
|
301
|
-
e.item.icon ? (
|
|
316
|
+
e.item.icon ? (x(), s(k(I), {
|
|
302
317
|
key: 0,
|
|
303
318
|
name: e.item.icon,
|
|
304
319
|
size: 18
|
|
305
320
|
}, null, 8, ["name"])) : c("", !0),
|
|
306
|
-
u("span", null, [u("strong", null,
|
|
307
|
-
u("code", null,
|
|
308
|
-
], 42,
|
|
309
|
-
|
|
310
|
-
],
|
|
321
|
+
u("span", null, [u("strong", null, O(e.item.title), 1), u("small", null, O(e.trail.join(" / ")), 1)]),
|
|
322
|
+
u("code", null, O(e.item.path), 1)
|
|
323
|
+
], 42, we)], 8, Ce))), 128))], 8, Z),
|
|
324
|
+
j.value.length === 0 ? (x(), l("p", Te, " 未找到匹配菜单,请尝试其他关键词 ")) : c("", !0)
|
|
325
|
+
], 40, ye)], 32)) : c("", !0)]))]));
|
|
311
326
|
}
|
|
312
|
-
}), [["__scopeId", "data-v-
|
|
327
|
+
}), [["__scopeId", "data-v-f2b1e55b"]]), De = { class: "lumal-header__left" }, Oe = {
|
|
313
328
|
key: 0,
|
|
314
329
|
class: "lumal-header__title"
|
|
315
330
|
}, ke = {
|
|
316
331
|
key: 0,
|
|
317
332
|
class: "lumal-header__breadcrumb"
|
|
318
|
-
},
|
|
333
|
+
}, Ae = {
|
|
319
334
|
key: 1,
|
|
320
335
|
class: "lumal-header__navigation",
|
|
321
336
|
"aria-label": "主导航"
|
|
322
|
-
},
|
|
337
|
+
}, Q = {
|
|
323
338
|
key: 2,
|
|
324
339
|
class: "lumal-header__actions"
|
|
325
340
|
}, je = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
@@ -346,45 +361,46 @@ var K = {
|
|
|
346
361
|
},
|
|
347
362
|
emits: ["toggleCollapse"],
|
|
348
363
|
setup(e, { expose: t, emit: n }) {
|
|
349
|
-
let r = e, i = n, a =
|
|
350
|
-
function
|
|
364
|
+
let r = e, i = n, a = M("headerRef"), d = o(() => r.collapsed ? "展开侧边栏" : "收起侧边栏");
|
|
365
|
+
function p() {
|
|
351
366
|
i("toggleCollapse");
|
|
352
367
|
}
|
|
353
368
|
return t({
|
|
354
369
|
getHeaderElement: () => a.value?.$el,
|
|
355
370
|
getHeaderInstance: () => a.value
|
|
356
|
-
}), (t, n) => (
|
|
371
|
+
}), (t, n) => (x(), s(k(oe), {
|
|
357
372
|
ref_key: "headerRef",
|
|
358
373
|
ref: a,
|
|
359
374
|
class: "lumal-header",
|
|
360
375
|
height: e.height
|
|
361
376
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
u("div", De, [
|
|
377
|
+
default: F(() => [
|
|
378
|
+
u("div", De, [w(t.$slots, "logo", {}, () => [e.title ? (x(), l("span", Oe, O(e.title), 1)) : c("", !0)], !0), e.sidebarEnabled ? (x(), s(k(R), {
|
|
364
379
|
key: 0,
|
|
365
|
-
class:
|
|
380
|
+
class: y(["lumal-header__toggle", {
|
|
366
381
|
"is-after-title": e.toggleAfterTitle,
|
|
367
382
|
"is-mobile-only": e.mobileOnlyToggle
|
|
368
383
|
}]),
|
|
369
384
|
text: "",
|
|
370
385
|
"aria-label": d.value,
|
|
371
386
|
"data-action": "toggle-sidebar",
|
|
372
|
-
onClick:
|
|
387
|
+
onClick: p
|
|
373
388
|
}, {
|
|
374
|
-
default:
|
|
375
|
-
"
|
|
376
|
-
|
|
377
|
-
|
|
389
|
+
default: F(() => [f(k(I), {
|
|
390
|
+
name: e.collapsed ? "lumal:sidebar-expand" : "lumal:sidebar-collapse",
|
|
391
|
+
morph: "",
|
|
392
|
+
size: 18
|
|
393
|
+
}, null, 8, ["name"])]),
|
|
378
394
|
_: 1
|
|
379
395
|
}, 8, ["class", "aria-label"])) : c("", !0)]),
|
|
380
|
-
t.$slots.breadcrumb ? (
|
|
381
|
-
t.$slots.navigation ? (
|
|
382
|
-
t.$slots.actions ? (
|
|
396
|
+
t.$slots.breadcrumb ? (x(), l("div", ke, [w(t.$slots, "breadcrumb", {}, void 0, !0)])) : c("", !0),
|
|
397
|
+
t.$slots.navigation ? (x(), l("nav", Ae, [w(t.$slots, "navigation", {}, void 0, !0)])) : c("", !0),
|
|
398
|
+
t.$slots.actions ? (x(), l("div", Q, [w(t.$slots, "actions", {}, void 0, !0)])) : c("", !0)
|
|
383
399
|
]),
|
|
384
400
|
_: 3
|
|
385
401
|
}, 8, ["height"]));
|
|
386
402
|
}
|
|
387
|
-
}), [["__scopeId", "data-v-
|
|
403
|
+
}), [["__scopeId", "data-v-abe2c07a"]]), Me = ["aria-label"], Ne = {
|
|
388
404
|
key: 0,
|
|
389
405
|
"aria-hidden": "true"
|
|
390
406
|
}, $ = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
@@ -397,34 +413,26 @@ var K = {
|
|
|
397
413
|
},
|
|
398
414
|
setup(e) {
|
|
399
415
|
let t = e, n = o(() => t.type === "dot" || t.badge === 0 || !!t.badge), r = o(() => t.type === "dot" ? `${t.label}有新内容` : `${t.label}:${t.badge}`);
|
|
400
|
-
return (t, i) => n.value ? (
|
|
416
|
+
return (t, i) => n.value ? (x(), l("span", {
|
|
401
417
|
key: 0,
|
|
402
|
-
class:
|
|
418
|
+
class: y(["lumal-menu-badge", [`is-${e.tone}`, { "is-dot": e.type === "dot" }]]),
|
|
403
419
|
role: "status",
|
|
404
420
|
"aria-label": r.value
|
|
405
|
-
}, [e.type === "text" ? (
|
|
421
|
+
}, [e.type === "text" ? (x(), l("span", Ne, O(e.badge), 1)) : c("", !0)], 10, Me)) : c("", !0);
|
|
406
422
|
}
|
|
407
423
|
}), [["__scopeId", "data-v-0ca73e4b"]]), Pe = {
|
|
408
424
|
key: 0,
|
|
409
425
|
class: "lumal-sidebar-menu-item__icon",
|
|
410
426
|
"aria-hidden": "true"
|
|
411
|
-
}, Fe = { class: "lumal-sidebar-menu-item__label" }, Ie = { class: "lumal-sidebar-menu-item__title" }, Le = {
|
|
412
|
-
key: 1,
|
|
413
|
-
class: "lumal-sidebar-menu-item__external",
|
|
414
|
-
"aria-hidden": "true"
|
|
415
|
-
}, Re = ["title"], ze = {
|
|
427
|
+
}, Fe = { class: "lumal-sidebar-menu-item__label" }, Ie = { class: "lumal-sidebar-menu-item__title" }, Le = ["title"], Re = {
|
|
416
428
|
key: 0,
|
|
417
429
|
class: "lumal-sidebar-menu-item__icon",
|
|
418
430
|
"aria-hidden": "true"
|
|
419
|
-
},
|
|
431
|
+
}, ze = { class: "lumal-sidebar-menu-item__label" }, Be = { class: "lumal-sidebar-menu-item__title" }, Ve = {
|
|
420
432
|
key: 0,
|
|
421
433
|
class: "lumal-sidebar-menu-item__icon",
|
|
422
434
|
"aria-hidden": "true"
|
|
423
|
-
},
|
|
424
|
-
key: 1,
|
|
425
|
-
class: "lumal-sidebar-menu-item__external",
|
|
426
|
-
"aria-hidden": "true"
|
|
427
|
-
}, Ke = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
435
|
+
}, He = { class: "lumal-sidebar-menu-item__label" }, Ue = { class: "lumal-sidebar-menu-item__title" }, We = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
428
436
|
__name: "LumalSidebarMenuItem",
|
|
429
437
|
props: {
|
|
430
438
|
activePath: {},
|
|
@@ -439,19 +447,19 @@ var K = {
|
|
|
439
447
|
i("select", e);
|
|
440
448
|
}
|
|
441
449
|
return (n, r) => {
|
|
442
|
-
let i =
|
|
443
|
-
return d.value ? (
|
|
450
|
+
let i = T("LumalSidebarMenuItem", !0);
|
|
451
|
+
return d.value ? (x(), s(k(H), {
|
|
444
452
|
key: 0,
|
|
445
453
|
class: "lumal-sidebar-menu-item",
|
|
446
454
|
index: e.item.path,
|
|
447
455
|
title: e.collapsed ? e.item.title : void 0
|
|
448
456
|
}, {
|
|
449
|
-
title:
|
|
450
|
-
e.item.icon ? (
|
|
457
|
+
title: F(() => [
|
|
458
|
+
e.item.icon ? (x(), l("i", Pe, [f(k(I), {
|
|
451
459
|
name: e.item.icon,
|
|
452
460
|
size: 16
|
|
453
461
|
}, null, 8, ["name"])])) : c("", !0),
|
|
454
|
-
u("span", Fe, [u("span", Ie,
|
|
462
|
+
u("span", Fe, [u("span", Ie, O(e.item.title), 1), f($, {
|
|
455
463
|
badge: e.item.badge,
|
|
456
464
|
label: e.item.title,
|
|
457
465
|
tone: e.item.badgeTone,
|
|
@@ -462,9 +470,14 @@ var K = {
|
|
|
462
470
|
"tone",
|
|
463
471
|
"type"
|
|
464
472
|
])]),
|
|
465
|
-
e.item.externalLink ? (
|
|
473
|
+
e.item.externalLink ? (x(), s(k(I), {
|
|
474
|
+
key: 1,
|
|
475
|
+
class: "lumal-sidebar-menu-item__external",
|
|
476
|
+
name: "lumal:external-link",
|
|
477
|
+
size: 12
|
|
478
|
+
})) : c("", !0)
|
|
466
479
|
]),
|
|
467
|
-
default:
|
|
480
|
+
default: F(() => [(x(!0), l(t, null, C(a.value, (t) => (x(), s(i, {
|
|
468
481
|
key: t.path,
|
|
469
482
|
item: t,
|
|
470
483
|
"active-path": e.activePath,
|
|
@@ -478,7 +491,7 @@ var K = {
|
|
|
478
491
|
"depth"
|
|
479
492
|
]))), 128))]),
|
|
480
493
|
_: 1
|
|
481
|
-
}, 8, ["index", "title"])) : p.value ? (
|
|
494
|
+
}, 8, ["index", "title"])) : p.value ? (x(), l("li", {
|
|
482
495
|
key: 1,
|
|
483
496
|
class: "el-menu-item lumal-sidebar-menu-item lumal-sidebar-menu-item--external",
|
|
484
497
|
role: "menuitem",
|
|
@@ -486,11 +499,11 @@ var K = {
|
|
|
486
499
|
title: e.collapsed ? e.item.title : void 0,
|
|
487
500
|
onClick: r[0] ||= (t) => m(e.item.path)
|
|
488
501
|
}, [
|
|
489
|
-
e.item.icon ? (
|
|
502
|
+
e.item.icon ? (x(), l("i", Re, [f(k(I), {
|
|
490
503
|
name: e.item.icon,
|
|
491
504
|
size: 16
|
|
492
505
|
}, null, 8, ["name"])])) : c("", !0),
|
|
493
|
-
u("span",
|
|
506
|
+
u("span", ze, [u("span", Be, O(e.item.title), 1), f($, {
|
|
494
507
|
badge: e.item.badge,
|
|
495
508
|
label: e.item.title,
|
|
496
509
|
tone: e.item.badgeTone,
|
|
@@ -501,23 +514,24 @@ var K = {
|
|
|
501
514
|
"tone",
|
|
502
515
|
"type"
|
|
503
516
|
])]),
|
|
504
|
-
|
|
517
|
+
f(k(I), {
|
|
505
518
|
class: "lumal-sidebar-menu-item__external",
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
519
|
+
name: "lumal:external-link",
|
|
520
|
+
size: 12
|
|
521
|
+
})
|
|
522
|
+
], 8, Le)) : (x(), s(k(se), {
|
|
509
523
|
key: 2,
|
|
510
524
|
class: "lumal-sidebar-menu-item",
|
|
511
525
|
index: e.item.path,
|
|
512
526
|
title: e.collapsed ? e.item.title : void 0,
|
|
513
527
|
onClick: r[1] ||= (t) => m(e.item.path)
|
|
514
528
|
}, {
|
|
515
|
-
default:
|
|
516
|
-
e.item.icon ? (
|
|
529
|
+
default: F(() => [
|
|
530
|
+
e.item.icon ? (x(), l("i", Ve, [f(k(I), {
|
|
517
531
|
name: e.item.icon,
|
|
518
532
|
size: 16
|
|
519
533
|
}, null, 8, ["name"])])) : c("", !0),
|
|
520
|
-
u("span",
|
|
534
|
+
u("span", He, [u("span", Ue, O(e.item.title), 1), f($, {
|
|
521
535
|
badge: e.item.badge,
|
|
522
536
|
label: e.item.title,
|
|
523
537
|
tone: e.item.badgeTone,
|
|
@@ -528,13 +542,18 @@ var K = {
|
|
|
528
542
|
"tone",
|
|
529
543
|
"type"
|
|
530
544
|
])]),
|
|
531
|
-
e.item.externalLink ? (
|
|
545
|
+
e.item.externalLink ? (x(), s(k(I), {
|
|
546
|
+
key: 1,
|
|
547
|
+
class: "lumal-sidebar-menu-item__external",
|
|
548
|
+
name: "lumal:external-link",
|
|
549
|
+
size: 12
|
|
550
|
+
})) : c("", !0)
|
|
532
551
|
]),
|
|
533
552
|
_: 1
|
|
534
553
|
}, 8, ["index", "title"]));
|
|
535
554
|
};
|
|
536
555
|
}
|
|
537
|
-
}), [["__scopeId", "data-v-
|
|
556
|
+
}), [["__scopeId", "data-v-9466482e"]]), Ge = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
538
557
|
__name: "LumalSidebar",
|
|
539
558
|
props: {
|
|
540
559
|
menus: { default: () => [] },
|
|
@@ -549,27 +568,27 @@ var K = {
|
|
|
549
568
|
},
|
|
550
569
|
emits: ["select"],
|
|
551
570
|
setup(e, { expose: n, emit: r }) {
|
|
552
|
-
let i = e, a = r, c =
|
|
571
|
+
let i = e, a = r, c = M("asideRef"), u = o(() => i.collapsed ? i.collapsedWidth : i.width);
|
|
553
572
|
function d(e) {
|
|
554
573
|
a("select", e);
|
|
555
574
|
}
|
|
556
575
|
return n({
|
|
557
576
|
getAsideElement: () => c.value?.$el,
|
|
558
577
|
getAsideInstance: () => c.value
|
|
559
|
-
}), (n, r) => (
|
|
578
|
+
}), (n, r) => (x(), s(k(L), {
|
|
560
579
|
ref_key: "asideRef",
|
|
561
580
|
ref: c,
|
|
562
581
|
class: "lumal-sidebar",
|
|
563
582
|
width: u.value,
|
|
564
583
|
"aria-label": e.ariaLabel
|
|
565
584
|
}, {
|
|
566
|
-
default:
|
|
567
|
-
default:
|
|
585
|
+
default: F(() => [f(k(V), { class: "lumal-sidebar__scrollbar" }, {
|
|
586
|
+
default: F(() => [f(k(B), {
|
|
568
587
|
class: "lumal-sidebar__menu",
|
|
569
588
|
collapse: e.collapsed,
|
|
570
589
|
"default-active": e.activePath
|
|
571
590
|
}, {
|
|
572
|
-
default:
|
|
591
|
+
default: F(() => [(x(!0), l(t, null, C(e.menus.filter((e) => !e.hidden), (t) => (x(), s(We, {
|
|
573
592
|
key: t.path,
|
|
574
593
|
item: t,
|
|
575
594
|
"active-path": e.activePath,
|
|
@@ -588,15 +607,15 @@ var K = {
|
|
|
588
607
|
_: 1
|
|
589
608
|
}, 8, ["width", "aria-label"]));
|
|
590
609
|
}
|
|
591
|
-
}), [["__scopeId", "data-v-d9c4d4bc"]]),
|
|
610
|
+
}), [["__scopeId", "data-v-d9c4d4bc"]]), Ke = ["disabled"], qe = ["onContextmenu"], Je = [
|
|
592
611
|
"aria-selected",
|
|
593
612
|
"tabindex",
|
|
594
613
|
"onClick",
|
|
595
614
|
"onKeydown",
|
|
596
615
|
"onMousedown"
|
|
597
|
-
],
|
|
616
|
+
], Ye = ["title"], Xe = ["aria-label", "onClick"], Ze = ["disabled"], Qe = ["disabled"], $e = ["aria-expanded"], et = ["aria-label"], tt = ["disabled"], nt = ["disabled"], rt = ["disabled"], it = ["disabled"], at = ["disabled"], ot = ["disabled"], st = ["disabled"], ct = ["disabled"], lt = ["disabled"], ut = 192, dt = 220, ft = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
598
617
|
__name: "LumalTabs",
|
|
599
|
-
props: /*@__PURE__*/
|
|
618
|
+
props: /*@__PURE__*/ g({
|
|
600
619
|
activePath: { default: "" },
|
|
601
620
|
draggable: {
|
|
602
621
|
type: Boolean,
|
|
@@ -641,7 +660,7 @@ var K = {
|
|
|
641
660
|
activePath: { default: "" },
|
|
642
661
|
activePathModifiers: {}
|
|
643
662
|
}),
|
|
644
|
-
emits: /*@__PURE__*/
|
|
663
|
+
emits: /*@__PURE__*/ g([
|
|
645
664
|
"change",
|
|
646
665
|
"closeAll",
|
|
647
666
|
"closeLeft",
|
|
@@ -655,29 +674,29 @@ var K = {
|
|
|
655
674
|
"reorder"
|
|
656
675
|
], ["update:activePath"]),
|
|
657
676
|
setup(e, { expose: n, emit: i }) {
|
|
658
|
-
let d = e, p = i, m =
|
|
677
|
+
let d = e, p = i, m = j(e, "activePath"), h = M("tabsViewportRef"), g = D({
|
|
659
678
|
path: "",
|
|
660
679
|
style: {},
|
|
661
680
|
visible: !1
|
|
662
|
-
}),
|
|
681
|
+
}), _ = D({
|
|
663
682
|
path: "",
|
|
664
683
|
style: {},
|
|
665
684
|
visible: !1
|
|
666
|
-
}),
|
|
667
|
-
function
|
|
668
|
-
|
|
685
|
+
}), S = D(!1), w = D(!1), T = D(!0), E = D(!1), A, N, L = null, R = o(() => g.value.visible ? g.value : _.value), ae = o(() => R.value.path), oe = D(!0), z;
|
|
686
|
+
function B() {
|
|
687
|
+
oe.value = !z || !z.matches;
|
|
669
688
|
}
|
|
670
|
-
function
|
|
671
|
-
typeof window > "u" || typeof window.matchMedia != "function" || (
|
|
689
|
+
function se() {
|
|
690
|
+
typeof window > "u" || typeof window.matchMedia != "function" || (z = window.matchMedia("(max-width: 768px)"), B(), typeof z.addEventListener == "function" ? z.addEventListener("change", B) : z.addListener?.(B));
|
|
672
691
|
}
|
|
673
|
-
function
|
|
674
|
-
typeof
|
|
692
|
+
function V() {
|
|
693
|
+
typeof z?.removeEventListener == "function" ? z.removeEventListener("change", B) : z?.removeListener?.(B), z = void 0;
|
|
675
694
|
}
|
|
676
|
-
let
|
|
677
|
-
function
|
|
695
|
+
let H = o(() => d.draggable && oe.value), ce = o(() => d.tabs.some((e) => e.closable !== !1 && e.pinned !== !0));
|
|
696
|
+
function le(e) {
|
|
678
697
|
return d.tabs.length > 1 && d.tabs.some((t) => t.path === e && t.closable !== !1 && t.pinned !== !0);
|
|
679
698
|
}
|
|
680
|
-
function
|
|
699
|
+
function ue(e, t) {
|
|
681
700
|
let n = d.tabs.findIndex((t) => t.path === e);
|
|
682
701
|
return (t === "left" ? d.tabs.slice(0, n) : d.tabs.slice(n + 1)).some((e) => e.closable !== !1 && e.pinned !== !0);
|
|
683
702
|
}
|
|
@@ -687,37 +706,37 @@ var K = {
|
|
|
687
706
|
function W(e) {
|
|
688
707
|
return e === m.value;
|
|
689
708
|
}
|
|
690
|
-
function
|
|
709
|
+
function G(e) {
|
|
691
710
|
let t = d.tabs.find((t) => t.path === e);
|
|
692
711
|
return !!t && t.pinned !== !0 && t.closable !== !1;
|
|
693
712
|
}
|
|
694
|
-
function
|
|
713
|
+
function K(e) {
|
|
695
714
|
let t = d.tabs.find((t) => t.path === e);
|
|
696
715
|
return !!t && t.pinned === !0 && t.closable !== !1;
|
|
697
716
|
}
|
|
698
|
-
function
|
|
699
|
-
let t =
|
|
700
|
-
return e === "close" ? !
|
|
717
|
+
function q(e) {
|
|
718
|
+
let t = ae.value;
|
|
719
|
+
return e === "close" ? !le(t) : e === "close-left" || e === "close-right" ? !t || !W(t) || !ue(t, e === "close-left" ? "left" : "right") : e === "close-others" ? !t || !W(t) || !U(t) : e === "close-all" ? !ce.value : e === "refresh" ? !t || !W(t) : e === "pin" ? !G(t) && !K(t) : e === "new-window" && !t;
|
|
701
720
|
}
|
|
702
|
-
function
|
|
703
|
-
return
|
|
721
|
+
function fe(e) {
|
|
722
|
+
return K(e) ? "取消固定" : "固定";
|
|
704
723
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
724
|
+
function pe() {
|
|
725
|
+
return S.value ? "还原" : "内容最大化";
|
|
707
726
|
}
|
|
708
|
-
function
|
|
727
|
+
function J(e) {
|
|
709
728
|
e !== m.value && (m.value = e, p("change", e));
|
|
710
729
|
}
|
|
711
|
-
function
|
|
712
|
-
|
|
730
|
+
function me(e) {
|
|
731
|
+
le(e) && p("remove", e);
|
|
713
732
|
}
|
|
714
|
-
function
|
|
733
|
+
function he(e) {
|
|
715
734
|
e && W(e) && p("refresh", e);
|
|
716
735
|
}
|
|
717
|
-
function
|
|
718
|
-
e.button !== 1 || !d.middleClickToClose || !
|
|
736
|
+
function ge(e, t) {
|
|
737
|
+
e.button !== 1 || !d.middleClickToClose || !le(t.path) || (e.preventDefault(), p("remove", t.path));
|
|
719
738
|
}
|
|
720
|
-
function
|
|
739
|
+
function _e(e, t) {
|
|
721
740
|
if (![
|
|
722
741
|
"ArrowLeft",
|
|
723
742
|
"ArrowRight",
|
|
@@ -726,58 +745,58 @@ var K = {
|
|
|
726
745
|
].includes(e.key) || d.tabs.length === 0) return;
|
|
727
746
|
e.preventDefault();
|
|
728
747
|
let n = e.key === "Home" ? 0 : e.key === "End" ? d.tabs.length - 1 : e.key === "ArrowLeft" ? (t - 1 + d.tabs.length) % d.tabs.length : (t + 1) % d.tabs.length, r = d.tabs[n];
|
|
729
|
-
r && (
|
|
748
|
+
r && (J(r.path), v(() => {
|
|
730
749
|
h.value?.querySelectorAll("[role=\"tab\"]").item(n).focus();
|
|
731
750
|
}));
|
|
732
751
|
}
|
|
733
|
-
function
|
|
752
|
+
function ve(e, t) {
|
|
734
753
|
return {
|
|
735
|
-
left: `${Math.max(8, Math.min(e, window.innerWidth -
|
|
736
|
-
top: `${Math.max(8, Math.min(t, window.innerHeight -
|
|
754
|
+
left: `${Math.max(8, Math.min(e, window.innerWidth - ut - 8))}px`,
|
|
755
|
+
top: `${Math.max(8, Math.min(t, window.innerHeight - dt - 8))}px`
|
|
737
756
|
};
|
|
738
757
|
}
|
|
739
|
-
function
|
|
758
|
+
function Y() {
|
|
740
759
|
g.value = {
|
|
741
760
|
...g.value,
|
|
742
761
|
visible: !1
|
|
743
|
-
},
|
|
744
|
-
...
|
|
762
|
+
}, _.value = {
|
|
763
|
+
..._.value,
|
|
745
764
|
visible: !1
|
|
746
765
|
};
|
|
747
766
|
}
|
|
748
|
-
function
|
|
749
|
-
e.preventDefault(), e.stopPropagation(),
|
|
767
|
+
function ye(e, t) {
|
|
768
|
+
e.preventDefault(), e.stopPropagation(), L = e.currentTarget, g.value = {
|
|
750
769
|
path: t,
|
|
751
|
-
style:
|
|
770
|
+
style: ve(e.clientX, e.clientY),
|
|
752
771
|
visible: !0
|
|
753
|
-
},
|
|
754
|
-
...
|
|
772
|
+
}, _.value = {
|
|
773
|
+
..._.value,
|
|
755
774
|
visible: !1
|
|
756
775
|
};
|
|
757
776
|
}
|
|
758
|
-
function
|
|
777
|
+
function be(e) {
|
|
759
778
|
e.preventDefault(), e.stopPropagation();
|
|
760
779
|
let t = m.value || d.tabs[0]?.path || "";
|
|
761
|
-
|
|
780
|
+
L = e.currentTarget, _.value = {
|
|
762
781
|
path: t,
|
|
763
|
-
style:
|
|
782
|
+
style: ve(e.clientX, e.clientY),
|
|
764
783
|
visible: !0
|
|
765
784
|
}, g.value = {
|
|
766
785
|
...g.value,
|
|
767
786
|
visible: !1
|
|
768
787
|
};
|
|
769
788
|
}
|
|
770
|
-
function
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
function Y(e) {
|
|
774
|
-
if (G(e)) return;
|
|
775
|
-
let t = oe.value;
|
|
776
|
-
J(), e === "close" ? p("remove", t) : e === "close-left" ? p("closeLeft", t) : e === "close-right" ? p("closeRight", t) : e === "close-others" ? p("closeOthers", t) : e === "close-all" ? p("closeAll") : e === "refresh" ? p("refresh", t) : e === "pin" ? p("pin", t, !pe(t)) : e === "new-window" ? p("newWindow", t) : e === "maximize" && ke(), _(Se);
|
|
789
|
+
function xe() {
|
|
790
|
+
L && document.body.contains(L) && (L.focus(), L = null);
|
|
777
791
|
}
|
|
778
792
|
function X(e) {
|
|
793
|
+
if (q(e)) return;
|
|
794
|
+
let t = ae.value;
|
|
795
|
+
Y(), e === "close" ? p("remove", t) : e === "close-left" ? p("closeLeft", t) : e === "close-right" ? p("closeRight", t) : e === "close-others" ? p("closeOthers", t) : e === "close-all" ? p("closeAll") : e === "refresh" ? p("refresh", t) : e === "pin" ? p("pin", t, !K(t)) : e === "new-window" ? p("newWindow", t) : e === "maximize" && ke(), v(xe);
|
|
796
|
+
}
|
|
797
|
+
function Se(e) {
|
|
779
798
|
if (e.key === "Escape") {
|
|
780
|
-
e.preventDefault(),
|
|
799
|
+
e.preventDefault(), Y(), v(xe);
|
|
781
800
|
return;
|
|
782
801
|
}
|
|
783
802
|
let t = Array.from(document.querySelectorAll("[data-menu-active=\"true\"] [role=\"menuitem\"]:not(:disabled)"));
|
|
@@ -789,7 +808,7 @@ var K = {
|
|
|
789
808
|
}
|
|
790
809
|
function Z() {
|
|
791
810
|
let e = h.value;
|
|
792
|
-
e && (w.value = e.scrollWidth > e.clientWidth + 1, T.value = e.scrollLeft <= 1,
|
|
811
|
+
e && (w.value = e.scrollWidth > e.clientWidth + 1, T.value = e.scrollLeft <= 1, E.value = e.scrollLeft + e.clientWidth >= e.scrollWidth - 1);
|
|
793
812
|
}
|
|
794
813
|
function Ce() {
|
|
795
814
|
return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
|
|
@@ -807,7 +826,7 @@ var K = {
|
|
|
807
826
|
!t || !w.value || (e.preventDefault(), t.scrollBy({ left: Math.abs(e.deltaY) > Math.abs(e.deltaX) ? e.deltaY : e.deltaX }));
|
|
808
827
|
}
|
|
809
828
|
async function Ee() {
|
|
810
|
-
await
|
|
829
|
+
await v(), (h.value?.querySelector("[role=\"tab\"][aria-selected=\"true\"]"))?.scrollIntoView({
|
|
811
830
|
behavior: Ce(),
|
|
812
831
|
block: "nearest",
|
|
813
832
|
inline: "nearest"
|
|
@@ -815,11 +834,11 @@ var K = {
|
|
|
815
834
|
}
|
|
816
835
|
function De() {
|
|
817
836
|
let e = h.value?.querySelector(".lumal-tabs__list");
|
|
818
|
-
if (!e || !
|
|
837
|
+
if (!e || !H.value) {
|
|
819
838
|
Oe();
|
|
820
839
|
return;
|
|
821
840
|
}
|
|
822
|
-
|
|
841
|
+
N && N.el === e || (Oe(), N = de.create(e, {
|
|
823
842
|
animation: 160,
|
|
824
843
|
draggable: ".lumal-tabs__item",
|
|
825
844
|
filter: ".is-not-draggable",
|
|
@@ -833,60 +852,60 @@ var K = {
|
|
|
833
852
|
}));
|
|
834
853
|
}
|
|
835
854
|
function Oe() {
|
|
836
|
-
|
|
855
|
+
N?.destroy(), N = void 0;
|
|
837
856
|
}
|
|
838
|
-
|
|
839
|
-
e ?
|
|
857
|
+
P(H, (e) => {
|
|
858
|
+
e ? v(De) : Oe();
|
|
840
859
|
});
|
|
841
860
|
function ke() {
|
|
842
861
|
if (d.standaloneMaximize) {
|
|
843
|
-
|
|
862
|
+
Ae();
|
|
844
863
|
return;
|
|
845
864
|
}
|
|
846
|
-
|
|
865
|
+
S.value = !S.value, p("maximize", S.value);
|
|
847
866
|
}
|
|
848
|
-
async function
|
|
867
|
+
async function Ae() {
|
|
849
868
|
let e = document.querySelector(d.fullscreenTarget);
|
|
850
869
|
e instanceof HTMLElement && (document.fullscreenElement ? await document.exitFullscreen?.() : await e.requestFullscreen?.());
|
|
851
870
|
}
|
|
852
|
-
function
|
|
853
|
-
|
|
871
|
+
function Q() {
|
|
872
|
+
S.value = !!document.fullscreenElement && d.standaloneMaximize, d.standaloneMaximize && p("maximize", S.value);
|
|
854
873
|
}
|
|
855
874
|
function je(e) {
|
|
856
|
-
d.standaloneMaximize || (
|
|
875
|
+
d.standaloneMaximize || (S.value = e);
|
|
857
876
|
}
|
|
858
877
|
n({
|
|
859
878
|
getTabsElement: () => h.value,
|
|
860
|
-
refreshCurrent: () =>
|
|
879
|
+
refreshCurrent: () => he(m.value),
|
|
861
880
|
scrollTabs: we,
|
|
862
881
|
toggleFullscreen: ke,
|
|
863
882
|
setMaximized: je
|
|
864
|
-
}),
|
|
883
|
+
}), P(() => [d.activePath, d.tabs.length], () => void Ee(), { flush: "post" }), P(() => d.tabs, () => void v(Z), { flush: "post" });
|
|
865
884
|
function Me(e) {
|
|
866
885
|
let t = e.target;
|
|
867
|
-
t && (t.closest?.(".lumal-tabs-context-menu") || t.closest?.("[data-tab-menu-trigger]") ||
|
|
886
|
+
t && (t.closest?.(".lumal-tabs-context-menu") || t.closest?.("[data-tab-menu-trigger]") || Y());
|
|
868
887
|
}
|
|
869
888
|
function Ne(e) {
|
|
870
|
-
e.key === "Escape" &&
|
|
889
|
+
e.key === "Escape" && R.value.visible && (e.preventDefault(), Y(), v(xe));
|
|
871
890
|
}
|
|
872
891
|
return te(() => {
|
|
873
|
-
|
|
892
|
+
se(), document.addEventListener("click", Me), document.addEventListener("fullscreenchange", Q), document.addEventListener("keydown", Ne), Z(), typeof ResizeObserver < "u" && h.value && (A = new ResizeObserver(Z), A.observe(h.value)), H.value && v(De);
|
|
874
893
|
}), ee(() => {
|
|
875
|
-
|
|
876
|
-
}), (n, i) => e.visible && e.tabs.length ? (
|
|
894
|
+
V(), document.removeEventListener("click", Me), document.removeEventListener("fullscreenchange", Q), document.removeEventListener("keydown", Ne), A?.disconnect(), Oe();
|
|
895
|
+
}), (n, i) => e.visible && e.tabs.length ? (x(), l("div", {
|
|
877
896
|
key: 0,
|
|
878
|
-
class:
|
|
897
|
+
class: y(["lumal-tabs", [`is-style-${e.styleType}`]])
|
|
879
898
|
}, [
|
|
880
|
-
|
|
899
|
+
re(u("button", {
|
|
881
900
|
class: "lumal-tabs__tool",
|
|
882
901
|
type: "button",
|
|
883
902
|
"aria-label": "向左滚动标签",
|
|
884
903
|
disabled: T.value,
|
|
885
904
|
onClick: i[0] ||= (e) => we("left")
|
|
886
|
-
}, [f(
|
|
905
|
+
}, [f(k(I), {
|
|
887
906
|
name: "lumal:chevron-left",
|
|
888
907
|
size: 16
|
|
889
|
-
})], 8,
|
|
908
|
+
})], 8, Ke), [[ne, w.value]]),
|
|
890
909
|
u("div", {
|
|
891
910
|
ref_key: "tabsViewportRef",
|
|
892
911
|
ref: h,
|
|
@@ -900,196 +919,190 @@ var K = {
|
|
|
900
919
|
role: "tablist",
|
|
901
920
|
"aria-label": "页面标签"
|
|
902
921
|
}, {
|
|
903
|
-
default:
|
|
922
|
+
default: F(() => [(x(!0), l(t, null, C(e.tabs, (t, n) => (x(), l("div", {
|
|
904
923
|
key: t.path,
|
|
905
|
-
class:
|
|
924
|
+
class: y(["lumal-tabs__item", {
|
|
906
925
|
"is-active": t.path === m.value,
|
|
907
926
|
"is-pinned": t.pinned === !0,
|
|
908
|
-
"is-not-draggable": t.pinned === !0 || !
|
|
927
|
+
"is-not-draggable": t.pinned === !0 || !H.value
|
|
909
928
|
}]),
|
|
910
|
-
onContextmenu: (e) =>
|
|
929
|
+
onContextmenu: (e) => ye(e, t.path)
|
|
911
930
|
}, [u("button", {
|
|
912
931
|
class: "lumal-tabs__tab",
|
|
913
932
|
type: "button",
|
|
914
933
|
role: "tab",
|
|
915
934
|
"aria-selected": t.path === m.value,
|
|
916
935
|
tabindex: t.path === m.value ? 0 : -1,
|
|
917
|
-
onClick: (e) =>
|
|
918
|
-
onKeydown: (e) =>
|
|
919
|
-
onMousedown: (e) =>
|
|
920
|
-
}, [t.pinned === !0 ? (
|
|
936
|
+
onClick: (e) => J(t.path),
|
|
937
|
+
onKeydown: (e) => _e(e, n),
|
|
938
|
+
onMousedown: (e) => ge(e, t)
|
|
939
|
+
}, [t.pinned === !0 ? (x(), s(k(I), {
|
|
921
940
|
key: 0,
|
|
922
941
|
class: "lumal-tabs__pin",
|
|
923
942
|
name: "lumal:pin",
|
|
924
943
|
size: 14
|
|
925
|
-
})) : e.showIcon && t.icon ? (
|
|
944
|
+
})) : e.showIcon && t.icon ? (x(), s(k(I), {
|
|
926
945
|
key: 1,
|
|
927
946
|
name: t.icon,
|
|
928
947
|
size: 14
|
|
929
948
|
}, null, 8, ["name"])) : c("", !0), u("span", {
|
|
930
949
|
class: "lumal-tabs__label",
|
|
931
950
|
title: t.title
|
|
932
|
-
},
|
|
951
|
+
}, O(t.title), 9, Ye)], 40, Je), le(t.path) ? (x(), l("button", {
|
|
933
952
|
key: 0,
|
|
934
953
|
class: "lumal-tabs__close",
|
|
935
954
|
type: "button",
|
|
936
955
|
"aria-label": `关闭${t.title}`,
|
|
937
|
-
onClick: (e) =>
|
|
938
|
-
}, [f(
|
|
956
|
+
onClick: (e) => me(t.path)
|
|
957
|
+
}, [f(k(I), {
|
|
939
958
|
name: "lumal:close",
|
|
940
959
|
size: 14
|
|
941
|
-
})], 8,
|
|
960
|
+
})], 8, Xe)) : c("", !0)], 42, qe))), 128))]),
|
|
942
961
|
_: 1
|
|
943
962
|
})], 544),
|
|
944
|
-
|
|
963
|
+
re(u("button", {
|
|
945
964
|
class: "lumal-tabs__tool",
|
|
946
965
|
type: "button",
|
|
947
966
|
"aria-label": "向右滚动标签",
|
|
948
|
-
disabled:
|
|
967
|
+
disabled: E.value,
|
|
949
968
|
onClick: i[1] ||= (e) => we("right")
|
|
950
|
-
}, [f(
|
|
969
|
+
}, [f(k(I), {
|
|
951
970
|
name: "lumal:chevron-right",
|
|
952
971
|
size: 16
|
|
953
|
-
})], 8,
|
|
954
|
-
e.showRefresh ? (
|
|
972
|
+
})], 8, Ze), [[ne, w.value]]),
|
|
973
|
+
e.showRefresh ? (x(), l("button", {
|
|
955
974
|
key: 0,
|
|
956
975
|
class: "lumal-tabs__tool lumal-tabs__tool--refresh",
|
|
957
976
|
type: "button",
|
|
958
977
|
"aria-label": "刷新当前页面",
|
|
959
978
|
"data-action": "refresh-current-tab",
|
|
960
979
|
disabled: !m.value,
|
|
961
|
-
onClick: i[2] ||= (e) =>
|
|
962
|
-
}, [f(
|
|
980
|
+
onClick: i[2] ||= (e) => he(m.value)
|
|
981
|
+
}, [f(k(I), {
|
|
963
982
|
name: "lumal:refresh",
|
|
964
983
|
size: 16
|
|
965
|
-
})], 8,
|
|
966
|
-
e.showMore ? (
|
|
984
|
+
})], 8, Qe)) : c("", !0),
|
|
985
|
+
e.showMore ? (x(), l("button", {
|
|
967
986
|
key: 1,
|
|
968
987
|
class: "lumal-tabs__tool",
|
|
969
988
|
type: "button",
|
|
970
989
|
"aria-label": "更多操作",
|
|
971
990
|
"aria-haspopup": "menu",
|
|
972
|
-
"aria-expanded":
|
|
991
|
+
"aria-expanded": _.value.visible,
|
|
973
992
|
"data-tab-menu-trigger": "",
|
|
974
|
-
onClick: i[3] ||= (e) =>
|
|
975
|
-
}, [f(
|
|
993
|
+
onClick: i[3] ||= (e) => be(e)
|
|
994
|
+
}, [f(k(I), {
|
|
976
995
|
name: "lumal:more",
|
|
977
996
|
size: 16
|
|
978
|
-
})], 8,
|
|
979
|
-
e.showMaximize ? (
|
|
997
|
+
})], 8, $e)) : c("", !0),
|
|
998
|
+
e.showMaximize ? (x(), l("button", {
|
|
980
999
|
key: 2,
|
|
981
1000
|
class: "lumal-tabs__tool lumal-tabs__tool--maximize",
|
|
982
1001
|
type: "button",
|
|
983
|
-
"aria-label":
|
|
1002
|
+
"aria-label": S.value ? "退出内容最大化" : "内容最大化",
|
|
984
1003
|
"data-action": "maximize-content",
|
|
985
1004
|
onClick: ke
|
|
986
|
-
}, [f(
|
|
987
|
-
name:
|
|
1005
|
+
}, [f(k(I), {
|
|
1006
|
+
name: S.value ? "lumal:restore" : "lumal:maximize",
|
|
1007
|
+
morph: "",
|
|
988
1008
|
size: 16
|
|
989
|
-
}, null, 8, ["name"])], 8,
|
|
990
|
-
(
|
|
1009
|
+
}, null, 8, ["name"])], 8, et)) : c("", !0),
|
|
1010
|
+
(x(), s(r, { to: "body" }, [g.value.visible || _.value.visible ? (x(), l("div", {
|
|
991
1011
|
key: 0,
|
|
992
1012
|
class: "lumal-tabs-context-menu",
|
|
993
1013
|
role: "menu",
|
|
994
1014
|
"data-menu-active": !0,
|
|
995
|
-
style:
|
|
996
|
-
onClick: i[13] ||=
|
|
997
|
-
onKeydown:
|
|
1015
|
+
style: b(R.value.style),
|
|
1016
|
+
onClick: i[13] ||= ie(() => {}, ["stop"]),
|
|
1017
|
+
onKeydown: Se
|
|
998
1018
|
}, [
|
|
999
1019
|
u("button", {
|
|
1000
1020
|
type: "button",
|
|
1001
1021
|
role: "menuitem",
|
|
1002
|
-
disabled:
|
|
1003
|
-
onClick: i[4] ||= (e) =>
|
|
1004
|
-
}, [f(
|
|
1022
|
+
disabled: q("refresh"),
|
|
1023
|
+
onClick: i[4] ||= (e) => X("refresh")
|
|
1024
|
+
}, [f(k(I), {
|
|
1005
1025
|
name: "lumal:refresh",
|
|
1006
1026
|
size: 14
|
|
1007
|
-
}), i[14] ||= u("span", null, "重新加载", -1)], 8,
|
|
1027
|
+
}), i[14] ||= u("span", null, "重新加载", -1)], 8, tt),
|
|
1008
1028
|
u("button", {
|
|
1009
1029
|
type: "button",
|
|
1010
1030
|
role: "menuitem",
|
|
1011
|
-
disabled:
|
|
1012
|
-
onClick: i[5] ||= (e) =>
|
|
1013
|
-
}, [f(
|
|
1014
|
-
name:
|
|
1031
|
+
disabled: q("pin"),
|
|
1032
|
+
onClick: i[5] ||= (e) => X("pin")
|
|
1033
|
+
}, [f(k(I), {
|
|
1034
|
+
name: K(ae.value) ? "lumal:pin-off" : "lumal:pin",
|
|
1015
1035
|
size: 14
|
|
1016
|
-
}, null, 8, ["name"]), u("span", null,
|
|
1036
|
+
}, null, 8, ["name"]), u("span", null, O(fe(ae.value)), 1)], 8, nt),
|
|
1017
1037
|
u("button", {
|
|
1018
1038
|
type: "button",
|
|
1019
1039
|
role: "menuitem",
|
|
1020
|
-
disabled:
|
|
1021
|
-
onClick: i[6] ||= (e) =>
|
|
1022
|
-
}, [f(
|
|
1023
|
-
name:
|
|
1040
|
+
disabled: q("maximize"),
|
|
1041
|
+
onClick: i[6] ||= (e) => X("maximize")
|
|
1042
|
+
}, [f(k(I), {
|
|
1043
|
+
name: S.value ? "lumal:restore" : "lumal:maximize",
|
|
1044
|
+
morph: "",
|
|
1024
1045
|
size: 14
|
|
1025
|
-
}, null, 8, ["name"]), u("span", null,
|
|
1046
|
+
}, null, 8, ["name"]), u("span", null, O(pe()), 1)], 8, rt),
|
|
1026
1047
|
u("button", {
|
|
1027
1048
|
type: "button",
|
|
1028
1049
|
role: "menuitem",
|
|
1029
|
-
disabled:
|
|
1030
|
-
onClick: i[7] ||= (e) =>
|
|
1031
|
-
}, [f(
|
|
1050
|
+
disabled: q("new-window"),
|
|
1051
|
+
onClick: i[7] ||= (e) => X("new-window")
|
|
1052
|
+
}, [f(k(I), {
|
|
1032
1053
|
name: "lumal:external-link",
|
|
1033
1054
|
size: 14
|
|
1034
|
-
}), i[15] ||= u("span", null, "在新窗口打开", -1)], 8,
|
|
1055
|
+
}), i[15] ||= u("span", null, "在新窗口打开", -1)], 8, it),
|
|
1035
1056
|
i[21] ||= u("span", { class: "lumal-tabs-context-menu__divider" }, null, -1),
|
|
1036
1057
|
u("button", {
|
|
1037
1058
|
type: "button",
|
|
1038
1059
|
role: "menuitem",
|
|
1039
|
-
disabled:
|
|
1040
|
-
onClick: i[8] ||= (e) =>
|
|
1041
|
-
}, [f(
|
|
1060
|
+
disabled: q("close"),
|
|
1061
|
+
onClick: i[8] ||= (e) => X("close")
|
|
1062
|
+
}, [f(k(I), {
|
|
1042
1063
|
name: "lumal:close",
|
|
1043
1064
|
size: 14
|
|
1044
|
-
}), i[16] ||= u("span", null, "关闭", -1)], 8,
|
|
1065
|
+
}), i[16] ||= u("span", null, "关闭", -1)], 8, at),
|
|
1045
1066
|
u("button", {
|
|
1046
1067
|
type: "button",
|
|
1047
1068
|
role: "menuitem",
|
|
1048
|
-
disabled:
|
|
1049
|
-
onClick: i[9] ||= (e) =>
|
|
1050
|
-
}, [f(
|
|
1069
|
+
disabled: q("close-left"),
|
|
1070
|
+
onClick: i[9] ||= (e) => X("close-left")
|
|
1071
|
+
}, [f(k(I), {
|
|
1051
1072
|
name: "lumal:chevron-left",
|
|
1052
1073
|
size: 14
|
|
1053
|
-
}), i[17] ||= u("span", null, "关闭左侧", -1)], 8,
|
|
1074
|
+
}), i[17] ||= u("span", null, "关闭左侧", -1)], 8, ot),
|
|
1054
1075
|
u("button", {
|
|
1055
1076
|
type: "button",
|
|
1056
1077
|
role: "menuitem",
|
|
1057
|
-
disabled:
|
|
1058
|
-
onClick: i[10] ||= (e) =>
|
|
1059
|
-
}, [f(
|
|
1078
|
+
disabled: q("close-right"),
|
|
1079
|
+
onClick: i[10] ||= (e) => X("close-right")
|
|
1080
|
+
}, [f(k(I), {
|
|
1060
1081
|
name: "lumal:chevron-right",
|
|
1061
1082
|
size: 14
|
|
1062
|
-
}), i[18] ||= u("span", null, "关闭右侧", -1)], 8,
|
|
1083
|
+
}), i[18] ||= u("span", null, "关闭右侧", -1)], 8, st),
|
|
1063
1084
|
u("button", {
|
|
1064
1085
|
type: "button",
|
|
1065
1086
|
role: "menuitem",
|
|
1066
|
-
disabled:
|
|
1067
|
-
onClick: i[11] ||= (e) =>
|
|
1068
|
-
}, [f(
|
|
1087
|
+
disabled: q("close-others"),
|
|
1088
|
+
onClick: i[11] ||= (e) => X("close-others")
|
|
1089
|
+
}, [f(k(I), {
|
|
1069
1090
|
name: "lumal:close",
|
|
1070
1091
|
size: 14
|
|
1071
|
-
}), i[19] ||= u("span", null, "关闭其他", -1)], 8,
|
|
1092
|
+
}), i[19] ||= u("span", null, "关闭其他", -1)], 8, ct),
|
|
1072
1093
|
u("button", {
|
|
1073
1094
|
type: "button",
|
|
1074
1095
|
role: "menuitem",
|
|
1075
|
-
disabled:
|
|
1076
|
-
onClick: i[12] ||= (e) =>
|
|
1077
|
-
}, [f(
|
|
1096
|
+
disabled: q("close-all"),
|
|
1097
|
+
onClick: i[12] ||= (e) => X("close-all")
|
|
1098
|
+
}, [f(k(I), {
|
|
1078
1099
|
name: "lumal:close",
|
|
1079
1100
|
size: 14
|
|
1080
|
-
}), i[20] ||= u("span", null, "关闭全部", -1)], 8,
|
|
1101
|
+
}), i[20] ||= u("span", null, "关闭全部", -1)], 8, lt)
|
|
1081
1102
|
], 36)) : c("", !0)]))
|
|
1082
1103
|
], 2)) : c("", !0);
|
|
1083
1104
|
}
|
|
1084
|
-
}), [["__scopeId", "data-v-
|
|
1085
|
-
key: 1,
|
|
1086
|
-
class: "lumal-top-nav-menu-item__external",
|
|
1087
|
-
"aria-hidden": "true"
|
|
1088
|
-
}, _t = { class: "lumal-top-nav-menu-item__label" }, vt = { class: "lumal-top-nav-menu-item__label" }, yt = {
|
|
1089
|
-
key: 1,
|
|
1090
|
-
class: "lumal-top-nav-menu-item__external",
|
|
1091
|
-
"aria-hidden": "true"
|
|
1092
|
-
}, bt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1105
|
+
}), [["__scopeId", "data-v-d6a33e63"]]), pt = { class: "lumal-top-nav-menu-item__label" }, mt = { class: "lumal-top-nav-menu-item__label" }, ht = { class: "lumal-top-nav-menu-item__label" }, gt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1093
1106
|
__name: "LumalTopNavMenuItem",
|
|
1094
1107
|
props: {
|
|
1095
1108
|
activePath: { default: "" },
|
|
@@ -1097,24 +1110,24 @@ var K = {
|
|
|
1097
1110
|
},
|
|
1098
1111
|
emits: ["select"],
|
|
1099
1112
|
setup(e, { emit: n }) {
|
|
1100
|
-
let r = e, i = n, a = o(() => r.item.children?.filter((e) => !e.hidden) ?? []), d = o(() => !!r.item.externalLink && r.item.externalTarget !== "_self"), p = o(() => !!r.activePath &&
|
|
1113
|
+
let r = e, i = n, a = o(() => r.item.children?.filter((e) => !e.hidden) ?? []), d = o(() => !!r.item.externalLink && r.item.externalTarget !== "_self"), p = o(() => !!r.activePath && U(r.item, r.activePath));
|
|
1101
1114
|
function m(e) {
|
|
1102
1115
|
i("select", e);
|
|
1103
1116
|
}
|
|
1104
1117
|
return (n, r) => {
|
|
1105
|
-
let i =
|
|
1106
|
-
return a.value.length ? (
|
|
1118
|
+
let i = T("LumalTopNavMenuItem", !0);
|
|
1119
|
+
return a.value.length ? (x(), s(k(H), {
|
|
1107
1120
|
key: 0,
|
|
1108
1121
|
index: e.item.path,
|
|
1109
|
-
class:
|
|
1122
|
+
class: y({ "is-active": p.value })
|
|
1110
1123
|
}, {
|
|
1111
|
-
title:
|
|
1112
|
-
e.item.icon ? (
|
|
1124
|
+
title: F(() => [
|
|
1125
|
+
e.item.icon ? (x(), s(k(I), {
|
|
1113
1126
|
key: 0,
|
|
1114
1127
|
name: e.item.icon,
|
|
1115
1128
|
size: 16
|
|
1116
1129
|
}, null, 8, ["name"])) : c("", !0),
|
|
1117
|
-
u("span",
|
|
1130
|
+
u("span", pt, [u("span", null, O(e.item.title), 1), f($, {
|
|
1118
1131
|
badge: e.item.badge,
|
|
1119
1132
|
label: e.item.title,
|
|
1120
1133
|
tone: e.item.badgeTone,
|
|
@@ -1125,28 +1138,33 @@ var K = {
|
|
|
1125
1138
|
"tone",
|
|
1126
1139
|
"type"
|
|
1127
1140
|
])]),
|
|
1128
|
-
e.item.externalLink ? (
|
|
1141
|
+
e.item.externalLink ? (x(), s(k(I), {
|
|
1142
|
+
key: 1,
|
|
1143
|
+
class: "lumal-top-nav-menu-item__external",
|
|
1144
|
+
name: "lumal:external-link",
|
|
1145
|
+
size: 12
|
|
1146
|
+
})) : c("", !0)
|
|
1129
1147
|
]),
|
|
1130
|
-
default:
|
|
1148
|
+
default: F(() => [(x(!0), l(t, null, C(a.value, (t) => (x(), s(i, {
|
|
1131
1149
|
key: t.path,
|
|
1132
1150
|
item: t,
|
|
1133
1151
|
"active-path": e.activePath,
|
|
1134
1152
|
onSelect: m
|
|
1135
1153
|
}, null, 8, ["item", "active-path"]))), 128))]),
|
|
1136
1154
|
_: 1
|
|
1137
|
-
}, 8, ["index", "class"])) : d.value ? (
|
|
1155
|
+
}, 8, ["index", "class"])) : d.value ? (x(), l("li", {
|
|
1138
1156
|
key: 1,
|
|
1139
|
-
class:
|
|
1157
|
+
class: y(["el-menu-item lumal-top-nav-menu-item--external", { "is-active": p.value }]),
|
|
1140
1158
|
role: "menuitem",
|
|
1141
1159
|
tabindex: "-1",
|
|
1142
1160
|
onClick: r[0] ||= (t) => m(e.item.path)
|
|
1143
1161
|
}, [
|
|
1144
|
-
e.item.icon ? (
|
|
1162
|
+
e.item.icon ? (x(), s(k(I), {
|
|
1145
1163
|
key: 0,
|
|
1146
1164
|
name: e.item.icon,
|
|
1147
1165
|
size: 16
|
|
1148
1166
|
}, null, 8, ["name"])) : c("", !0),
|
|
1149
|
-
u("span",
|
|
1167
|
+
u("span", mt, [u("span", null, O(e.item.title), 1), f($, {
|
|
1150
1168
|
badge: e.item.badge,
|
|
1151
1169
|
label: e.item.title,
|
|
1152
1170
|
tone: e.item.badgeTone,
|
|
@@ -1157,23 +1175,24 @@ var K = {
|
|
|
1157
1175
|
"tone",
|
|
1158
1176
|
"type"
|
|
1159
1177
|
])]),
|
|
1160
|
-
|
|
1178
|
+
f(k(I), {
|
|
1161
1179
|
class: "lumal-top-nav-menu-item__external",
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1180
|
+
name: "lumal:external-link",
|
|
1181
|
+
size: 12
|
|
1182
|
+
})
|
|
1183
|
+
], 2)) : (x(), s(k(se), {
|
|
1165
1184
|
key: 2,
|
|
1166
1185
|
index: e.item.path,
|
|
1167
|
-
class:
|
|
1186
|
+
class: y({ "is-active": p.value }),
|
|
1168
1187
|
onClick: r[1] ||= (t) => m(e.item.path)
|
|
1169
1188
|
}, {
|
|
1170
|
-
default:
|
|
1171
|
-
e.item.icon ? (
|
|
1189
|
+
default: F(() => [
|
|
1190
|
+
e.item.icon ? (x(), s(k(I), {
|
|
1172
1191
|
key: 0,
|
|
1173
1192
|
name: e.item.icon,
|
|
1174
1193
|
size: 16
|
|
1175
1194
|
}, null, 8, ["name"])) : c("", !0),
|
|
1176
|
-
u("span",
|
|
1195
|
+
u("span", ht, [u("span", null, O(e.item.title), 1), f($, {
|
|
1177
1196
|
badge: e.item.badge,
|
|
1178
1197
|
label: e.item.title,
|
|
1179
1198
|
tone: e.item.badgeTone,
|
|
@@ -1184,17 +1203,18 @@ var K = {
|
|
|
1184
1203
|
"tone",
|
|
1185
1204
|
"type"
|
|
1186
1205
|
])]),
|
|
1187
|
-
e.item.externalLink ? (
|
|
1206
|
+
e.item.externalLink ? (x(), s(k(I), {
|
|
1207
|
+
key: 1,
|
|
1208
|
+
class: "lumal-top-nav-menu-item__external",
|
|
1209
|
+
name: "lumal:external-link",
|
|
1210
|
+
size: 12
|
|
1211
|
+
})) : c("", !0)
|
|
1188
1212
|
]),
|
|
1189
1213
|
_: 1
|
|
1190
1214
|
}, 8, ["index", "class"]));
|
|
1191
1215
|
};
|
|
1192
1216
|
}
|
|
1193
|
-
}), [["__scopeId", "data-v-
|
|
1194
|
-
key: 1,
|
|
1195
|
-
class: "lumal-top-nav__external",
|
|
1196
|
-
"aria-hidden": "true"
|
|
1197
|
-
}, Ct = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1217
|
+
}), [["__scopeId", "data-v-71cabfc8"]]), _t = { class: "lumal-top-nav__label" }, vt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1198
1218
|
__name: "LumalTopNav",
|
|
1199
1219
|
props: {
|
|
1200
1220
|
activePath: { default: "" },
|
|
@@ -1205,14 +1225,14 @@ var K = {
|
|
|
1205
1225
|
},
|
|
1206
1226
|
emits: ["select"],
|
|
1207
1227
|
setup(e, { expose: n, emit: r }) {
|
|
1208
|
-
let i = e, a = r, d =
|
|
1228
|
+
let i = e, a = r, d = M("menuRef"), p = o(() => i.menus.filter((e) => !e.hidden));
|
|
1209
1229
|
function m(e) {
|
|
1210
1230
|
return !!e.externalLink && e.externalTarget !== "_self";
|
|
1211
1231
|
}
|
|
1212
1232
|
function h(e) {
|
|
1213
|
-
return i.activePath ? i.mode === "flat" ? e.path === i.activePath :
|
|
1233
|
+
return i.activePath ? i.mode === "flat" ? e.path === i.activePath : U(e, i.activePath) : !1;
|
|
1214
1234
|
}
|
|
1215
|
-
function
|
|
1235
|
+
function g(e) {
|
|
1216
1236
|
let t = h(e);
|
|
1217
1237
|
return m(e) ? {
|
|
1218
1238
|
class: [
|
|
@@ -1227,36 +1247,36 @@ var K = {
|
|
|
1227
1247
|
index: e.path
|
|
1228
1248
|
};
|
|
1229
1249
|
}
|
|
1230
|
-
let
|
|
1231
|
-
function
|
|
1250
|
+
let v = o(() => ({ "--lumal-top-nav-max-width": typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth }));
|
|
1251
|
+
function ee(e) {
|
|
1232
1252
|
a("select", e);
|
|
1233
1253
|
}
|
|
1234
1254
|
return n({
|
|
1235
1255
|
getMenuElement: () => d.value?.$el,
|
|
1236
1256
|
getMenuInstance: () => d.value
|
|
1237
|
-
}), (n, r) => (
|
|
1257
|
+
}), (n, r) => (x(), s(k(B), {
|
|
1238
1258
|
key: `top-nav:${e.mode}:${e.activePath}`,
|
|
1239
1259
|
ref_key: "menuRef",
|
|
1240
1260
|
ref: d,
|
|
1241
|
-
class:
|
|
1261
|
+
class: y(["lumal-top-nav", `is-align-${e.align}`]),
|
|
1242
1262
|
mode: "horizontal",
|
|
1243
1263
|
"default-active": e.activePath,
|
|
1244
1264
|
ellipsis: !0,
|
|
1245
|
-
style:
|
|
1265
|
+
style: b(v.value)
|
|
1246
1266
|
}, {
|
|
1247
|
-
default:
|
|
1267
|
+
default: F(() => [(x(!0), l(t, null, C(e.mode === "tree" ? p.value : [], (t) => (x(), s(gt, {
|
|
1248
1268
|
key: `tree:${t.path}`,
|
|
1249
1269
|
item: t,
|
|
1250
1270
|
"active-path": e.activePath,
|
|
1251
|
-
onSelect:
|
|
1252
|
-
}, null, 8, ["item", "active-path"]))), 128)), (
|
|
1253
|
-
default:
|
|
1254
|
-
e.icon ? (
|
|
1271
|
+
onSelect: ee
|
|
1272
|
+
}, null, 8, ["item", "active-path"]))), 128)), (x(!0), l(t, null, C(e.mode === "flat" ? p.value : [], (e) => (x(), s(E(m(e) ? "li" : k(se)), _({ key: `flat:${e.path}` }, { ref_for: !0 }, g(e), { onClick: (t) => ee(e.path) }), {
|
|
1273
|
+
default: F(() => [
|
|
1274
|
+
e.icon ? (x(), s(k(I), {
|
|
1255
1275
|
key: 0,
|
|
1256
1276
|
name: e.icon,
|
|
1257
1277
|
size: 16
|
|
1258
1278
|
}, null, 8, ["name"])) : c("", !0),
|
|
1259
|
-
u("span",
|
|
1279
|
+
u("span", _t, [u("span", null, O(e.title), 1), f($, {
|
|
1260
1280
|
badge: e.badge,
|
|
1261
1281
|
label: e.title,
|
|
1262
1282
|
tone: e.badgeTone,
|
|
@@ -1267,7 +1287,12 @@ var K = {
|
|
|
1267
1287
|
"tone",
|
|
1268
1288
|
"type"
|
|
1269
1289
|
])]),
|
|
1270
|
-
e.externalLink ? (
|
|
1290
|
+
e.externalLink ? (x(), s(k(I), {
|
|
1291
|
+
key: 1,
|
|
1292
|
+
class: "lumal-top-nav__external",
|
|
1293
|
+
name: "lumal:external-link",
|
|
1294
|
+
size: 12
|
|
1295
|
+
})) : c("", !0)
|
|
1271
1296
|
]),
|
|
1272
1297
|
_: 2
|
|
1273
1298
|
}, 1040, ["onClick"]))), 128))]),
|
|
@@ -1278,14 +1303,14 @@ var K = {
|
|
|
1278
1303
|
"style"
|
|
1279
1304
|
]));
|
|
1280
1305
|
}
|
|
1281
|
-
}), [["__scopeId", "data-v-
|
|
1282
|
-
function
|
|
1306
|
+
}), [["__scopeId", "data-v-3669f4a6"]]), yt = 1, bt = 50;
|
|
1307
|
+
function xt(e) {
|
|
1283
1308
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1284
1309
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return
|
|
1310
|
+
function St(e) {
|
|
1311
|
+
return xt(e) ? typeof e.path == "string" && typeof e.title == "string" : !1;
|
|
1287
1312
|
}
|
|
1288
|
-
function
|
|
1313
|
+
function Ct(e) {
|
|
1289
1314
|
let t = Math.max(1, e.maxHistory ?? 50), n = e.history.slice(0, t);
|
|
1290
1315
|
return {
|
|
1291
1316
|
v: 1,
|
|
@@ -1299,7 +1324,7 @@ function Ot(e) {
|
|
|
1299
1324
|
history: n
|
|
1300
1325
|
};
|
|
1301
1326
|
}
|
|
1302
|
-
function
|
|
1327
|
+
function wt(e) {
|
|
1303
1328
|
if (!e) return;
|
|
1304
1329
|
let t;
|
|
1305
1330
|
try {
|
|
@@ -1307,27 +1332,27 @@ function kt(e) {
|
|
|
1307
1332
|
} catch {
|
|
1308
1333
|
return;
|
|
1309
1334
|
}
|
|
1310
|
-
return !
|
|
1335
|
+
return !xt(t) || t.v !== 1 || !Array.isArray(t.tabs) || !Array.isArray(t.history) || !t.history.every((e) => typeof e == "string") ? void 0 : {
|
|
1311
1336
|
v: 1,
|
|
1312
|
-
tabs: t.tabs.filter(
|
|
1337
|
+
tabs: t.tabs.filter(St),
|
|
1313
1338
|
history: t.history
|
|
1314
1339
|
};
|
|
1315
1340
|
}
|
|
1316
|
-
function
|
|
1341
|
+
function Tt(e, t, n) {
|
|
1317
1342
|
try {
|
|
1318
1343
|
return e.setItem(t, JSON.stringify(n)), !0;
|
|
1319
1344
|
} catch {
|
|
1320
1345
|
return !1;
|
|
1321
1346
|
}
|
|
1322
1347
|
}
|
|
1323
|
-
function
|
|
1348
|
+
function Et(e, t) {
|
|
1324
1349
|
let n = null;
|
|
1325
1350
|
try {
|
|
1326
1351
|
n = e.getItem(t);
|
|
1327
1352
|
} catch {
|
|
1328
1353
|
return;
|
|
1329
1354
|
}
|
|
1330
|
-
let r =
|
|
1355
|
+
let r = wt(n);
|
|
1331
1356
|
if (n) {
|
|
1332
1357
|
if (!r) {
|
|
1333
1358
|
try {
|
|
@@ -1338,12 +1363,12 @@ function jt(e, t) {
|
|
|
1338
1363
|
return r;
|
|
1339
1364
|
}
|
|
1340
1365
|
}
|
|
1341
|
-
function
|
|
1366
|
+
function Dt(e, t) {
|
|
1342
1367
|
try {
|
|
1343
1368
|
e.removeItem(t);
|
|
1344
1369
|
} catch {}
|
|
1345
1370
|
}
|
|
1346
|
-
function
|
|
1371
|
+
function Ot(e, t) {
|
|
1347
1372
|
let n = t.fixedTabs.map((e) => ({
|
|
1348
1373
|
...e,
|
|
1349
1374
|
pinned: !0,
|
|
@@ -1386,13 +1411,13 @@ function Nt(e, t) {
|
|
|
1386
1411
|
}
|
|
1387
1412
|
//#endregion
|
|
1388
1413
|
//#region src/layout/state/tab-strategy.ts
|
|
1389
|
-
function
|
|
1414
|
+
function kt(e) {
|
|
1390
1415
|
return [...e].sort((e, t) => {
|
|
1391
1416
|
let n = +(e.pinned === !0);
|
|
1392
1417
|
return +(t.pinned === !0) - n;
|
|
1393
1418
|
});
|
|
1394
1419
|
}
|
|
1395
|
-
function
|
|
1420
|
+
function At(e, t, n = {}) {
|
|
1396
1421
|
let r = e.some((e) => e.path === t.path) ? [...e] : [...e, t], i = n.maxCount ?? 0;
|
|
1397
1422
|
if (i <= 0 || r.length <= i) return r;
|
|
1398
1423
|
let a = [...r];
|
|
@@ -1403,7 +1428,7 @@ function Ft(e, t, n = {}) {
|
|
|
1403
1428
|
}
|
|
1404
1429
|
return a;
|
|
1405
1430
|
}
|
|
1406
|
-
function
|
|
1431
|
+
function jt(e, t, n) {
|
|
1407
1432
|
if (t <= 0 || e.length <= t) return [...e];
|
|
1408
1433
|
let r = [...e];
|
|
1409
1434
|
for (; r.length > t;) {
|
|
@@ -1413,53 +1438,53 @@ function It(e, t, n) {
|
|
|
1413
1438
|
}
|
|
1414
1439
|
return r;
|
|
1415
1440
|
}
|
|
1416
|
-
function
|
|
1441
|
+
function Mt(e, t) {
|
|
1417
1442
|
return e.filter((e) => !(e.path === t && e.closable !== !1 && e.pinned !== !0));
|
|
1418
1443
|
}
|
|
1419
|
-
function
|
|
1444
|
+
function Nt(e, t) {
|
|
1420
1445
|
let n = e.findIndex((e) => e.path === t);
|
|
1421
1446
|
return n <= 0 ? [...e] : e.filter((e, t) => t >= n || e.closable === !1 || e.pinned === !0);
|
|
1422
1447
|
}
|
|
1423
|
-
function
|
|
1448
|
+
function Pt(e, t) {
|
|
1424
1449
|
let n = e.findIndex((e) => e.path === t);
|
|
1425
1450
|
return n === -1 || n >= e.length - 1 ? [...e] : e.filter((e, t) => t <= n || e.closable === !1 || e.pinned === !0);
|
|
1426
1451
|
}
|
|
1427
|
-
function
|
|
1452
|
+
function Ft(e, t) {
|
|
1428
1453
|
return e.filter((e) => e.path === t || e.closable === !1 || e.pinned === !0);
|
|
1429
1454
|
}
|
|
1430
|
-
function
|
|
1455
|
+
function It(e) {
|
|
1431
1456
|
let t = e.filter((e) => e.closable === !1 || e.pinned === !0);
|
|
1432
1457
|
return t.length > 0 ? t : e.length > 0 ? [e[0]] : [];
|
|
1433
1458
|
}
|
|
1434
|
-
function
|
|
1459
|
+
function Lt(e, t) {
|
|
1435
1460
|
let n = !1, r = e.map((e) => e.path === t ? (n = !0, {
|
|
1436
1461
|
...e,
|
|
1437
1462
|
pinned: !0
|
|
1438
1463
|
}) : e);
|
|
1439
|
-
return n ?
|
|
1464
|
+
return n ? kt(r) : r;
|
|
1440
1465
|
}
|
|
1441
|
-
function
|
|
1466
|
+
function Rt(e, t) {
|
|
1442
1467
|
return e.map((e) => e.path === t && e.closable !== !1 ? {
|
|
1443
1468
|
...e,
|
|
1444
1469
|
pinned: !1
|
|
1445
1470
|
} : e);
|
|
1446
1471
|
}
|
|
1447
|
-
function
|
|
1472
|
+
function zt(e) {
|
|
1448
1473
|
return e.closable === !1;
|
|
1449
1474
|
}
|
|
1450
|
-
function
|
|
1475
|
+
function Bt(e) {
|
|
1451
1476
|
return e.pinned === !0 && e.closable !== !1;
|
|
1452
1477
|
}
|
|
1453
|
-
function
|
|
1478
|
+
function Vt(e) {
|
|
1454
1479
|
return e.pinned !== !0 && e.closable !== !1;
|
|
1455
1480
|
}
|
|
1456
|
-
var
|
|
1457
|
-
function
|
|
1481
|
+
var Ht = 50;
|
|
1482
|
+
function Ut(e, t, n = {}) {
|
|
1458
1483
|
if (!t) return [...e];
|
|
1459
|
-
let r = n.maxCount ??
|
|
1484
|
+
let r = n.maxCount ?? Ht;
|
|
1460
1485
|
return [t, ...e.filter((e) => e !== t)].slice(0, Math.max(1, r));
|
|
1461
1486
|
}
|
|
1462
|
-
function
|
|
1487
|
+
function Wt(e, t, n = [], r = {}) {
|
|
1463
1488
|
if (e.length === 0) return "";
|
|
1464
1489
|
if (r.useHistory && n.length > 0) {
|
|
1465
1490
|
let r = new Set(e.map((e) => e.path));
|
|
@@ -1474,20 +1499,20 @@ function Yt(e, t, n = [], r = {}) {
|
|
|
1474
1499
|
}
|
|
1475
1500
|
return e[0]?.path ?? "";
|
|
1476
1501
|
}
|
|
1477
|
-
function
|
|
1502
|
+
function Gt(e, t, n) {
|
|
1478
1503
|
let r = e.findIndex((e) => e.path === t), i = e.findIndex((e) => e.path === n);
|
|
1479
1504
|
if (r === -1 || i === -1 || r === i || e[r].pinned === !0 != (e[i].pinned === !0)) return [...e];
|
|
1480
1505
|
let a = [...e], [o] = a.splice(r, 1);
|
|
1481
1506
|
return o && a.splice(i, 0, o), a;
|
|
1482
1507
|
}
|
|
1483
|
-
function
|
|
1508
|
+
function Kt(e, t = {}) {
|
|
1484
1509
|
return t.enable === !1 ? [] : e.map((e) => e.path);
|
|
1485
1510
|
}
|
|
1486
1511
|
//#endregion
|
|
1487
1512
|
//#region src/layout/LumalLayout.vue
|
|
1488
|
-
var
|
|
1513
|
+
var qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1489
1514
|
__name: "LumalLayout",
|
|
1490
|
-
props: /*@__PURE__*/
|
|
1515
|
+
props: /*@__PURE__*/ g({
|
|
1491
1516
|
title: {},
|
|
1492
1517
|
menus: { default: () => [] },
|
|
1493
1518
|
preferences: {},
|
|
@@ -1515,7 +1540,7 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1515
1540
|
activeTabPath: {},
|
|
1516
1541
|
activeTabPathModifiers: {}
|
|
1517
1542
|
}),
|
|
1518
|
-
emits: /*@__PURE__*/
|
|
1543
|
+
emits: /*@__PURE__*/ g([
|
|
1519
1544
|
"menuSelect",
|
|
1520
1545
|
"topMenuSelect",
|
|
1521
1546
|
"toggleSidebar",
|
|
@@ -1529,14 +1554,15 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1529
1554
|
"tabPin",
|
|
1530
1555
|
"tabReorder",
|
|
1531
1556
|
"tabMaximize",
|
|
1532
|
-
"tabNewWindow"
|
|
1557
|
+
"tabNewWindow",
|
|
1558
|
+
"tabsChange"
|
|
1533
1559
|
], ["update:activeTabPath"]),
|
|
1534
1560
|
setup(e, { expose: t, emit: n }) {
|
|
1535
|
-
let r = e, a = n, u =
|
|
1536
|
-
function
|
|
1561
|
+
let r = e, a = n, u = j(e, "activeTabPath"), p = h(le, void 0), m = h(ue, void 0), g = M("layoutRef"), _ = M("tabsRef"), v = D(!1), b = D(!1), S = D(!1), C = D([]), T = D(""), E = D([]), O = o(() => r.tabMaxCount ?? r.preferences.tabbar.maxCount), A;
|
|
1562
|
+
function N(e) {
|
|
1537
1563
|
return e.meta.layout !== "public" && e.meta.hideInTab !== !0 && !!e.meta.title;
|
|
1538
1564
|
}
|
|
1539
|
-
function
|
|
1565
|
+
function ie(e) {
|
|
1540
1566
|
let t = typeof e.meta.title == "string" ? e.meta.title : void 0;
|
|
1541
1567
|
if (t) return {
|
|
1542
1568
|
closable: e.meta.affixTab !== !0,
|
|
@@ -1545,14 +1571,14 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1545
1571
|
title: t
|
|
1546
1572
|
};
|
|
1547
1573
|
}
|
|
1548
|
-
function
|
|
1574
|
+
function I() {
|
|
1549
1575
|
return r.fixedTabs.map((e) => ({
|
|
1550
1576
|
...e,
|
|
1551
1577
|
closable: !1,
|
|
1552
1578
|
pinned: !0
|
|
1553
1579
|
}));
|
|
1554
1580
|
}
|
|
1555
|
-
function
|
|
1581
|
+
function L(e) {
|
|
1556
1582
|
return {
|
|
1557
1583
|
closable: e.closable !== !1,
|
|
1558
1584
|
icon: e.icon,
|
|
@@ -1561,20 +1587,20 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1561
1587
|
title: e.title
|
|
1562
1588
|
};
|
|
1563
1589
|
}
|
|
1564
|
-
function
|
|
1590
|
+
function R() {
|
|
1565
1591
|
if (r.isValidTabPath) return r.isValidTabPath;
|
|
1566
|
-
if (!(!
|
|
1592
|
+
if (!(!m || !r.routeDriven)) return (e) => {
|
|
1567
1593
|
try {
|
|
1568
|
-
let t =
|
|
1594
|
+
let t = m.resolve(e)?.matched ?? [], n = t[t.length - 1];
|
|
1569
1595
|
return n ? n.meta?.layout !== "public" && n.meta?.hideInTab !== !0 : !1;
|
|
1570
1596
|
} catch {
|
|
1571
1597
|
return !1;
|
|
1572
1598
|
}
|
|
1573
1599
|
};
|
|
1574
1600
|
}
|
|
1575
|
-
function
|
|
1576
|
-
if (!(!
|
|
1577
|
-
let t =
|
|
1601
|
+
function oe(e) {
|
|
1602
|
+
if (!(!m || !r.routeDriven)) try {
|
|
1603
|
+
let t = m.resolve(e)?.matched ?? [], n = t[t.length - 1], r = typeof n?.meta?.title == "string" ? n.meta.title : void 0, i = typeof n?.meta?.icon == "string" ? n.meta.icon : void 0;
|
|
1578
1604
|
return !r && !i ? void 0 : {
|
|
1579
1605
|
icon: i,
|
|
1580
1606
|
title: r
|
|
@@ -1583,35 +1609,37 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1583
1609
|
return;
|
|
1584
1610
|
}
|
|
1585
1611
|
}
|
|
1586
|
-
function
|
|
1587
|
-
if (!r.routeDriven || !(r.routeTabFilter ??
|
|
1588
|
-
let t = (r.routeTabResolver ??
|
|
1612
|
+
function z(e) {
|
|
1613
|
+
if (!r.routeDriven || !(r.routeTabFilter ?? N)(e)) return;
|
|
1614
|
+
let t = (r.routeTabResolver ?? ie)(e);
|
|
1589
1615
|
if (!t) return;
|
|
1590
|
-
let n =
|
|
1591
|
-
|
|
1616
|
+
let n = I(), i = new Set(n.map((e) => e.path)), a = C.value.filter((e) => !i.has(e.path)), o = At([...n, ...a], t, { maxCount: O.value });
|
|
1617
|
+
C.value = o, r.preferences.tabbar.visitHistory && (E.value = Ut(E.value, e.path)), Q();
|
|
1592
1618
|
}
|
|
1593
|
-
function
|
|
1594
|
-
r.routeDriven &&
|
|
1619
|
+
function B(e) {
|
|
1620
|
+
r.routeDriven && m && e && e !== p?.path && m.push(e);
|
|
1595
1621
|
}
|
|
1596
|
-
function
|
|
1622
|
+
function se(e) {
|
|
1597
1623
|
return r.tabFallbackPath ? r.tabFallbackPath : e[0]?.path ?? "";
|
|
1598
1624
|
}
|
|
1599
|
-
let
|
|
1625
|
+
let V = o({
|
|
1600
1626
|
get: () => r.routeDriven ? p?.path ?? r.activeTabPath : u.value ?? r.activeTabPath,
|
|
1601
1627
|
set: (e) => {
|
|
1602
|
-
r.routeDriven ?
|
|
1628
|
+
r.routeDriven ? B(e) : u.value = e;
|
|
1603
1629
|
}
|
|
1604
|
-
}),
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1630
|
+
}), H = o(() => r.routeDriven ? C.value : r.tabs);
|
|
1631
|
+
P(H, (e) => a("tabsChange", [...e]), { immediate: !0 });
|
|
1632
|
+
let ce = o(() => H.value.length > 0), de = o(() => r.preferences.sidebar.collapsed), U = o(() => typeof p?.meta.activeMenu == "string" ? p.meta.activeMenu : ""), G = o(() => {
|
|
1633
|
+
let e = p?.path || V.value, t = U.value;
|
|
1634
|
+
return t && W(r.menus, t) ? t : e && W(r.menus, e) ? e : r.activeMenuPath && W(r.menus, r.activeMenuPath) ? r.activeMenuPath : r.activeMenuPath || e;
|
|
1635
|
+
}), pe = o(() => p?.path || V.value || G.value), J = o(() => ({
|
|
1608
1636
|
enable: r.preferences.breadcrumb?.enable ?? !0,
|
|
1609
1637
|
hideOnlyOne: r.preferences.breadcrumb?.hideOnlyOne ?? !1,
|
|
1610
1638
|
showHome: r.preferences.breadcrumb?.showHome ?? !0,
|
|
1611
1639
|
showIcon: r.preferences.breadcrumb?.showIcon ?? !0
|
|
1612
|
-
})),
|
|
1613
|
-
let e =
|
|
1614
|
-
activeTopMenuPath:
|
|
1640
|
+
})), me = o(() => r.preferences.header.globalSearch ?? !0), he = o(() => r.preferences.shortcutKeys?.globalSearch ?? !0), ve = o(() => q(r.menus, G.value)), Y = o(() => r.preferences.app.layout === "mixed-nav" && r.preferences.sidebar.enable), ye = o(() => Y.value ? r.menus.find((e) => !e.hidden && e.path === T.value)?.path ?? ve.value : ve.value), be = o(() => {
|
|
1641
|
+
let e = fe({
|
|
1642
|
+
activeTopMenuPath: ye.value,
|
|
1615
1643
|
layout: r.preferences.app.layout,
|
|
1616
1644
|
menus: r.menus
|
|
1617
1645
|
});
|
|
@@ -1619,16 +1647,16 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1619
1647
|
...e,
|
|
1620
1648
|
sidebarMenus: r.preferences.sidebar.enable ? e.sidebarMenus : []
|
|
1621
1649
|
};
|
|
1622
|
-
}),
|
|
1623
|
-
|
|
1650
|
+
}), xe = o(() => be.value.sidebarMenus), X = o(() => be.value.topMenus), Se = o(() => xe.value.length > 0), Z = o(() => X.value.length > 0), Ce = o(() => J.value.enable && Se.value && !Z.value), we = o(() => Y.value ? "flat" : "tree"), Te = o(() => we.value === "tree" ? G.value : ye.value), De = o(() => Z.value ? X.value : xe.value), Oe = o(() => De.value.some((e) => !e.hidden));
|
|
1651
|
+
P(() => [
|
|
1624
1652
|
p?.fullPath,
|
|
1625
|
-
|
|
1653
|
+
G.value,
|
|
1626
1654
|
r.menus,
|
|
1627
1655
|
r.preferences.app.layout,
|
|
1628
1656
|
r.preferences.sidebar.enable
|
|
1629
1657
|
], () => {
|
|
1630
|
-
T.value =
|
|
1631
|
-
}, { immediate: !0 }),
|
|
1658
|
+
T.value = ve.value;
|
|
1659
|
+
}, { immediate: !0 }), P(() => [
|
|
1632
1660
|
r.preferences.app.dynamicTitle ?? !0,
|
|
1633
1661
|
p?.meta.title,
|
|
1634
1662
|
r.title
|
|
@@ -1641,129 +1669,128 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1641
1669
|
}
|
|
1642
1670
|
!r && !i || (document.title = r && i && r !== i ? `${r} - ${i}` : r || i);
|
|
1643
1671
|
}, { immediate: !0 });
|
|
1644
|
-
|
|
1645
|
-
|
|
1672
|
+
let ke = !1;
|
|
1673
|
+
function Ae() {
|
|
1674
|
+
if (r.tabStorageKey && !(typeof sessionStorage > "u")) return {
|
|
1646
1675
|
getItem: sessionStorage.getItem.bind(sessionStorage),
|
|
1647
1676
|
removeItem: sessionStorage.removeItem.bind(sessionStorage),
|
|
1648
1677
|
setItem: sessionStorage.setItem.bind(sessionStorage)
|
|
1649
1678
|
};
|
|
1650
1679
|
}
|
|
1651
1680
|
function Q() {
|
|
1652
|
-
let e =
|
|
1653
|
-
if (!e || !r.tabStorageKey || !r.routeDriven) return;
|
|
1654
|
-
let t =
|
|
1655
|
-
tabs:
|
|
1656
|
-
history:
|
|
1681
|
+
let e = Ae();
|
|
1682
|
+
if (!ke || !r.preferences.tabbar.persist || !e || !r.tabStorageKey || !r.routeDriven) return;
|
|
1683
|
+
let t = Ct({
|
|
1684
|
+
tabs: C.value.map(L),
|
|
1685
|
+
history: E.value
|
|
1657
1686
|
});
|
|
1658
|
-
|
|
1659
|
-
}
|
|
1660
|
-
function Ae() {
|
|
1661
|
-
let e = ke();
|
|
1662
|
-
!e || !r.tabStorageKey || Mt(e, r.tabStorageKey);
|
|
1687
|
+
Tt(e, r.tabStorageKey, t);
|
|
1663
1688
|
}
|
|
1664
1689
|
function Me() {
|
|
1690
|
+
let e = Ae();
|
|
1691
|
+
!e || !r.tabStorageKey || Dt(e, r.tabStorageKey);
|
|
1692
|
+
}
|
|
1693
|
+
function Ne() {
|
|
1665
1694
|
if (!r.routeDriven) return;
|
|
1666
|
-
let e =
|
|
1695
|
+
let e = Ae();
|
|
1667
1696
|
if (!e || !r.tabStorageKey) return;
|
|
1668
|
-
let t =
|
|
1697
|
+
let t = Et(e, r.tabStorageKey), n = p?.path ?? "", i = Ot(t, {
|
|
1669
1698
|
currentPath: n,
|
|
1670
|
-
currentTab: p ? (r.routeTabResolver ??
|
|
1671
|
-
fixedTabs:
|
|
1672
|
-
isValidPath:
|
|
1673
|
-
resolveTab:
|
|
1699
|
+
currentTab: p ? (r.routeTabResolver ?? ie)(p) : void 0,
|
|
1700
|
+
fixedTabs: I(),
|
|
1701
|
+
isValidPath: R(),
|
|
1702
|
+
resolveTab: oe
|
|
1674
1703
|
});
|
|
1675
|
-
|
|
1704
|
+
C.value = jt(i.tabs, O.value, V.value), r.preferences.tabbar.visitHistory ? (n && i.history.unshift(n), E.value = Ut(i.history, n || "")) : E.value = [];
|
|
1676
1705
|
}
|
|
1677
|
-
function
|
|
1678
|
-
|
|
1706
|
+
function $(e) {
|
|
1707
|
+
v.value = e?.matches ?? A?.matches ?? !1, v.value && (b.value = !1);
|
|
1679
1708
|
}
|
|
1680
1709
|
te(() => {
|
|
1681
|
-
typeof window > "u" || typeof window.matchMedia != "function" || (
|
|
1710
|
+
typeof window > "u" || typeof window.matchMedia != "function" || (A = window.matchMedia("(max-width: 768px)"), $(), A.addEventListener?.("change", $));
|
|
1682
1711
|
}), ee(() => {
|
|
1683
|
-
|
|
1684
|
-
}),
|
|
1712
|
+
A?.removeEventListener?.("change", $);
|
|
1713
|
+
}), P(() => [
|
|
1685
1714
|
r.routeDriven,
|
|
1686
|
-
|
|
1715
|
+
O.value,
|
|
1687
1716
|
r.fixedTabs
|
|
1688
1717
|
], () => {
|
|
1689
1718
|
if (!r.routeDriven) {
|
|
1690
|
-
|
|
1719
|
+
C.value = [];
|
|
1691
1720
|
return;
|
|
1692
1721
|
}
|
|
1693
|
-
let e =
|
|
1694
|
-
for (let e of
|
|
1695
|
-
|
|
1722
|
+
let e = I(), t = new Set(e.map((e) => e.path)), n = [...e];
|
|
1723
|
+
for (let e of C.value.filter((e) => !t.has(e.path))) n = At(n, e, { maxCount: O.value });
|
|
1724
|
+
C.value = jt(kt(n), O.value, V.value), Q();
|
|
1696
1725
|
}, {
|
|
1697
1726
|
deep: !0,
|
|
1698
1727
|
immediate: !0
|
|
1699
|
-
}),
|
|
1700
|
-
p &&
|
|
1701
|
-
}, { immediate: !0 }),
|
|
1728
|
+
}), P(() => p?.fullPath, () => {
|
|
1729
|
+
p && z(p);
|
|
1730
|
+
}, { immediate: !0 }), r.preferences.tabbar.persist && Ne(), ke = !0, Q(), P(() => [
|
|
1702
1731
|
r.routeDriven,
|
|
1703
1732
|
r.tabStorageKey,
|
|
1704
1733
|
r.preferences.tabbar.persist
|
|
1705
1734
|
], (e, t) => {
|
|
1706
|
-
let n = e[0], r = e[2], i = t?.[
|
|
1707
|
-
n && r && !i &&
|
|
1708
|
-
}, { immediate: !1 })
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
if (y.value) {
|
|
1713
|
-
x.value = !x.value;
|
|
1735
|
+
let n = e[0], r = e[2], i = t?.[2];
|
|
1736
|
+
n && r && (e[1] !== t?.[1] || !i || !t?.[0]) && Ne(), !r && i && Me();
|
|
1737
|
+
}, { immediate: !1 });
|
|
1738
|
+
function Pe() {
|
|
1739
|
+
if (v.value) {
|
|
1740
|
+
b.value = !b.value;
|
|
1714
1741
|
return;
|
|
1715
1742
|
}
|
|
1716
1743
|
a("toggleSidebar");
|
|
1717
1744
|
}
|
|
1718
|
-
function Pe(e) {
|
|
1719
|
-
x.value = !1, a("menuSelect", e);
|
|
1720
|
-
}
|
|
1721
1745
|
function Fe(e) {
|
|
1722
|
-
|
|
1723
|
-
J.value && t && (n.length > 0 || !i) && (T.value = t.path), a("topMenuSelect", e), !(J.value && n.length > 0 && !r.preferences.sidebar.autoActivateChild) && Pe(fe(t) || e);
|
|
1746
|
+
b.value = !1, a("menuSelect", e);
|
|
1724
1747
|
}
|
|
1725
1748
|
function Ie(e) {
|
|
1726
|
-
|
|
1749
|
+
let t = W(r.menus, e), n = t?.children?.filter((e) => !e.hidden) ?? [], i = !!t?.externalLink && t?.externalTarget !== "_self";
|
|
1750
|
+
Y.value && t && (n.length > 0 || !i) && (T.value = t.path), a("topMenuSelect", e), !(Y.value && n.length > 0 && !r.preferences.sidebar.autoActivateChild) && Fe(K(t) || e);
|
|
1727
1751
|
}
|
|
1728
1752
|
function Le(e) {
|
|
1729
|
-
|
|
1753
|
+
Fe(K(W(r.menus, e)) || e);
|
|
1730
1754
|
}
|
|
1731
1755
|
function Re(e) {
|
|
1756
|
+
a("tabChange", e);
|
|
1757
|
+
}
|
|
1758
|
+
function ze(e) {
|
|
1732
1759
|
if (r.routeDriven) {
|
|
1733
|
-
let t =
|
|
1734
|
-
if (
|
|
1760
|
+
let t = C.value.findIndex((t) => t.path === e), n = Mt(C.value, e);
|
|
1761
|
+
if (C.value = n, V.value === e) {
|
|
1735
1762
|
let i = r.preferences.tabbar.visitHistory;
|
|
1736
|
-
|
|
1763
|
+
B(Wt(n, e, E.value, {
|
|
1737
1764
|
useHistory: i,
|
|
1738
1765
|
priorClosedIndex: t
|
|
1739
|
-
}) ||
|
|
1766
|
+
}) || se(n));
|
|
1740
1767
|
}
|
|
1741
1768
|
Q();
|
|
1742
1769
|
}
|
|
1743
1770
|
a("tabRemove", e);
|
|
1744
1771
|
}
|
|
1745
|
-
function ze(e) {
|
|
1746
|
-
r.routeDriven && (w.value = Rt(w.value, e), z(e), Q()), a("tabCloseLeft", e);
|
|
1747
|
-
}
|
|
1748
1772
|
function Be(e) {
|
|
1749
|
-
r.routeDriven && (
|
|
1773
|
+
r.routeDriven && (C.value = Nt(C.value, e), B(e), Q()), a("tabCloseLeft", e);
|
|
1750
1774
|
}
|
|
1751
1775
|
function Ve(e) {
|
|
1752
|
-
r.routeDriven && (
|
|
1776
|
+
r.routeDriven && (C.value = Pt(C.value, e), B(e), Q()), a("tabCloseRight", e);
|
|
1753
1777
|
}
|
|
1754
|
-
function He() {
|
|
1755
|
-
r.routeDriven && (
|
|
1778
|
+
function He(e) {
|
|
1779
|
+
r.routeDriven && (C.value = Ft(C.value, e), B(e), Q()), a("tabCloseOthers", e);
|
|
1756
1780
|
}
|
|
1757
|
-
function Ue(
|
|
1758
|
-
r.routeDriven && (
|
|
1781
|
+
function Ue() {
|
|
1782
|
+
r.routeDriven && (C.value = It(C.value), B(se(C.value)), Q()), a("tabCloseAll");
|
|
1759
1783
|
}
|
|
1760
1784
|
function We(e, t) {
|
|
1761
|
-
r.routeDriven && (
|
|
1785
|
+
r.routeDriven && (C.value = t ? Lt(C.value, e) : Rt(C.value, e), Q()), a("tabPin", e, t);
|
|
1762
1786
|
}
|
|
1763
|
-
function
|
|
1787
|
+
function Ke(e, t) {
|
|
1788
|
+
r.routeDriven && (C.value = Gt(C.value, e, t), Q()), a("tabReorder", e, t);
|
|
1789
|
+
}
|
|
1790
|
+
function qe(e) {
|
|
1764
1791
|
let t = r.resolveTabUrl ? r.resolveTabUrl(e) : (() => {
|
|
1765
|
-
if (
|
|
1766
|
-
return
|
|
1792
|
+
if (m) try {
|
|
1793
|
+
return m.resolve(e)?.href ?? e;
|
|
1767
1794
|
} catch {
|
|
1768
1795
|
return e;
|
|
1769
1796
|
}
|
|
@@ -1771,63 +1798,63 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1771
1798
|
})();
|
|
1772
1799
|
window.open(t, "_blank", "noopener,noreferrer"), a("tabNewWindow", e);
|
|
1773
1800
|
}
|
|
1774
|
-
function
|
|
1801
|
+
function Je(e) {
|
|
1775
1802
|
S.value = e, a("tabMaximize", e);
|
|
1776
1803
|
}
|
|
1777
|
-
function
|
|
1778
|
-
e.key === "Escape" && S.value && (e.preventDefault(), _.value?.setMaximized(!1),
|
|
1804
|
+
function Ye(e) {
|
|
1805
|
+
e.key === "Escape" && S.value && (e.preventDefault(), _.value?.setMaximized(!1), Je(!1));
|
|
1779
1806
|
}
|
|
1780
|
-
return
|
|
1781
|
-
typeof document > "u" || (e ? document.addEventListener("keydown",
|
|
1807
|
+
return P(S, (e) => {
|
|
1808
|
+
typeof document > "u" || (e ? document.addEventListener("keydown", Ye) : document.removeEventListener("keydown", Ye));
|
|
1782
1809
|
}), ee(() => {
|
|
1783
|
-
typeof document < "u" && document.removeEventListener("keydown",
|
|
1810
|
+
typeof document < "u" && document.removeEventListener("keydown", Ye);
|
|
1784
1811
|
}), t({
|
|
1785
1812
|
getLayoutElement: () => g.value?.$el,
|
|
1786
1813
|
getLayoutInstance: () => g.value,
|
|
1787
|
-
getTabs: () => [...
|
|
1788
|
-
getVisitHistory: () => [...
|
|
1814
|
+
getTabs: () => [...H.value],
|
|
1815
|
+
getVisitHistory: () => [...E.value],
|
|
1789
1816
|
resetTabs: () => {
|
|
1790
|
-
|
|
1817
|
+
C.value = It(C.value), E.value = [], B(se(C.value)), Q();
|
|
1791
1818
|
},
|
|
1792
1819
|
resetTabSnapshot: () => {
|
|
1793
|
-
|
|
1820
|
+
Me();
|
|
1794
1821
|
}
|
|
1795
|
-
}), (t, n) => (
|
|
1822
|
+
}), (t, n) => (x(), s(k(ae), {
|
|
1796
1823
|
ref_key: "layoutRef",
|
|
1797
1824
|
ref: g,
|
|
1798
|
-
class:
|
|
1799
|
-
"is-sidebar-collapsed":
|
|
1800
|
-
"is-sidebar-hidden": !
|
|
1801
|
-
"is-mobile-menu-hidden": !
|
|
1825
|
+
class: y(["lumal-layout", {
|
|
1826
|
+
"is-sidebar-collapsed": de.value,
|
|
1827
|
+
"is-sidebar-hidden": !Se.value,
|
|
1828
|
+
"is-mobile-menu-hidden": !b.value,
|
|
1802
1829
|
"is-content-maximized": S.value
|
|
1803
1830
|
}]),
|
|
1804
1831
|
"data-layout": e.preferences.app.layout,
|
|
1805
1832
|
direction: "vertical"
|
|
1806
1833
|
}, {
|
|
1807
|
-
default:
|
|
1834
|
+
default: F(() => [e.showHeader ? re((x(), s(je, {
|
|
1808
1835
|
key: 0,
|
|
1809
1836
|
title: e.title,
|
|
1810
|
-
collapsed:
|
|
1837
|
+
collapsed: v.value ? !b.value : de.value,
|
|
1811
1838
|
height: e.headerHeight,
|
|
1812
|
-
"mobile-only-toggle": !
|
|
1813
|
-
"sidebar-enabled":
|
|
1814
|
-
"toggle-after-title":
|
|
1815
|
-
onToggleCollapse:
|
|
1839
|
+
"mobile-only-toggle": !Se.value && Z.value,
|
|
1840
|
+
"sidebar-enabled": Se.value || Z.value,
|
|
1841
|
+
"toggle-after-title": Se.value && !v.value,
|
|
1842
|
+
onToggleCollapse: Pe
|
|
1816
1843
|
}, d({ _: 2 }, [
|
|
1817
1844
|
t.$slots.logo ? {
|
|
1818
1845
|
name: "logo",
|
|
1819
|
-
fn:
|
|
1846
|
+
fn: F(() => [w(t.$slots, "logo", {}, void 0, !0)]),
|
|
1820
1847
|
key: "0"
|
|
1821
1848
|
} : void 0,
|
|
1822
1849
|
Z.value ? {
|
|
1823
1850
|
name: "navigation",
|
|
1824
|
-
fn:
|
|
1825
|
-
menus:
|
|
1851
|
+
fn: F(() => [f(vt, {
|
|
1852
|
+
menus: X.value,
|
|
1826
1853
|
"active-path": Te.value,
|
|
1827
1854
|
align: e.preferences.header.menuAlign,
|
|
1828
1855
|
"max-width": e.preferences.header.menuMaxWidth,
|
|
1829
1856
|
mode: we.value,
|
|
1830
|
-
onSelect:
|
|
1857
|
+
onSelect: Ie
|
|
1831
1858
|
}, null, 8, [
|
|
1832
1859
|
"menus",
|
|
1833
1860
|
"active-path",
|
|
@@ -1839,15 +1866,15 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1839
1866
|
} : void 0,
|
|
1840
1867
|
Ce.value ? {
|
|
1841
1868
|
name: "breadcrumb",
|
|
1842
|
-
fn:
|
|
1869
|
+
fn: F(() => [f(ge, {
|
|
1843
1870
|
class: "lumal-layout__header-breadcrumb",
|
|
1844
|
-
"active-menu-path":
|
|
1845
|
-
"active-path":
|
|
1846
|
-
"hide-only-one":
|
|
1871
|
+
"active-menu-path": G.value,
|
|
1872
|
+
"active-path": pe.value,
|
|
1873
|
+
"hide-only-one": J.value.hideOnlyOne,
|
|
1847
1874
|
menus: e.menus,
|
|
1848
|
-
"show-home":
|
|
1849
|
-
"show-icon":
|
|
1850
|
-
onSelect:
|
|
1875
|
+
"show-home": J.value.showHome,
|
|
1876
|
+
"show-icon": J.value.showIcon,
|
|
1877
|
+
onSelect: Le
|
|
1851
1878
|
}, null, 8, [
|
|
1852
1879
|
"active-menu-path",
|
|
1853
1880
|
"active-path",
|
|
@@ -1858,14 +1885,14 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1858
1885
|
])]),
|
|
1859
1886
|
key: "2"
|
|
1860
1887
|
} : void 0,
|
|
1861
|
-
|
|
1888
|
+
me.value || t.$slots.headerActions ? {
|
|
1862
1889
|
name: "actions",
|
|
1863
|
-
fn:
|
|
1890
|
+
fn: F(() => [me.value ? (x(), s(Ee, {
|
|
1864
1891
|
key: 0,
|
|
1865
1892
|
menus: e.menus,
|
|
1866
|
-
shortcut:
|
|
1867
|
-
onSelect:
|
|
1868
|
-
}, null, 8, ["menus", "shortcut"])) : c("", !0),
|
|
1893
|
+
shortcut: he.value,
|
|
1894
|
+
onSelect: Le
|
|
1895
|
+
}, null, 8, ["menus", "shortcut"])) : c("", !0), w(t.$slots, "headerActions", {}, void 0, !0)]),
|
|
1869
1896
|
key: "3"
|
|
1870
1897
|
} : void 0
|
|
1871
1898
|
]), 1032, [
|
|
@@ -1875,30 +1902,30 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1875
1902
|
"mobile-only-toggle",
|
|
1876
1903
|
"sidebar-enabled",
|
|
1877
1904
|
"toggle-after-title"
|
|
1878
|
-
])), [[
|
|
1879
|
-
default:
|
|
1880
|
-
Oe.value && !S.value ? (
|
|
1905
|
+
])), [[ne, !S.value]]) : c("", !0), f(k(ae), { class: "lumal-layout__body" }, {
|
|
1906
|
+
default: F(() => [
|
|
1907
|
+
Oe.value && !S.value ? (x(), l("button", {
|
|
1881
1908
|
key: 0,
|
|
1882
1909
|
class: "lumal-layout__sidebar-scrim",
|
|
1883
1910
|
type: "button",
|
|
1884
1911
|
"aria-label": "关闭侧边栏",
|
|
1885
|
-
onClick: n[0] ||= (e) =>
|
|
1912
|
+
onClick: n[0] ||= (e) => b.value = !1
|
|
1886
1913
|
})) : c("", !0),
|
|
1887
|
-
S.value ? c("", !0) : (
|
|
1914
|
+
S.value ? c("", !0) : (x(), s(i, {
|
|
1888
1915
|
key: 1,
|
|
1889
1916
|
name: "lumal-layout-sidebar",
|
|
1890
1917
|
appear: ""
|
|
1891
1918
|
}, {
|
|
1892
|
-
default:
|
|
1919
|
+
default: F(() => [Se.value ? (x(), s(Ge, {
|
|
1893
1920
|
key: 0,
|
|
1894
1921
|
class: "lumal-layout__desktop-sidebar",
|
|
1895
1922
|
"aria-label": "主菜单",
|
|
1896
|
-
menus:
|
|
1897
|
-
"active-path":
|
|
1898
|
-
collapsed:
|
|
1923
|
+
menus: xe.value,
|
|
1924
|
+
"active-path": G.value,
|
|
1925
|
+
collapsed: de.value,
|
|
1899
1926
|
width: `${e.preferences.sidebar.width}px`,
|
|
1900
1927
|
"collapsed-width": "64px",
|
|
1901
|
-
onSelect:
|
|
1928
|
+
onSelect: Fe
|
|
1902
1929
|
}, null, 8, [
|
|
1903
1930
|
"menus",
|
|
1904
1931
|
"active-path",
|
|
@@ -1907,18 +1934,18 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1907
1934
|
])) : c("", !0)]),
|
|
1908
1935
|
_: 1
|
|
1909
1936
|
})),
|
|
1910
|
-
Oe.value && !S.value ? (
|
|
1937
|
+
Oe.value && !S.value ? (x(), s(Ge, {
|
|
1911
1938
|
key: 2,
|
|
1912
1939
|
class: "lumal-layout__mobile-sidebar",
|
|
1913
1940
|
"aria-label": "移动菜单",
|
|
1914
|
-
"aria-hidden": !
|
|
1915
|
-
inert: !
|
|
1941
|
+
"aria-hidden": !b.value,
|
|
1942
|
+
inert: !b.value || void 0,
|
|
1916
1943
|
menus: De.value,
|
|
1917
|
-
"active-path":
|
|
1944
|
+
"active-path": G.value,
|
|
1918
1945
|
collapsed: !1,
|
|
1919
1946
|
width: `${e.preferences.sidebar.width}px`,
|
|
1920
1947
|
"collapsed-width": "64px",
|
|
1921
|
-
onSelect:
|
|
1948
|
+
onSelect: Fe
|
|
1922
1949
|
}, null, 8, [
|
|
1923
1950
|
"aria-hidden",
|
|
1924
1951
|
"inert",
|
|
@@ -1926,21 +1953,21 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1926
1953
|
"active-path",
|
|
1927
1954
|
"width"
|
|
1928
1955
|
])) : c("", !0),
|
|
1929
|
-
f(
|
|
1956
|
+
f(k(ae), {
|
|
1930
1957
|
class: "lumal-layout__main",
|
|
1931
1958
|
direction: "vertical",
|
|
1932
1959
|
"data-layout-fullscreen-target": ""
|
|
1933
1960
|
}, {
|
|
1934
|
-
default:
|
|
1935
|
-
|
|
1961
|
+
default: F(() => [
|
|
1962
|
+
J.value.enable && !Ce.value && !S.value ? (x(), s(ge, {
|
|
1936
1963
|
key: 0,
|
|
1937
|
-
"active-menu-path":
|
|
1938
|
-
"active-path":
|
|
1939
|
-
"hide-only-one":
|
|
1964
|
+
"active-menu-path": G.value,
|
|
1965
|
+
"active-path": pe.value,
|
|
1966
|
+
"hide-only-one": J.value.hideOnlyOne,
|
|
1940
1967
|
menus: e.menus,
|
|
1941
|
-
"show-home":
|
|
1942
|
-
"show-icon":
|
|
1943
|
-
onSelect:
|
|
1968
|
+
"show-home": J.value.showHome,
|
|
1969
|
+
"show-icon": J.value.showIcon,
|
|
1970
|
+
onSelect: Le
|
|
1944
1971
|
}, null, 8, [
|
|
1945
1972
|
"active-menu-path",
|
|
1946
1973
|
"active-path",
|
|
@@ -1949,13 +1976,13 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1949
1976
|
"show-home",
|
|
1950
1977
|
"show-icon"
|
|
1951
1978
|
])) : c("", !0),
|
|
1952
|
-
|
|
1979
|
+
ce.value && e.preferences.tabbar.enable ? (x(), s(ft, {
|
|
1953
1980
|
key: 1,
|
|
1954
1981
|
ref_key: "tabsRef",
|
|
1955
1982
|
ref: _,
|
|
1956
|
-
"active-path":
|
|
1957
|
-
"onUpdate:activePath": n[1] ||= (e) =>
|
|
1958
|
-
tabs:
|
|
1983
|
+
"active-path": V.value,
|
|
1984
|
+
"onUpdate:activePath": n[1] ||= (e) => V.value = e,
|
|
1985
|
+
tabs: H.value,
|
|
1959
1986
|
"show-icon": e.preferences.tabbar.showIcon,
|
|
1960
1987
|
"show-maximize": e.preferences.tabbar.showMaximize,
|
|
1961
1988
|
"show-more": e.preferences.tabbar.showMore,
|
|
@@ -1964,17 +1991,17 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1964
1991
|
wheelable: e.preferences.tabbar.wheelable,
|
|
1965
1992
|
"middle-click-to-close": e.preferences.tabbar.middleClickToClose,
|
|
1966
1993
|
"style-type": e.preferences.tabbar.styleType,
|
|
1967
|
-
onChange:
|
|
1968
|
-
onCloseAll:
|
|
1969
|
-
onCloseLeft:
|
|
1970
|
-
onCloseOthers:
|
|
1971
|
-
onCloseRight:
|
|
1972
|
-
onMaximize:
|
|
1973
|
-
onNewWindow:
|
|
1974
|
-
onPin:
|
|
1994
|
+
onChange: Re,
|
|
1995
|
+
onCloseAll: Ue,
|
|
1996
|
+
onCloseLeft: Be,
|
|
1997
|
+
onCloseOthers: He,
|
|
1998
|
+
onCloseRight: Ve,
|
|
1999
|
+
onMaximize: Je,
|
|
2000
|
+
onNewWindow: qe,
|
|
2001
|
+
onPin: We,
|
|
1975
2002
|
onRefresh: n[2] ||= (e) => a("tabRefresh", e),
|
|
1976
|
-
onRemove:
|
|
1977
|
-
onReorder:
|
|
2003
|
+
onRemove: ze,
|
|
2004
|
+
onReorder: Ke
|
|
1978
2005
|
}, null, 8, [
|
|
1979
2006
|
"active-path",
|
|
1980
2007
|
"tabs",
|
|
@@ -1988,7 +2015,7 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
1988
2015
|
"style-type"
|
|
1989
2016
|
])) : c("", !0),
|
|
1990
2017
|
f(_e, null, {
|
|
1991
|
-
default:
|
|
2018
|
+
default: F(() => [w(t.$slots, "default", { tabs: H.value }, void 0, !0)]),
|
|
1992
2019
|
_: 3
|
|
1993
2020
|
})
|
|
1994
2021
|
]),
|
|
@@ -2000,15 +2027,15 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
2000
2027
|
_: 3
|
|
2001
2028
|
}, 8, ["data-layout", "class"]));
|
|
2002
2029
|
}
|
|
2003
|
-
}), [["__scopeId", "data-v-
|
|
2030
|
+
}), [["__scopeId", "data-v-d4178515"]]), Jt = {
|
|
2004
2031
|
key: 0,
|
|
2005
2032
|
class: "lumal-router-view__progress",
|
|
2006
2033
|
"aria-hidden": "true"
|
|
2007
|
-
},
|
|
2034
|
+
}, Yt = {
|
|
2008
2035
|
key: 1,
|
|
2009
2036
|
class: "lumal-router-view__loading",
|
|
2010
2037
|
"aria-hidden": "true"
|
|
2011
|
-
},
|
|
2038
|
+
}, Xt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2012
2039
|
__name: "LumalRouterView",
|
|
2013
2040
|
props: {
|
|
2014
2041
|
viewKey: { default: "default" },
|
|
@@ -2029,57 +2056,91 @@ var Qt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
2029
2056
|
type: Boolean,
|
|
2030
2057
|
default: !1
|
|
2031
2058
|
},
|
|
2032
|
-
cacheMax: { default:
|
|
2059
|
+
cacheMax: { default: 20 },
|
|
2060
|
+
cacheKeys: {}
|
|
2033
2061
|
},
|
|
2034
2062
|
setup(e, { expose: t }) {
|
|
2035
|
-
let r = e, a =
|
|
2036
|
-
function
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
}
|
|
2042
|
-
function te(e) {
|
|
2043
|
-
d.value = !1, p.value = !1, m.add(e), _ = void 0;
|
|
2044
|
-
}
|
|
2045
|
-
function x(e) {
|
|
2046
|
-
if (v(), d.value = r.progress && !y(e), p.value = r.loading && !y(e), !d.value && !p.value) {
|
|
2047
|
-
m.add(e);
|
|
2048
|
-
return;
|
|
2049
|
-
}
|
|
2050
|
-
_ = setTimeout(te, 520, e);
|
|
2063
|
+
let r = e, a = M("routerViewRef"), d = h(le, void 0), g = h(ue, void 0), _ = D(!1), v = o(() => r.progress && _.value), y = o(() => r.loading && _.value), b = o(() => Number.isFinite(r.cacheMax) && r.cacheMax > 0 ? Math.max(1, Math.floor(r.cacheMax)) : 20), te = o(() => r.transition ? r.transitionName : void 0);
|
|
2064
|
+
function S(e) {
|
|
2065
|
+
return p({
|
|
2066
|
+
name: e,
|
|
2067
|
+
setup: (e, { slots: t }) => () => m("div", { class: "lumal-router-view__page" }, t.default?.())
|
|
2068
|
+
});
|
|
2051
2069
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2070
|
+
let C = /* @__PURE__ */ new WeakMap();
|
|
2071
|
+
function w(e) {
|
|
2072
|
+
if (!e) return;
|
|
2073
|
+
let t = e.type, n = C.get(t);
|
|
2074
|
+
return n || (n = S("LumalUncachedView"), C.set(t, n)), n;
|
|
2075
|
+
}
|
|
2076
|
+
let T = /* @__PURE__ */ new Map(), O = D(), A = D([]), j = 0;
|
|
2077
|
+
P([
|
|
2078
|
+
() => r.viewKey,
|
|
2079
|
+
() => r.cacheKeys?.slice(),
|
|
2080
|
+
() => r.cache,
|
|
2081
|
+
b,
|
|
2082
|
+
() => d?.meta.keepAlive
|
|
2083
|
+
], () => {
|
|
2084
|
+
let e = r.cacheKeys ? new Set(r.cacheKeys) : void 0;
|
|
2085
|
+
for (let t of T.keys()) (!r.cache || e && !e.has(t) || t === r.viewKey && d?.meta.keepAlive === !1) && T.delete(t);
|
|
2086
|
+
let t = T.get(r.viewKey);
|
|
2087
|
+
if (r.cache && d?.meta.keepAlive !== !1 && (!e || e.has(r.viewKey))) {
|
|
2088
|
+
if (!t) {
|
|
2089
|
+
let e = `LumalCachedView${++j}`;
|
|
2090
|
+
t = {
|
|
2091
|
+
name: e,
|
|
2092
|
+
component: S(e)
|
|
2093
|
+
};
|
|
2094
|
+
}
|
|
2095
|
+
T.delete(r.viewKey), T.set(r.viewKey, t);
|
|
2096
|
+
} else t = void 0;
|
|
2097
|
+
for (; T.size > b.value;) T.delete(T.keys().next().value);
|
|
2098
|
+
O.value = t?.component, A.value = [...T.values()].map((e) => e.name);
|
|
2099
|
+
}, { immediate: !0 });
|
|
2100
|
+
let N, ne = g?.beforeEach((e) => {
|
|
2101
|
+
N = e, _.value = !0;
|
|
2102
|
+
}), re = g?.afterEach((e) => {
|
|
2103
|
+
N === e && (_.value = !1);
|
|
2104
|
+
}), ie = g?.onError((e, t) => {
|
|
2105
|
+
N === t && (_.value = !1);
|
|
2106
|
+
});
|
|
2107
|
+
return ee(() => {
|
|
2108
|
+
ne?.(), re?.(), ie?.(), T.clear();
|
|
2109
|
+
}), t({ getRouterViewElement: () => a.value }), (t, r) => (x(), l("div", {
|
|
2057
2110
|
ref_key: "routerViewRef",
|
|
2058
2111
|
ref: a,
|
|
2059
2112
|
class: "lumal-router-view"
|
|
2060
2113
|
}, [
|
|
2061
|
-
|
|
2062
|
-
f(
|
|
2063
|
-
default:
|
|
2064
|
-
key: 0,
|
|
2114
|
+
v.value ? (x(), l("div", Jt, [...r[0] ||= [u("span", { class: "lumal-router-view__progress-bar" }, null, -1)]])) : c("", !0),
|
|
2115
|
+
f(k(ce), null, {
|
|
2116
|
+
default: F(({ Component: t }) => [f(i, {
|
|
2065
2117
|
appear: "",
|
|
2066
|
-
mode: "out-in",
|
|
2067
|
-
name:
|
|
2118
|
+
mode: e.transition ? "out-in" : void 0,
|
|
2119
|
+
name: te.value,
|
|
2120
|
+
css: e.transition
|
|
2068
2121
|
}, {
|
|
2069
|
-
default:
|
|
2122
|
+
default: F(() => [e.cache ? (x(), s(n, {
|
|
2070
2123
|
key: 0,
|
|
2071
|
-
|
|
2072
|
-
|
|
2124
|
+
include: A.value,
|
|
2125
|
+
max: b.value
|
|
2126
|
+
}, [(x(), s(E(O.value ?? w(t)), { key: e.viewKey }, {
|
|
2127
|
+
default: F(() => [(x(), s(E(t)))]),
|
|
2128
|
+
_: 2
|
|
2129
|
+
}, 1024))], 1032, ["include", "max"])) : (x(), s(E(w(t)), { key: e.viewKey }, {
|
|
2130
|
+
default: F(() => [(x(), s(E(t)))]),
|
|
2131
|
+
_: 2
|
|
2132
|
+
}, 1024))]),
|
|
2073
2133
|
_: 2
|
|
2074
|
-
}, 1032, [
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2134
|
+
}, 1032, [
|
|
2135
|
+
"mode",
|
|
2136
|
+
"name",
|
|
2137
|
+
"css"
|
|
2138
|
+
])]),
|
|
2078
2139
|
_: 1
|
|
2079
2140
|
}),
|
|
2080
|
-
|
|
2141
|
+
y.value ? (x(), l("div", Yt, [...r[1] ||= [u("span", { class: "lumal-router-view__loading-dot" }, null, -1)]])) : c("", !0)
|
|
2081
2142
|
], 512));
|
|
2082
2143
|
}
|
|
2083
|
-
}), [["__scopeId", "data-v-
|
|
2144
|
+
}), [["__scopeId", "data-v-e4c57039"]]);
|
|
2084
2145
|
//#endregion
|
|
2085
|
-
export {
|
|
2146
|
+
export { Ge as A, fe as B, wt as C, Tt as D, Ct as E, W as F, G as I, U as L, Ee as M, _e as N, vt as O, ge as P, q as R, Dt as S, Ot as T, Wt as _, Bt as a, bt as b, Ft as c, Pt as d, zt as f, Kt as g, Gt as h, Vt as i, je as j, ft as k, Mt as l, Ut as m, qt as n, jt as o, Lt as p, At as r, It as s, Xt as t, Nt as u, kt as v, Et as w, yt as x, Rt as y, K as z };
|