@robot-admin/layout 2.3.2 → 3.1.0
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 +153 -0
- package/LICENSE +21 -0
- package/README.md +156 -65
- package/dist/core/index.cjs +310 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +121 -0
- package/dist/core/index.d.ts +121 -0
- package/dist/core/index.js +273 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1939 -0
- package/dist/index.d.ts +1001 -127
- package/dist/index.js +1518 -1337
- package/dist/index.js.map +1 -1
- package/package.json +39 -14
package/dist/index.js
CHANGED
|
@@ -1,361 +1,59 @@
|
|
|
1
|
-
import { Fragment as e, KeepAlive as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, inject as p,
|
|
2
|
-
import {
|
|
3
|
-
import { NButton as F, NColorPicker as I, NDrawer as L, NDrawerContent as R, NDropdown as z, NInput as B, NLayout as V, NLayoutContent as H, NLayoutSider as ee, NMenu as te, NRadioButton as U, NRadioGroup as W, NSlider as ne, NSwitch as G, NTabPane as re, NTabs as ie, useDialog as ae, useMessage as oe } from "naive-ui";
|
|
1
|
+
import { Fragment as e, KeepAlive as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, inject as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, toDisplayString as D, toValue as O, unref as k, useModel as A, watch as j, withCtx as M, withKeys as N, withModifiers as P } from "vue";
|
|
2
|
+
import { NButton as F, NColorPicker as I, NDrawer as L, NDrawerContent as R, NDropdown as z, NInput as B, NLayout as V, NLayoutContent as H, NLayoutSider as U, NMenu as ee, NRadioButton as W, NRadioGroup as te, NSlider as ne, NSwitch as G, NTabPane as re, NTabs as ie, useDialog as ae, useMessage as oe } from "naive-ui";
|
|
4
3
|
import { useRoute as K, useRouter as q } from "vue-router";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
name: "薄暮红",
|
|
13
|
-
value: "#f5222d"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "火山橙",
|
|
17
|
-
value: "#fa541c"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: "日暮黄",
|
|
21
|
-
value: "#faad14"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "极光绿",
|
|
25
|
-
value: "#52c41a"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: "明青",
|
|
29
|
-
value: "#13c2c2"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "极客蓝",
|
|
33
|
-
value: "#2f54eb"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "酱紫",
|
|
37
|
-
value: "#722ed1"
|
|
38
|
-
}
|
|
39
|
-
], ce = [
|
|
40
|
-
{
|
|
41
|
-
name: "科技蓝",
|
|
42
|
-
icon: "💙",
|
|
43
|
-
primaryColor: "#409eff"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "清新绿",
|
|
47
|
-
icon: "💚",
|
|
48
|
-
primaryColor: "#52c41a"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "商务灰",
|
|
52
|
-
icon: "🖤",
|
|
53
|
-
primaryColor: "#595959"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: "活力橙",
|
|
57
|
-
icon: "🧡",
|
|
58
|
-
primaryColor: "#fa8c16"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: "优雅紫",
|
|
62
|
-
icon: "💜",
|
|
63
|
-
primaryColor: "#722ed1"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "经典红",
|
|
67
|
-
icon: "❤️",
|
|
68
|
-
primaryColor: "#f5222d"
|
|
69
|
-
}
|
|
70
|
-
], le = [
|
|
71
|
-
{
|
|
72
|
-
mode: "side",
|
|
73
|
-
label: "左侧菜单",
|
|
74
|
-
description: "经典的左侧导航布局",
|
|
75
|
-
icon: "i-mdi:page-layout-sidebar-left"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
mode: "top",
|
|
79
|
-
label: "顶部菜单",
|
|
80
|
-
description: "顶部水平导航布局",
|
|
81
|
-
icon: "i-mdi:page-layout-header"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
mode: "mix",
|
|
85
|
-
label: "混合菜单",
|
|
86
|
-
description: "顶部 + 侧边混合布局",
|
|
87
|
-
icon: "i-mdi:view-dashboard-outline"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
mode: "mix-top",
|
|
91
|
-
label: "顶部混合",
|
|
92
|
-
description: "侧边优先的混合布局",
|
|
93
|
-
icon: "i-mdi:view-dashboard-variant-outline"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
mode: "reverse-horizontal-mix",
|
|
97
|
-
label: "反转混合",
|
|
98
|
-
description: "反转的水平混合布局",
|
|
99
|
-
icon: "i-mdi:page-layout-header-footer"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
mode: "card-layout",
|
|
103
|
-
label: "卡片布局",
|
|
104
|
-
description: "卡片式布局风格",
|
|
105
|
-
icon: "i-mdi:card-outline"
|
|
106
|
-
}
|
|
107
|
-
], ue = {
|
|
108
|
-
small: "4px",
|
|
109
|
-
medium: "6px",
|
|
110
|
-
large: "8px"
|
|
111
|
-
}, de = {
|
|
112
|
-
fade: "fade-transform",
|
|
113
|
-
slide: "fade-slide",
|
|
114
|
-
zoom: "fade-zoom",
|
|
115
|
-
none: ""
|
|
116
|
-
}, J = {
|
|
117
|
-
themeMode: "light",
|
|
118
|
-
primaryColor: "#409eff",
|
|
119
|
-
borderRadius: "medium",
|
|
120
|
-
transitionType: "slide",
|
|
121
|
-
enableTransition: !0,
|
|
122
|
-
layoutMode: "side",
|
|
123
|
-
menuExpandMode: "inline",
|
|
124
|
-
collapsed: !1,
|
|
125
|
-
fixedHeader: !0,
|
|
126
|
-
showBreadcrumb: !0,
|
|
127
|
-
showBreadcrumbIcon: !0,
|
|
128
|
-
showTagsView: !0,
|
|
129
|
-
tagsViewHeight: 44,
|
|
130
|
-
tagsViewStyle: "default",
|
|
131
|
-
showFooter: !0,
|
|
132
|
-
sidebarWidth: 220,
|
|
133
|
-
sidebarCollapsedWidth: 64,
|
|
134
|
-
headerHeight: 56,
|
|
135
|
-
enableHotkeys: !0,
|
|
136
|
-
version: "2.3.2"
|
|
137
|
-
}, fe = se.map((e) => e.value), pe = {
|
|
138
|
-
themeMode: new Set([
|
|
139
|
-
"light",
|
|
140
|
-
"dark",
|
|
141
|
-
"system"
|
|
142
|
-
]),
|
|
143
|
-
borderRadius: new Set([
|
|
144
|
-
"small",
|
|
145
|
-
"medium",
|
|
146
|
-
"large"
|
|
147
|
-
]),
|
|
148
|
-
transitionType: new Set([
|
|
149
|
-
"fade",
|
|
150
|
-
"slide",
|
|
151
|
-
"zoom",
|
|
152
|
-
"none"
|
|
153
|
-
]),
|
|
154
|
-
layoutMode: new Set([
|
|
155
|
-
"side",
|
|
156
|
-
"top",
|
|
157
|
-
"mix",
|
|
158
|
-
"mix-top",
|
|
159
|
-
"reverse-horizontal-mix",
|
|
160
|
-
"card-layout"
|
|
161
|
-
]),
|
|
162
|
-
menuExpandMode: new Set(["inline", "panel"]),
|
|
163
|
-
tagsViewStyle: new Set([
|
|
164
|
-
"default",
|
|
165
|
-
"card",
|
|
166
|
-
"smart"
|
|
167
|
-
])
|
|
168
|
-
}, me = new Set([
|
|
169
|
-
"enableTransition",
|
|
170
|
-
"collapsed",
|
|
171
|
-
"fixedHeader",
|
|
172
|
-
"showBreadcrumb",
|
|
173
|
-
"showBreadcrumbIcon",
|
|
174
|
-
"showTagsView",
|
|
175
|
-
"showFooter",
|
|
176
|
-
"enableHotkeys"
|
|
177
|
-
]), he = {
|
|
178
|
-
tagsViewHeight: [24, 100],
|
|
179
|
-
sidebarWidth: [120, 480],
|
|
180
|
-
sidebarCollapsedWidth: [32, 160],
|
|
181
|
-
headerHeight: [32, 160]
|
|
182
|
-
};
|
|
183
|
-
function ge(e) {
|
|
184
|
-
if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("settings 必须是对象");
|
|
185
|
-
let t = e, n = {}, r = (e, t) => {
|
|
186
|
-
n[e] = t;
|
|
187
|
-
};
|
|
188
|
-
for (let [e, n] of Object.entries(pe)) {
|
|
189
|
-
let i = t[e];
|
|
190
|
-
if (i !== void 0) {
|
|
191
|
-
if (typeof i != "string" || !n.has(i)) throw RangeError(`无效的设置项 ${e}: ${String(i)}`);
|
|
192
|
-
r(e, i);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
for (let e of me) {
|
|
196
|
-
let n = t[e];
|
|
197
|
-
if (n !== void 0) {
|
|
198
|
-
if (typeof n != "boolean") throw TypeError(`设置项 ${e} 必须是布尔值`);
|
|
199
|
-
r(e, n);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
for (let [e, n] of Object.entries(he)) {
|
|
203
|
-
let i = t[e];
|
|
204
|
-
if (i !== void 0) {
|
|
205
|
-
if (typeof i != "number" || !Number.isFinite(i) || i < n[0] || i > n[1]) throw RangeError(`设置项 ${e} 超出允许范围`);
|
|
206
|
-
r(e, i);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (t.primaryColor !== void 0) {
|
|
210
|
-
if (typeof t.primaryColor != "string" || !/^#[0-9a-fA-F]{6}$/.test(t.primaryColor)) throw RangeError("primaryColor 必须是 #rrggbb 格式");
|
|
211
|
-
n.primaryColor = t.primaryColor;
|
|
212
|
-
}
|
|
213
|
-
if (t.version !== void 0) {
|
|
214
|
-
if (typeof t.version != "string" || t.version.length > 50) throw TypeError("version 必须是长度不超过 50 的字符串");
|
|
215
|
-
n.version = t.version;
|
|
216
|
-
}
|
|
217
|
-
return n;
|
|
4
|
+
import { defineStore as se } from "pinia";
|
|
5
|
+
//#region src/composables/useLayoutContext.ts
|
|
6
|
+
var J = Symbol("layout-context"), ce = Symbol("layout-settings"), le = Symbol("menu-collapse"), ue = Symbol("drawer-handlers");
|
|
7
|
+
function Y() {
|
|
8
|
+
let e = p(J);
|
|
9
|
+
if (!e) throw Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");
|
|
10
|
+
return e;
|
|
218
11
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
if (!Number.isFinite(t)) return e;
|
|
222
|
-
let n = Math.round(t), r = e.trim(), i = r.startsWith("#") ? r.slice(1) : r;
|
|
223
|
-
if (i.length === 3 && (i = i.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(i)) return e;
|
|
224
|
-
let a = parseInt(i, 16), o = Math.min(255, Math.max(0, (a >> 16) + n)), s = Math.min(255, Math.max(0, (a >> 8 & 255) + n)), c = Math.min(255, Math.max(0, (a & 255) + n));
|
|
225
|
-
return `#${(o << 16 | s << 8 | c).toString(16).padStart(6, "0")}`;
|
|
12
|
+
function de(e) {
|
|
13
|
+
return x(J, e), e;
|
|
226
14
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
v,
|
|
265
|
-
y,
|
|
266
|
-
b,
|
|
267
|
-
h
|
|
268
|
-
], () => {
|
|
269
|
-
O();
|
|
270
|
-
}, { immediate: !0 }), {
|
|
271
|
-
themeMode: e,
|
|
272
|
-
primaryColor: t,
|
|
273
|
-
borderRadius: n,
|
|
274
|
-
transitionType: o,
|
|
275
|
-
enableTransition: s,
|
|
276
|
-
layoutMode: c,
|
|
277
|
-
menuExpandMode: l,
|
|
278
|
-
collapsed: u,
|
|
279
|
-
fixedHeader: d,
|
|
280
|
-
showBreadcrumb: f,
|
|
281
|
-
showBreadcrumbIcon: p,
|
|
282
|
-
showTagsView: m,
|
|
283
|
-
tagsViewHeight: h,
|
|
284
|
-
tagsViewStyle: g,
|
|
285
|
-
showFooter: _,
|
|
286
|
-
sidebarWidth: v,
|
|
287
|
-
sidebarCollapsedWidth: y,
|
|
288
|
-
headerHeight: b,
|
|
289
|
-
enableHotkeys: S,
|
|
290
|
-
version: C,
|
|
291
|
-
borderRadiusValue: w,
|
|
292
|
-
transitionName: T,
|
|
293
|
-
shouldEnableTransition: E,
|
|
294
|
-
settingsState: D,
|
|
295
|
-
syncCSSVariables: O,
|
|
296
|
-
applyPreset: async (e) => {
|
|
297
|
-
t.value = e.primaryColor, e.settings && (e.settings.borderRadius && (n.value = e.settings.borderRadius), e.settings.transitionType && (o.value = e.settings.transitionType), e.settings.showBreadcrumb !== void 0 && (f.value = e.settings.showBreadcrumb), e.settings.showTagsView !== void 0 && (m.value = e.settings.showTagsView), e.settings.tagsViewStyle && (g.value = e.settings.tagsViewStyle));
|
|
298
|
-
},
|
|
299
|
-
resetSettings: () => {
|
|
300
|
-
e.value = a.themeMode, t.value = a.primaryColor, n.value = a.borderRadius, o.value = a.transitionType, s.value = a.enableTransition, c.value = a.layoutMode, l.value = a.menuExpandMode, u.value = a.collapsed, d.value = a.fixedHeader, f.value = a.showBreadcrumb, p.value = a.showBreadcrumbIcon, m.value = a.showTagsView, h.value = a.tagsViewHeight, g.value = a.tagsViewStyle, _.value = a.showFooter, v.value = a.sidebarWidth, y.value = a.sidebarCollapsedWidth, b.value = a.headerHeight, S.value = a.enableHotkeys;
|
|
301
|
-
},
|
|
302
|
-
updateThemeMode: async (t) => {
|
|
303
|
-
if (!pe.themeMode.has(t)) throw RangeError(`未知的主题模式: ${String(t)}`);
|
|
304
|
-
let n = e.value;
|
|
305
|
-
e.value = t;
|
|
306
|
-
try {
|
|
307
|
-
i && await i(t);
|
|
308
|
-
} catch (t) {
|
|
309
|
-
throw e.value = n, t;
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
toggleCollapse: () => {
|
|
313
|
-
u.value = !u.value;
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
var ye = ve(), be = Symbol("layout-context"), xe = Symbol("drawer-handlers");
|
|
319
|
-
function Y() {
|
|
320
|
-
let e = p(be);
|
|
321
|
-
if (!e) throw Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");
|
|
322
|
-
return e;
|
|
323
|
-
}
|
|
324
|
-
var X = {
|
|
325
|
-
name: "Admin",
|
|
326
|
-
subtitle: "",
|
|
327
|
-
logoSrc: "",
|
|
328
|
-
logoType: "image",
|
|
329
|
-
logoSize: 36,
|
|
330
|
-
homePath: "/home",
|
|
331
|
-
copyright: ""
|
|
332
|
-
};
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/composables/useLayoutCache.ts
|
|
335
|
-
function Z(e = {}) {
|
|
336
|
-
let { maxCacheCount: t = 20, enableDevLog: n = !1, exposeToWindow: r = !1 } = e, i = K(), a = x([]), o = x(t), s = (e) => !e || typeof e != "string" ? !1 : i.meta?.keepAlive === !0, c = (e) => {
|
|
337
|
-
!a.value.includes(e) && s(e) && (a.value.push(e), a.value.length > o.value && a.value.shift(), n && console.debug(`[KeepAlive] ✅ 缓存: ${e} (${a.value.length}/${o.value})`));
|
|
338
|
-
}, l = (e) => {
|
|
339
|
-
let t = a.value.indexOf(e);
|
|
340
|
-
t > -1 && (a.value.splice(t, 1), n && console.debug(`[KeepAlive] ❌ 移除: ${e}`));
|
|
341
|
-
}, u = () => {
|
|
342
|
-
a.value = [], n && console.debug("[KeepAlive] 🗑️ 清空所有缓存");
|
|
343
|
-
}, d = () => a.value;
|
|
344
|
-
return r && typeof window < "u" && (window.__clearCache__ = u, window.__removeCache__ = l, window.__getCachedViews__ = d, v(() => {
|
|
345
|
-
window.__clearCache__ === u && delete window.__clearCache__, window.__removeCache__ === l && delete window.__removeCache__, window.__getCachedViews__ === d && delete window.__getCachedViews__;
|
|
346
|
-
})), A(() => i.name, (e) => {
|
|
347
|
-
e && typeof e == "string" && c(e);
|
|
348
|
-
}, { immediate: !0 }), {
|
|
349
|
-
cachedViews: a,
|
|
350
|
-
maxCacheCount: o,
|
|
351
|
-
addCache: c,
|
|
352
|
-
removeCache: l,
|
|
353
|
-
clearAllCache: u
|
|
15
|
+
var X = {
|
|
16
|
+
name: "Admin",
|
|
17
|
+
subtitle: "",
|
|
18
|
+
logoSrc: "",
|
|
19
|
+
logoType: "image",
|
|
20
|
+
logoSize: 36,
|
|
21
|
+
homePath: "/home",
|
|
22
|
+
copyright: ""
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/composables/useLayoutCache.ts
|
|
26
|
+
function fe(e) {
|
|
27
|
+
return typeof e.name == "string" && e.meta.keepAlive === !0;
|
|
28
|
+
}
|
|
29
|
+
function Z(e = {}) {
|
|
30
|
+
let { maxCacheCount: t = 20, enableDevLog: n = !1, exposeToWindow: r = !1 } = e, i = K(), a = Number.isFinite(t) && t > 0 ? Math.floor(t) : 20, o = S([]), s = S(a), c = (e) => {
|
|
31
|
+
e && !o.value.includes(e) && (o.value.push(e), o.value.length > s.value && o.value.shift(), n && console.debug(`[KeepAlive] ✅ 缓存: ${e} (${o.value.length}/${s.value})`));
|
|
32
|
+
}, l = (e) => {
|
|
33
|
+
let t = o.value.indexOf(e);
|
|
34
|
+
t > -1 && (o.value.splice(t, 1), n && console.debug(`[KeepAlive] ❌ 移除: ${e}`));
|
|
35
|
+
}, u = () => {
|
|
36
|
+
o.value = [], n && console.debug("[KeepAlive] 🗑️ 清空所有缓存");
|
|
37
|
+
}, d = () => o.value;
|
|
38
|
+
if (r && typeof window < "u") {
|
|
39
|
+
let e = window;
|
|
40
|
+
e.__clearCache__ = u, e.__removeCache__ = l, e.__getCachedViews__ = d, y(() => {
|
|
41
|
+
e.__clearCache__ === u && delete e.__clearCache__, e.__removeCache__ === l && delete e.__removeCache__, e.__getCachedViews__ === d && delete e.__getCachedViews__;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return j(() => [i.name, i.meta.keepAlive], () => {
|
|
45
|
+
fe(i) && c(i.name);
|
|
46
|
+
}, { immediate: !0 }), {
|
|
47
|
+
cachedViews: o,
|
|
48
|
+
maxCacheCount: s,
|
|
49
|
+
addCache: c,
|
|
50
|
+
removeCache: l,
|
|
51
|
+
clearAllCache: u
|
|
354
52
|
};
|
|
355
53
|
}
|
|
356
54
|
//#endregion
|
|
357
55
|
//#region src/components/layouts/SideLayout/index.vue
|
|
358
|
-
var
|
|
56
|
+
var pe = /* @__PURE__ */ d({
|
|
359
57
|
name: "SideLayout",
|
|
360
58
|
__name: "index",
|
|
361
59
|
props: { collapsed: {
|
|
@@ -364,11 +62,11 @@ var Se = /* @__PURE__ */ d({
|
|
|
364
62
|
} },
|
|
365
63
|
emits: ["update:collapsed"],
|
|
366
64
|
setup(e, { expose: a, emit: o }) {
|
|
367
|
-
let s = e, c = o, l = Y(), { cachedViews: d, maxCacheCount: f } = Z(), p =
|
|
368
|
-
|
|
65
|
+
let s = e, c = o, l = Y(), { cachedViews: d, maxCacheCount: f } = Z(), p = S(s.collapsed);
|
|
66
|
+
j(() => s.collapsed, (e) => {
|
|
369
67
|
p.value = e;
|
|
370
68
|
});
|
|
371
|
-
let m = r(() => p.value),
|
|
69
|
+
let m = r(() => p.value), h = (e) => {
|
|
372
70
|
p.value = e, c("update:collapsed", e);
|
|
373
71
|
};
|
|
374
72
|
return a({
|
|
@@ -378,49 +76,49 @@ var Se = /* @__PURE__ */ d({
|
|
|
378
76
|
p.value = e, c("update:collapsed", e);
|
|
379
77
|
}
|
|
380
78
|
}), (e, r) => {
|
|
381
|
-
let a =
|
|
382
|
-
return
|
|
383
|
-
default:
|
|
79
|
+
let a = T("RouterView");
|
|
80
|
+
return b(), i(k(V), { "has-sider": "" }, {
|
|
81
|
+
default: M(() => [u(k(U), {
|
|
384
82
|
bordered: "",
|
|
385
83
|
"collapse-mode": "width",
|
|
386
|
-
"collapsed-width":
|
|
387
|
-
width:
|
|
84
|
+
"collapsed-width": k(l).sidebarCollapsedWidth.value,
|
|
85
|
+
width: k(l).sidebarWidth.value,
|
|
388
86
|
"native-scrollbar": !1,
|
|
389
87
|
collapsed: m.value,
|
|
390
|
-
"onUpdate:collapsed":
|
|
391
|
-
class:
|
|
88
|
+
"onUpdate:collapsed": h,
|
|
89
|
+
class: g([
|
|
392
90
|
"layout-sider",
|
|
393
91
|
"no-horizontal-scroll",
|
|
394
|
-
|
|
92
|
+
k(l).isDark.value ? "dark-theme" : "light-theme"
|
|
395
93
|
])
|
|
396
94
|
}, {
|
|
397
|
-
default:
|
|
95
|
+
default: M(() => [w(e.$slots, "logo"), w(e.$slots, "menu", { collapsed: m.value })]),
|
|
398
96
|
_: 3
|
|
399
97
|
}, 8, [
|
|
400
98
|
"collapsed-width",
|
|
401
99
|
"width",
|
|
402
100
|
"collapsed",
|
|
403
101
|
"class"
|
|
404
|
-
]), u(
|
|
405
|
-
default:
|
|
406
|
-
|
|
407
|
-
u(
|
|
408
|
-
default:
|
|
409
|
-
default:
|
|
410
|
-
name:
|
|
102
|
+
]), u(k(V), null, {
|
|
103
|
+
default: M(() => [
|
|
104
|
+
w(e.$slots, "header"),
|
|
105
|
+
u(k(H), { class: "content-with-header p16px app-content" }, {
|
|
106
|
+
default: M(() => [u(a, null, {
|
|
107
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
108
|
+
name: k(l).transitionName.value,
|
|
411
109
|
mode: "out-in"
|
|
412
110
|
}, {
|
|
413
|
-
default:
|
|
414
|
-
include:
|
|
415
|
-
max:
|
|
416
|
-
}, [(
|
|
111
|
+
default: M(() => [(b(), i(t, {
|
|
112
|
+
include: k(d),
|
|
113
|
+
max: k(f)
|
|
114
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
417
115
|
_: 2
|
|
418
116
|
}, 1032, ["name"])]),
|
|
419
117
|
_: 1
|
|
420
118
|
})]),
|
|
421
119
|
_: 1
|
|
422
120
|
}),
|
|
423
|
-
|
|
121
|
+
w(e.$slots, "footer")
|
|
424
122
|
]),
|
|
425
123
|
_: 3
|
|
426
124
|
})]),
|
|
@@ -428,15 +126,12 @@ var Se = /* @__PURE__ */ d({
|
|
|
428
126
|
});
|
|
429
127
|
};
|
|
430
128
|
}
|
|
431
|
-
}),
|
|
432
|
-
ref: "visibleRef",
|
|
433
|
-
class: "responsive-menu__visible"
|
|
434
|
-
}, we = { class: "responsive-menu__more" }, Te = /* @__PURE__ */ d({
|
|
129
|
+
}), me = { class: "responsive-menu__visible" }, he = { class: "responsive-menu__more" }, ge = /* @__PURE__ */ d({
|
|
435
130
|
name: "ResponsiveMenu",
|
|
436
131
|
__name: "index",
|
|
437
132
|
props: { data: {} },
|
|
438
133
|
setup(e) {
|
|
439
|
-
let t = e, n = K(), c = q(), l = Y(), d = r(() => t.data || []), p = r(() => n.path),
|
|
134
|
+
let t = e, n = K(), c = q(), l = Y(), d = r(() => t.data || []), p = r(() => n.path), m = l.isDark, g = {
|
|
440
135
|
itemTextColor: "rgba(51, 65, 85, 0.85)",
|
|
441
136
|
itemTextColorHover: "rgba(30, 64, 175, 0.95)",
|
|
442
137
|
itemTextColorActive: "rgba(30, 64, 175, 1)",
|
|
@@ -459,7 +154,7 @@ var Se = /* @__PURE__ */ d({
|
|
|
459
154
|
itemPadding: "0 18px",
|
|
460
155
|
itemBorderRadius: "10px",
|
|
461
156
|
groupTextColor: "rgba(51, 65, 85, 0.65)"
|
|
462
|
-
},
|
|
157
|
+
}, _ = {
|
|
463
158
|
itemTextColor: "rgba(226, 232, 240, 0.85)",
|
|
464
159
|
itemTextColorHover: "rgba(255, 255, 255, 0.95)",
|
|
465
160
|
itemTextColorActive: "rgba(147, 197, 253, 1)",
|
|
@@ -482,7 +177,7 @@ var Se = /* @__PURE__ */ d({
|
|
|
482
177
|
itemPadding: "0 18px",
|
|
483
178
|
itemBorderRadius: "10px",
|
|
484
179
|
groupTextColor: "rgba(226, 232, 240, 0.6)"
|
|
485
|
-
},
|
|
180
|
+
}, x = r(() => m.value ? _ : g), C = (e, t = 18) => l.iconComponent ? () => f(l.iconComponent, {
|
|
486
181
|
name: e,
|
|
487
182
|
size: t
|
|
488
183
|
}) : () => f("i", {
|
|
@@ -497,7 +192,7 @@ var Se = /* @__PURE__ */ d({
|
|
|
497
192
|
label: e.meta?.title || e.name || "",
|
|
498
193
|
icon: e.meta?.icon ? C(e.meta.icon, 18) : void 0,
|
|
499
194
|
children: e.children?.length ? e.children.map(w) : void 0
|
|
500
|
-
}), T =
|
|
195
|
+
}), T = S(), E = S([]), D = S([]), O = r(() => E.value.map(w)), A = r(() => D.value.map((e) => ({
|
|
501
196
|
key: e.path || "",
|
|
502
197
|
label: e.meta?.title || e.name || "",
|
|
503
198
|
icon: e.meta?.icon ? C(e.meta.icon, 16) : void 0,
|
|
@@ -531,46 +226,43 @@ var Se = /* @__PURE__ */ d({
|
|
|
531
226
|
}, L = () => {
|
|
532
227
|
if (!T.value || !d.value.length) return;
|
|
533
228
|
let e = T.value.offsetWidth;
|
|
534
|
-
if (e
|
|
535
|
-
m(() => L());
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
229
|
+
if (e <= 0) return;
|
|
538
230
|
let t = I(e);
|
|
539
231
|
E.value = d.value.slice(0, t), D.value = d.value.slice(t);
|
|
540
232
|
}, R = null, B = () => {
|
|
541
|
-
R && clearTimeout(R), R =
|
|
233
|
+
R && clearTimeout(R), R = setTimeout(() => L(), 100);
|
|
542
234
|
}, V = null;
|
|
543
|
-
return
|
|
544
|
-
|
|
545
|
-
}),
|
|
546
|
-
V?.disconnect(), R && clearTimeout(R);
|
|
547
|
-
}),
|
|
235
|
+
return v(() => {
|
|
236
|
+
h(() => L()), T.value && typeof ResizeObserver < "u" ? (V = new ResizeObserver(() => B()), V.observe(T.value)) : typeof window < "u" && window.addEventListener("resize", B, { passive: !0 });
|
|
237
|
+
}), y(() => {
|
|
238
|
+
V?.disconnect(), typeof window < "u" && window.removeEventListener("resize", B), R && clearTimeout(R);
|
|
239
|
+
}), j(() => t.data, () => h(() => L()), { deep: !0 }), (e, t) => (b(), o("div", {
|
|
548
240
|
ref_key: "containerRef",
|
|
549
241
|
ref: T,
|
|
550
242
|
class: "responsive-menu"
|
|
551
|
-
}, [s("div",
|
|
243
|
+
}, [s("div", me, [O.value.length > 0 ? (b(), i(k(ee), {
|
|
552
244
|
key: 0,
|
|
553
245
|
mode: "horizontal",
|
|
554
246
|
value: p.value,
|
|
555
|
-
options:
|
|
556
|
-
"theme-overrides":
|
|
247
|
+
options: O.value,
|
|
248
|
+
"theme-overrides": x.value,
|
|
557
249
|
"onUpdate:value": N
|
|
558
250
|
}, null, 8, [
|
|
559
251
|
"value",
|
|
560
252
|
"options",
|
|
561
253
|
"theme-overrides"
|
|
562
|
-
])) : a("", !0)]
|
|
254
|
+
])) : a("", !0)]), D.value.length > 0 ? (b(), i(k(z), {
|
|
563
255
|
key: 0,
|
|
564
|
-
options:
|
|
256
|
+
options: A.value,
|
|
565
257
|
placement: "bottom-end",
|
|
566
258
|
trigger: "hover",
|
|
567
259
|
onSelect: N
|
|
568
260
|
}, {
|
|
569
|
-
default:
|
|
261
|
+
default: M(() => [s("div", he, [u(k(F), {
|
|
570
262
|
text: "",
|
|
571
263
|
class: "responsive-menu__more-btn"
|
|
572
264
|
}, {
|
|
573
|
-
default:
|
|
265
|
+
default: M(() => [...t[0] ||= [s("span", { class: "dots-icon" }, [
|
|
574
266
|
s("span"),
|
|
575
267
|
s("span"),
|
|
576
268
|
s("span")
|
|
@@ -584,28 +276,29 @@ var Se = /* @__PURE__ */ d({
|
|
|
584
276
|
let n = e.__vccOpts || e;
|
|
585
277
|
for (let [e, r] of t) n[e] = r;
|
|
586
278
|
return n;
|
|
587
|
-
},
|
|
279
|
+
}, _e = /* @__PURE__ */ Q(ge, [["__scopeId", "data-v-01fd38ee"]]), ve = { class: "top-layout-container" }, ye = { class: "navbar-left" }, be = { class: "logo-container" }, xe = [
|
|
588
280
|
"src",
|
|
589
281
|
"width",
|
|
590
282
|
"height"
|
|
591
|
-
],
|
|
283
|
+
], Se = [
|
|
592
284
|
"src",
|
|
593
285
|
"width",
|
|
594
|
-
"height"
|
|
595
|
-
|
|
286
|
+
"height",
|
|
287
|
+
"alt"
|
|
288
|
+
], Ce = { class: "brand-name" }, we = { class: "brand-title" }, Te = { class: "brand-subtitle" }, Ee = { class: "navbar-center" }, De = { class: "page-content" }, Oe = /* @__PURE__ */ d({
|
|
596
289
|
name: "TopLayout",
|
|
597
290
|
__name: "index",
|
|
598
291
|
setup(e) {
|
|
599
|
-
let c = Y(), { cachedViews: l, maxCacheCount: d } = Z(), f = c.isDark, p = r(() => c.menus.value), m = r(() => c.showTagsView.value),
|
|
292
|
+
let c = Y(), { cachedViews: l, maxCacheCount: d } = Z(), f = c.isDark, p = r(() => c.menus.value), m = r(() => c.showTagsView.value), h = r(() => c.tagsViewHeight.value), v = r(() => c.showFooter.value), y = r(() => c.transitionName.value), x = {
|
|
600
293
|
...X,
|
|
601
294
|
...c.brand
|
|
602
295
|
};
|
|
603
296
|
return (e, r) => {
|
|
604
|
-
let c =
|
|
605
|
-
return
|
|
606
|
-
s("div", { class:
|
|
607
|
-
s("div",
|
|
608
|
-
s("div",
|
|
297
|
+
let c = T("RouterView");
|
|
298
|
+
return b(), o("div", ve, [
|
|
299
|
+
s("div", { class: g(["top-navbar", [k(f) ? "dark-theme" : "light-theme"]]) }, [
|
|
300
|
+
s("div", ye, [w(e.$slots, "logo", {}, () => [
|
|
301
|
+
s("div", be, [r[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
|
|
609
302
|
key: 0,
|
|
610
303
|
src: x.logoSrc,
|
|
611
304
|
width: x.logoSize || 36,
|
|
@@ -615,41 +308,42 @@ var Se = /* @__PURE__ */ d({
|
|
|
615
308
|
muted: "",
|
|
616
309
|
playsinline: "",
|
|
617
310
|
class: "logo-video"
|
|
618
|
-
}, " 您的浏览器不支持 video 标签。 ", 8,
|
|
311
|
+
}, " 您的浏览器不支持 video 标签。 ", 8, xe)) : x.logoSrc ? (b(), o("img", {
|
|
619
312
|
key: 1,
|
|
620
313
|
src: x.logoSrc,
|
|
621
314
|
width: x.logoSize || 36,
|
|
622
315
|
height: x.logoSize || 36,
|
|
623
|
-
class: "logo-video"
|
|
624
|
-
|
|
625
|
-
|
|
316
|
+
class: "logo-video",
|
|
317
|
+
alt: x.name || "Logo"
|
|
318
|
+
}, null, 8, Se)) : a("", !0)]),
|
|
319
|
+
s("div", Ce, [s("span", we, D(x.name), 1), s("span", Te, D(x.subtitle), 1)]),
|
|
626
320
|
r[1] ||= s("div", { class: "navbar-divider" }, null, -1)
|
|
627
321
|
])]),
|
|
628
|
-
s("div",
|
|
629
|
-
|
|
322
|
+
s("div", Ee, [w(e.$slots, "menu", {}, () => [u(_e, { data: p.value }, null, 8, ["data"])])]),
|
|
323
|
+
w(e.$slots, "header-extra")
|
|
630
324
|
], 2),
|
|
631
|
-
m.value ? (
|
|
325
|
+
m.value ? (b(), o("div", {
|
|
632
326
|
key: 0,
|
|
633
327
|
class: "tags-view-container",
|
|
634
|
-
style:
|
|
635
|
-
}, [
|
|
636
|
-
u(
|
|
637
|
-
default:
|
|
638
|
-
default:
|
|
639
|
-
default:
|
|
640
|
-
name:
|
|
328
|
+
style: _({ height: `${h.value}px` })
|
|
329
|
+
}, [w(e.$slots, "tags-view")], 4)) : a("", !0),
|
|
330
|
+
u(k(V), null, {
|
|
331
|
+
default: M(() => [u(k(H), { class: "main-content" }, {
|
|
332
|
+
default: M(() => [s("div", De, [u(c, null, {
|
|
333
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
334
|
+
name: y.value,
|
|
641
335
|
mode: "out-in"
|
|
642
336
|
}, {
|
|
643
|
-
default:
|
|
644
|
-
include:
|
|
645
|
-
max:
|
|
646
|
-
}, [(
|
|
337
|
+
default: M(() => [(b(), i(t, {
|
|
338
|
+
include: k(l),
|
|
339
|
+
max: k(d)
|
|
340
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
647
341
|
_: 2
|
|
648
342
|
}, 1032, ["name"])]),
|
|
649
343
|
_: 1
|
|
650
344
|
})])]),
|
|
651
345
|
_: 1
|
|
652
|
-
}), v.value ?
|
|
346
|
+
}), v.value ? w(e.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
|
|
653
347
|
_: 3
|
|
654
348
|
})
|
|
655
349
|
]);
|
|
@@ -658,26 +352,26 @@ var Se = /* @__PURE__ */ d({
|
|
|
658
352
|
});
|
|
659
353
|
//#endregion
|
|
660
354
|
//#region src/composables/useMenuSplit.ts
|
|
661
|
-
function
|
|
355
|
+
function ke(e, t) {
|
|
662
356
|
if (!e) return !1;
|
|
663
357
|
let n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
664
358
|
return n.length === 0 ? r.length === 0 : n.every((e, t) => r[t] === e);
|
|
665
359
|
}
|
|
666
|
-
function
|
|
667
|
-
let { menus: t, floatingSecondMenu: n = !1 } = e, i = K(), a = q(), o =
|
|
360
|
+
function Ae(e) {
|
|
361
|
+
let { menus: t, floatingSecondMenu: n = !1 } = e, i = K(), a = q(), o = S(""), s = S(null), c = S(!1), l = r(() => s.value || f.value || null), u = (e) => ke(e, i.path), d = (e) => {
|
|
668
362
|
for (let t of e) if (u(t.path) || t.children?.length && d(t.children)) return t;
|
|
669
363
|
return null;
|
|
670
364
|
}, f = r(() => t.value.find((e) => e.path === o.value)), p = r(() => f.value?.children || []), m = (e) => {
|
|
671
|
-
|
|
365
|
+
e.disabled || (O(n) ? e.children && e.children.length > 0 ? c.value && o.value === e.path ? c.value = !1 : (o.value = e.path || "", c.value = !0) : (o.value = e.path || "", c.value = !1, e.path && a.push(e.path)) : (!e.children || e.children.length === 0) && e.path && a.push(e.path));
|
|
672
366
|
}, h = (e) => {
|
|
673
|
-
e.path && a.push(e.path);
|
|
367
|
+
!e.disabled && e.path && a.push(e.path);
|
|
674
368
|
}, g = () => {
|
|
675
369
|
let e = t.value, r = d(e);
|
|
676
|
-
r ? (o.value = r.path || "",
|
|
370
|
+
r ? (o.value = r.path || "", O(n) && r.children?.length && (c.value = !0)) : e.length > 0 && !o.value && (o.value = e[0].path || "");
|
|
677
371
|
};
|
|
678
|
-
return
|
|
372
|
+
return j(() => i.path, () => g(), { immediate: !0 }), j(t, (e) => {
|
|
679
373
|
e && e.length > 0 && g();
|
|
680
|
-
}, { immediate: !0 }),
|
|
374
|
+
}, { immediate: !0 }), v(() => g()), {
|
|
681
375
|
activeFirstMenu: o,
|
|
682
376
|
activeFirstMenuItem: f,
|
|
683
377
|
currentSecondMenus: p,
|
|
@@ -691,28 +385,39 @@ function Re(e) {
|
|
|
691
385
|
}
|
|
692
386
|
//#endregion
|
|
693
387
|
//#region src/components/layouts/MixLayout/index.vue?vue&type=script&setup=true&lang.ts
|
|
694
|
-
var
|
|
388
|
+
var je = { class: "mix-layout-container" }, Me = { class: "logo-container" }, Ne = [
|
|
695
389
|
"src",
|
|
696
390
|
"width",
|
|
697
391
|
"height"
|
|
698
|
-
],
|
|
392
|
+
], Pe = [
|
|
699
393
|
"src",
|
|
700
394
|
"width",
|
|
701
|
-
"height"
|
|
702
|
-
|
|
395
|
+
"height",
|
|
396
|
+
"alt"
|
|
397
|
+
], Fe = { class: "first-menu-list" }, Ie = [
|
|
398
|
+
"tabindex",
|
|
399
|
+
"aria-disabled",
|
|
400
|
+
"onClick",
|
|
401
|
+
"onKeydown"
|
|
402
|
+
], Le = { class: "menu-item-content" }, Re = {
|
|
703
403
|
key: 1,
|
|
704
404
|
class: "menu-item-text"
|
|
705
|
-
},
|
|
405
|
+
}, ze = { class: "menu-item-label" }, Be = { class: "second-menu-header" }, Ve = { class: "menu-title" }, He = { class: "second-menu-list" }, Ue = [
|
|
406
|
+
"tabindex",
|
|
407
|
+
"aria-disabled",
|
|
408
|
+
"onClick",
|
|
409
|
+
"onKeydown"
|
|
410
|
+
], We = { class: "menu-item-label" }, Ge = { class: "main-layout" }, Ke = /* @__PURE__ */ d({
|
|
706
411
|
name: "MixLayout",
|
|
707
412
|
__name: "index",
|
|
708
413
|
setup(c) {
|
|
709
|
-
let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(),
|
|
414
|
+
let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, _ = r(() => l.menus.value), v = r(() => l.showFooter.value), y = r(() => l.transitionName.value), x = {
|
|
710
415
|
...X,
|
|
711
416
|
...l.brand
|
|
712
|
-
},
|
|
417
|
+
}, S = Ae({
|
|
713
418
|
menus: l.menus,
|
|
714
419
|
floatingSecondMenu: r(() => !0)
|
|
715
|
-
}),
|
|
420
|
+
}), O = l.iconComponent ?? d({
|
|
716
421
|
name: "LayoutIcon",
|
|
717
422
|
props: {
|
|
718
423
|
name: String,
|
|
@@ -734,9 +439,9 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
734
439
|
}
|
|
735
440
|
});
|
|
736
441
|
return (r, c) => {
|
|
737
|
-
let l =
|
|
738
|
-
return
|
|
739
|
-
s("div", { class:
|
|
442
|
+
let l = T("RouterView");
|
|
443
|
+
return b(), o("div", je, [
|
|
444
|
+
s("div", { class: g(["first-level-menu", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Me, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
|
|
740
445
|
key: 0,
|
|
741
446
|
src: x.logoSrc,
|
|
742
447
|
width: x.logoSize || 40,
|
|
@@ -746,605 +451,1029 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
746
451
|
muted: "",
|
|
747
452
|
playsinline: "",
|
|
748
453
|
class: "logo-video"
|
|
749
|
-
}, " 您的浏览器不支持 video 标签。 ", 8,
|
|
454
|
+
}, " 您的浏览器不支持 video 标签。 ", 8, Ne)) : x.logoSrc ? (b(), o("img", {
|
|
750
455
|
key: 1,
|
|
751
456
|
src: x.logoSrc,
|
|
752
457
|
width: x.logoSize || 40,
|
|
753
458
|
height: x.logoSize || 40,
|
|
754
|
-
class: "logo-video"
|
|
755
|
-
|
|
459
|
+
class: "logo-video",
|
|
460
|
+
alt: x.name || "Logo"
|
|
461
|
+
}, null, 8, Pe)) : a("", !0)])]), s("div", Fe, [(b(!0), o(e, null, C(_.value, (e) => (b(), o("div", {
|
|
756
462
|
key: e.path,
|
|
757
|
-
class:
|
|
758
|
-
|
|
759
|
-
|
|
463
|
+
class: g(["first-menu-item", { active: k(S).activeFirstMenu.value === e.path }]),
|
|
464
|
+
role: "button",
|
|
465
|
+
tabindex: e.disabled ? -1 : 0,
|
|
466
|
+
"aria-disabled": e.disabled || void 0,
|
|
467
|
+
onClick: (t) => k(S).handleFirstMenuClick(e),
|
|
468
|
+
onKeydown: [N((t) => k(S).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(S).handleFirstMenuClick(e), ["prevent"]), ["space"])]
|
|
469
|
+
}, [s("div", Le, [e.meta?.icon ? (b(), i(E(k(O)), {
|
|
760
470
|
key: 0,
|
|
761
471
|
name: e.meta.icon,
|
|
762
472
|
size: 22
|
|
763
|
-
}, null, 8, ["name"])) : (
|
|
473
|
+
}, null, 8, ["name"])) : (b(), o("span", Re, D((e.meta?.title || "")[0]), 1))]), s("span", ze, D(e.meta?.title), 1)], 42, Ie))), 128))])], 2),
|
|
764
474
|
u(n, { name: "slide-fade" }, {
|
|
765
|
-
default:
|
|
475
|
+
default: M(() => [k(S).showSecondMenu.value ? (b(), o("div", {
|
|
766
476
|
key: 0,
|
|
767
|
-
class:
|
|
768
|
-
}, [s("div",
|
|
477
|
+
class: g(["second-level-menu-popup", [k(h) ? "dark-theme" : "light-theme"]])
|
|
478
|
+
}, [s("div", Be, [k(S).displayMenuItem.value?.meta?.icon ? (b(), i(E(k(O)), {
|
|
769
479
|
key: 0,
|
|
770
|
-
name:
|
|
480
|
+
name: k(S).displayMenuItem.value.meta.icon,
|
|
771
481
|
size: 20
|
|
772
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
482
|
+
}, null, 8, ["name"])) : a("", !0), s("span", Ve, D(k(S).displayMenuItem.value?.meta?.title), 1)]), s("div", He, [(b(!0), o(e, null, C(k(S).displayMenuItem.value?.children || [], (e) => (b(), o("div", {
|
|
773
483
|
key: e.path,
|
|
774
|
-
class:
|
|
775
|
-
|
|
776
|
-
|
|
484
|
+
class: g(["second-menu-item", { active: k(S).isMenuItemActive(e.path) }]),
|
|
485
|
+
role: "link",
|
|
486
|
+
tabindex: e.disabled ? -1 : 0,
|
|
487
|
+
"aria-disabled": e.disabled || void 0,
|
|
488
|
+
onClick: (t) => k(S).handleSecondMenuClick(e),
|
|
489
|
+
onKeydown: [N((t) => k(S).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(S).handleSecondMenuClick(e), ["prevent"]), ["space"])]
|
|
490
|
+
}, [e.meta?.icon ? (b(), i(E(k(O)), {
|
|
777
491
|
key: 0,
|
|
778
492
|
name: e.meta.icon,
|
|
779
493
|
size: 16
|
|
780
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
494
|
+
}, null, 8, ["name"])) : a("", !0), s("span", We, D(e.meta?.title), 1)], 42, Ue))), 128))])], 2)) : a("", !0)]),
|
|
781
495
|
_: 1
|
|
782
496
|
}),
|
|
783
|
-
s("div",
|
|
784
|
-
default:
|
|
785
|
-
default:
|
|
786
|
-
default:
|
|
787
|
-
name:
|
|
497
|
+
s("div", Ge, [w(r.$slots, "header"), u(k(V), null, {
|
|
498
|
+
default: M(() => [u(k(H), { class: "content-with-header p16px app-content" }, {
|
|
499
|
+
default: M(() => [u(l, null, {
|
|
500
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
501
|
+
name: y.value,
|
|
788
502
|
mode: "out-in"
|
|
789
503
|
}, {
|
|
790
|
-
default:
|
|
791
|
-
include:
|
|
792
|
-
max:
|
|
793
|
-
}, [(
|
|
504
|
+
default: M(() => [(b(), i(t, {
|
|
505
|
+
include: k(p),
|
|
506
|
+
max: k(m)
|
|
507
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
794
508
|
_: 2
|
|
795
509
|
}, 1032, ["name"])]),
|
|
796
510
|
_: 1
|
|
797
511
|
})]),
|
|
798
512
|
_: 1
|
|
799
|
-
}), v.value ?
|
|
513
|
+
}), v.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
|
|
800
514
|
_: 3
|
|
801
515
|
})])
|
|
802
516
|
]);
|
|
803
517
|
};
|
|
804
518
|
}
|
|
805
|
-
}),
|
|
806
|
-
"src",
|
|
807
|
-
"width",
|
|
808
|
-
"height"
|
|
809
|
-
],
|
|
810
|
-
"src",
|
|
811
|
-
"width",
|
|
812
|
-
"height"
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}, null, 8,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
],
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
519
|
+
}), qe = { class: "mix-top-layout-container" }, Je = { class: "logo-container" }, Ye = [
|
|
520
|
+
"src",
|
|
521
|
+
"width",
|
|
522
|
+
"height"
|
|
523
|
+
], Xe = [
|
|
524
|
+
"src",
|
|
525
|
+
"width",
|
|
526
|
+
"height",
|
|
527
|
+
"alt"
|
|
528
|
+
], Ze = { class: "first-menu-list" }, Qe = [
|
|
529
|
+
"tabindex",
|
|
530
|
+
"aria-disabled",
|
|
531
|
+
"aria-current",
|
|
532
|
+
"onClick",
|
|
533
|
+
"onKeydown"
|
|
534
|
+
], $e = { class: "menu-item-content" }, et = {
|
|
535
|
+
key: 1,
|
|
536
|
+
class: "menu-item-text"
|
|
537
|
+
}, tt = { class: "menu-item-label" }, nt = { class: "main-area" }, rt = { class: "navbar-left" }, it = { class: "brand-name" }, at = { class: "brand-title" }, ot = { class: "brand-subtitle" }, st = { class: "navbar-center" }, ct = { class: "page-content" }, lt = /* @__PURE__ */ d({
|
|
538
|
+
name: "MixTopLayout",
|
|
539
|
+
__name: "index",
|
|
540
|
+
setup(c) {
|
|
541
|
+
let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), S = r(() => l.showFooter.value), O = r(() => l.transitionName.value), A = {
|
|
542
|
+
...X,
|
|
543
|
+
...l.brand
|
|
544
|
+
}, j = Ae({
|
|
545
|
+
menus: l.menus,
|
|
546
|
+
floatingSecondMenu: r(() => !1)
|
|
547
|
+
}), F = l.iconComponent ?? d({
|
|
548
|
+
name: "LayoutIcon",
|
|
549
|
+
props: {
|
|
550
|
+
name: String,
|
|
551
|
+
size: {
|
|
552
|
+
type: Number,
|
|
553
|
+
default: 18
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
setup(e) {
|
|
557
|
+
return () => f("i", {
|
|
558
|
+
class: e.name,
|
|
559
|
+
style: {
|
|
560
|
+
fontSize: `${e.size}px`,
|
|
561
|
+
display: "inline-flex",
|
|
562
|
+
alignItems: "center",
|
|
563
|
+
justifyContent: "center"
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
return (r, c) => {
|
|
569
|
+
let l = T("RouterView");
|
|
570
|
+
return b(), o("div", qe, [s("div", { class: g(["first-level-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Je, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), A.logoType === "video" && A.logoSrc ? (b(), o("video", {
|
|
571
|
+
key: 0,
|
|
572
|
+
src: A.logoSrc,
|
|
573
|
+
width: A.logoSize || 40,
|
|
574
|
+
height: A.logoSize || 40,
|
|
575
|
+
autoplay: "",
|
|
576
|
+
loop: "",
|
|
577
|
+
muted: "",
|
|
578
|
+
playsinline: "",
|
|
579
|
+
class: "logo-video"
|
|
580
|
+
}, " 您的浏览器不支持 video 标签。 ", 8, Ye)) : A.logoSrc ? (b(), o("img", {
|
|
581
|
+
key: 1,
|
|
582
|
+
src: A.logoSrc,
|
|
583
|
+
width: A.logoSize || 40,
|
|
584
|
+
height: A.logoSize || 40,
|
|
585
|
+
class: "logo-video",
|
|
586
|
+
alt: A.name || "Logo"
|
|
587
|
+
}, null, 8, Xe)) : a("", !0)])]), s("div", Ze, [(b(!0), o(e, null, C(v.value, (e) => (b(), o("div", {
|
|
588
|
+
key: e.path,
|
|
589
|
+
class: g(["first-menu-item", { active: k(j).activeFirstMenu.value === e.path }]),
|
|
590
|
+
role: "button",
|
|
591
|
+
tabindex: e.disabled ? -1 : 0,
|
|
592
|
+
"aria-disabled": e.disabled || void 0,
|
|
593
|
+
"aria-current": k(j).activeFirstMenu.value === e.path ? "page" : void 0,
|
|
594
|
+
onClick: (t) => k(j).handleFirstMenuClick(e),
|
|
595
|
+
onKeydown: [N((t) => k(j).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(j).handleFirstMenuClick(e), ["prevent"]), ["space"])]
|
|
596
|
+
}, [s("div", $e, [e.meta?.icon ? (b(), i(E(k(F)), {
|
|
597
|
+
key: 0,
|
|
598
|
+
name: e.meta.icon,
|
|
599
|
+
size: 22
|
|
600
|
+
}, null, 8, ["name"])) : (b(), o("span", et, D((e.meta?.title || "")[0]), 1))]), s("span", tt, D(e.meta?.title), 1)], 42, Qe))), 128))])], 2), s("div", nt, [
|
|
601
|
+
s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
|
|
602
|
+
s("div", rt, [w(r.$slots, "brand", {}, () => [s("div", it, [s("span", at, D(A.name), 1), s("span", ot, D(A.subtitle), 1)]), c[1] ||= s("div", { class: "navbar-divider" }, null, -1)])]),
|
|
603
|
+
s("div", st, [w(r.$slots, "top-menu", {}, () => [k(j).currentSecondMenus.value.length > 0 ? (b(), i(_e, {
|
|
604
|
+
key: 0,
|
|
605
|
+
data: k(j).currentSecondMenus.value
|
|
606
|
+
}, null, 8, ["data"])) : a("", !0)])]),
|
|
607
|
+
w(r.$slots, "header-extra")
|
|
608
|
+
], 2),
|
|
609
|
+
y.value ? (b(), o("div", {
|
|
610
|
+
key: 0,
|
|
611
|
+
class: "tags-view-container",
|
|
612
|
+
style: _({ height: `${x.value}px` })
|
|
613
|
+
}, [w(r.$slots, "tags-view")], 4)) : a("", !0),
|
|
614
|
+
u(k(V), { class: "content-layout" }, {
|
|
615
|
+
default: M(() => [u(k(H), { class: "main-content" }, {
|
|
616
|
+
default: M(() => [s("div", ct, [u(l, null, {
|
|
617
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
618
|
+
name: O.value,
|
|
619
|
+
mode: "out-in"
|
|
620
|
+
}, {
|
|
621
|
+
default: M(() => [(b(), i(t, {
|
|
622
|
+
include: k(p),
|
|
623
|
+
max: k(m)
|
|
624
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
625
|
+
_: 2
|
|
626
|
+
}, 1032, ["name"])]),
|
|
627
|
+
_: 1
|
|
628
|
+
})])]),
|
|
629
|
+
_: 1
|
|
630
|
+
}), S.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
|
|
631
|
+
_: 3
|
|
632
|
+
})
|
|
633
|
+
])]);
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
}), ut = { class: "reverse-horizontal-mix-layout-container" }, dt = { class: "navbar-left" }, ft = { class: "logo-container" }, pt = [
|
|
637
|
+
"src",
|
|
638
|
+
"width",
|
|
639
|
+
"height"
|
|
640
|
+
], mt = [
|
|
641
|
+
"src",
|
|
642
|
+
"width",
|
|
643
|
+
"height",
|
|
644
|
+
"alt"
|
|
645
|
+
], ht = { class: "brand-name" }, gt = { class: "brand-title" }, _t = { class: "brand-subtitle" }, vt = { class: "navbar-center" }, yt = { class: "main-area" }, bt = { class: "page-content" }, xt = ["aria-expanded", "onKeydown"], St = { class: "header-icon" }, Ct = { class: "header-title" }, wt = { class: "sidebar-menu-list" }, Tt = {
|
|
646
|
+
key: 0,
|
|
647
|
+
class: "menu-group"
|
|
648
|
+
}, Et = { class: "group-title" }, Dt = [
|
|
649
|
+
"tabindex",
|
|
650
|
+
"aria-disabled",
|
|
651
|
+
"aria-current",
|
|
652
|
+
"onClick",
|
|
653
|
+
"onKeydown"
|
|
654
|
+
], Ot = { class: "item-title" }, kt = [
|
|
655
|
+
"tabindex",
|
|
656
|
+
"aria-disabled",
|
|
657
|
+
"aria-current",
|
|
658
|
+
"onClick",
|
|
659
|
+
"onKeydown"
|
|
660
|
+
], At = { class: "item-title" }, jt = /* @__PURE__ */ d({
|
|
661
|
+
name: "ReverseHorizontalMixLayout",
|
|
662
|
+
__name: "index",
|
|
663
|
+
setup(c) {
|
|
664
|
+
let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), O = r(() => l.showFooter.value), A = r(() => l.transitionName.value), j = {
|
|
665
|
+
...X,
|
|
666
|
+
...l.brand
|
|
667
|
+
}, F = Ae({
|
|
668
|
+
menus: l.menus,
|
|
669
|
+
floatingSecondMenu: r(() => !1)
|
|
670
|
+
}), I = S(!1), L = () => {
|
|
671
|
+
I.value = !I.value;
|
|
672
|
+
}, R = l.iconComponent ?? d({
|
|
673
|
+
name: "LayoutIcon",
|
|
674
|
+
props: {
|
|
675
|
+
name: String,
|
|
676
|
+
size: {
|
|
677
|
+
type: Number,
|
|
678
|
+
default: 18
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
setup(e) {
|
|
682
|
+
return () => f("i", {
|
|
683
|
+
class: e.name,
|
|
684
|
+
style: {
|
|
685
|
+
fontSize: `${e.size}px`,
|
|
686
|
+
display: "inline-flex",
|
|
687
|
+
alignItems: "center",
|
|
688
|
+
justifyContent: "center"
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
return (r, c) => {
|
|
694
|
+
let l = T("RouterView");
|
|
695
|
+
return b(), o("div", ut, [
|
|
696
|
+
s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
|
|
697
|
+
s("div", dt, [w(r.$slots, "logo", {}, () => [
|
|
698
|
+
s("div", ft, [c[0] ||= s("div", { class: "logo-glow" }, null, -1), j.logoType === "video" && j.logoSrc ? (b(), o("video", {
|
|
699
|
+
key: 0,
|
|
700
|
+
src: j.logoSrc,
|
|
701
|
+
width: j.logoSize || 36,
|
|
702
|
+
height: j.logoSize || 36,
|
|
703
|
+
autoplay: "",
|
|
704
|
+
loop: "",
|
|
705
|
+
muted: "",
|
|
706
|
+
playsinline: "",
|
|
707
|
+
class: "logo-video"
|
|
708
|
+
}, " 您的浏览器不支持 video 标签。 ", 8, pt)) : j.logoSrc ? (b(), o("img", {
|
|
709
|
+
key: 1,
|
|
710
|
+
src: j.logoSrc,
|
|
711
|
+
width: j.logoSize || 36,
|
|
712
|
+
height: j.logoSize || 36,
|
|
713
|
+
class: "logo-video",
|
|
714
|
+
alt: j.name || "Logo"
|
|
715
|
+
}, null, 8, mt)) : a("", !0)]),
|
|
716
|
+
s("div", ht, [s("span", gt, D(j.name), 1), s("span", _t, D(j.subtitle), 1)]),
|
|
717
|
+
c[1] ||= s("div", { class: "navbar-divider" }, null, -1)
|
|
718
|
+
])]),
|
|
719
|
+
s("div", vt, [w(r.$slots, "top-menu", {}, () => [u(_e, { data: v.value }, null, 8, ["data"])])]),
|
|
720
|
+
w(r.$slots, "header-extra")
|
|
721
|
+
], 2),
|
|
722
|
+
y.value ? (b(), o("div", {
|
|
723
|
+
key: 0,
|
|
724
|
+
class: "tags-view-container",
|
|
725
|
+
style: _({ height: `${x.value}px` })
|
|
726
|
+
}, [w(r.$slots, "tags-view")], 4)) : a("", !0),
|
|
727
|
+
s("div", yt, [
|
|
728
|
+
u(k(V), { class: "content-layout" }, {
|
|
729
|
+
default: M(() => [u(k(H), { class: "main-content" }, {
|
|
730
|
+
default: M(() => [s("div", bt, [u(l, null, {
|
|
731
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
732
|
+
name: A.value,
|
|
733
|
+
mode: "out-in"
|
|
734
|
+
}, {
|
|
735
|
+
default: M(() => [(b(), i(t, {
|
|
736
|
+
include: k(p),
|
|
737
|
+
max: k(m)
|
|
738
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
739
|
+
_: 2
|
|
740
|
+
}, 1032, ["name"])]),
|
|
741
|
+
_: 1
|
|
742
|
+
})])]),
|
|
743
|
+
_: 1
|
|
744
|
+
}), O.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
|
|
745
|
+
_: 3
|
|
746
|
+
}),
|
|
747
|
+
k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
|
|
748
|
+
key: 0,
|
|
749
|
+
class: g(["sidebar-toggle", [k(h) ? "dark-theme" : "light-theme", { active: !I.value }]]),
|
|
750
|
+
onClick: L,
|
|
751
|
+
role: "button",
|
|
752
|
+
tabindex: "0",
|
|
753
|
+
"aria-expanded": !I.value,
|
|
754
|
+
onKeydown: [N(L, ["enter"]), N(P(L, ["prevent"]), ["space"])]
|
|
755
|
+
}, [s("span", { class: g([
|
|
756
|
+
"collapse-arrow",
|
|
757
|
+
"toggle-icon",
|
|
758
|
+
I.value ? "collapsed" : "expanded"
|
|
759
|
+
]) }, [...c[2] ||= [s("span", { class: "arrow-line" }, null, -1), s("span", { class: "arrow-line" }, null, -1)]], 2)], 42, xt)) : a("", !0),
|
|
760
|
+
k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
|
|
761
|
+
key: 1,
|
|
762
|
+
class: g(["right-sidebar-wrapper", { collapsed: I.value }])
|
|
763
|
+
}, [s("div", { class: g(["right-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", { class: g(["sidebar-header", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", St, [k(F).activeFirstMenuItem.value?.meta?.icon ? (b(), i(E(k(R)), {
|
|
764
|
+
key: 0,
|
|
765
|
+
name: k(F).activeFirstMenuItem.value.meta.icon,
|
|
766
|
+
size: 20
|
|
767
|
+
}, null, 8, ["name"])) : a("", !0)]), s("span", Ct, D(k(F).activeFirstMenuItem.value?.meta?.title || "菜单"), 1)], 2), s("div", wt, [(b(!0), o(e, null, C(k(F).currentSecondMenus.value, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Tt, [s("div", Et, [t.meta?.icon ? (b(), i(E(k(R)), {
|
|
768
|
+
key: 0,
|
|
769
|
+
name: t.meta.icon,
|
|
770
|
+
size: 16
|
|
771
|
+
}, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)]), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
|
|
772
|
+
key: e.path,
|
|
773
|
+
class: g(["menu-item sub-item", { active: k(F).isMenuItemActive(e.path) }]),
|
|
774
|
+
role: "button",
|
|
775
|
+
tabindex: e.disabled ? -1 : 0,
|
|
776
|
+
"aria-disabled": e.disabled || void 0,
|
|
777
|
+
"aria-current": k(F).isMenuItemActive(e.path) ? "page" : void 0,
|
|
778
|
+
onClick: (t) => k(F).handleSecondMenuClick(e),
|
|
779
|
+
onKeydown: [N((t) => k(F).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(F).handleSecondMenuClick(e), ["prevent"]), ["space"])]
|
|
780
|
+
}, [e.meta?.icon ? (b(), i(E(k(R)), {
|
|
781
|
+
key: 0,
|
|
782
|
+
name: e.meta.icon,
|
|
783
|
+
size: 16
|
|
784
|
+
}, null, 8, ["name"])) : a("", !0), s("span", Ot, D(e.meta?.title), 1)], 42, Dt))), 128))])) : (b(), o("div", {
|
|
785
|
+
key: 1,
|
|
786
|
+
class: g(["menu-item", { active: k(F).isMenuItemActive(t.path) }]),
|
|
787
|
+
role: "button",
|
|
788
|
+
tabindex: t.disabled ? -1 : 0,
|
|
789
|
+
"aria-disabled": t.disabled || void 0,
|
|
790
|
+
"aria-current": k(F).isMenuItemActive(t.path) ? "page" : void 0,
|
|
791
|
+
onClick: (e) => k(F).handleSecondMenuClick(t),
|
|
792
|
+
onKeydown: [N((e) => k(F).handleSecondMenuClick(t), ["enter"]), N(P((e) => k(F).handleSecondMenuClick(t), ["prevent"]), ["space"])]
|
|
793
|
+
}, [t.meta?.icon ? (b(), i(E(k(R)), {
|
|
794
|
+
key: 0,
|
|
795
|
+
name: t.meta.icon,
|
|
796
|
+
size: 18
|
|
797
|
+
}, null, 8, ["name"])) : a("", !0), s("span", At, D(t.meta?.title), 1)], 42, kt))], 64))), 128))])], 2)], 2)) : a("", !0)
|
|
798
|
+
])
|
|
799
|
+
]);
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
}), Mt = { class: "card-layout-container" }, Nt = { class: "navbar-left" }, Pt = { class: "logo-container" }, Ft = [
|
|
803
|
+
"src",
|
|
804
|
+
"width",
|
|
805
|
+
"height"
|
|
806
|
+
], It = [
|
|
807
|
+
"src",
|
|
808
|
+
"width",
|
|
809
|
+
"height",
|
|
810
|
+
"alt"
|
|
811
|
+
], Lt = { class: "brand-name" }, Rt = { class: "brand-title" }, zt = { class: "brand-subtitle" }, Bt = { class: "drawer-content" }, Vt = { class: "menu-grid" }, Ht = [
|
|
812
|
+
"tabindex",
|
|
813
|
+
"aria-disabled",
|
|
814
|
+
"onClick",
|
|
815
|
+
"onKeydown"
|
|
816
|
+
], Ut = {
|
|
817
|
+
key: 0,
|
|
818
|
+
class: "category-items"
|
|
819
|
+
}, Wt = [
|
|
820
|
+
"tabindex",
|
|
821
|
+
"aria-disabled",
|
|
822
|
+
"onClick",
|
|
823
|
+
"onKeydown"
|
|
824
|
+
], Gt = { class: "item-title" }, Kt = {
|
|
825
|
+
key: 0,
|
|
826
|
+
class: "submenu-items"
|
|
827
|
+
}, qt = { class: "submenu-title" }, Jt = [
|
|
828
|
+
"tabindex",
|
|
829
|
+
"aria-disabled",
|
|
830
|
+
"onClick",
|
|
831
|
+
"onKeydown"
|
|
832
|
+
], Yt = { class: "item-title" }, Xt = { class: "main-content-area" }, Zt = { class: "page-content" }, Qt = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
833
|
+
name: "CardLayout",
|
|
834
|
+
__name: "index",
|
|
835
|
+
setup(c) {
|
|
836
|
+
let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = q(), v = l.isDark, x = r(() => l.menus.value), O = r(() => l.showTagsView.value), A = r(() => l.tagsViewHeight.value), j = r(() => l.showFooter.value), F = r(() => l.transitionName.value), I = {
|
|
837
|
+
...X,
|
|
838
|
+
...l.brand
|
|
839
|
+
}, L = S(!1), R = S(null), z = () => {
|
|
840
|
+
R.value && clearTimeout(R.value), R.value = setTimeout(() => {
|
|
841
|
+
L.value = !1;
|
|
842
|
+
}, 300);
|
|
843
|
+
}, B = () => {
|
|
844
|
+
R.value &&= (clearTimeout(R.value), null), L.value = !0;
|
|
845
|
+
}, U = (e) => {
|
|
846
|
+
!e.disabled && e.path && (h.push(e.path), L.value = !1);
|
|
847
|
+
}, ee = l.iconComponent ?? d({
|
|
848
|
+
name: "LayoutIcon",
|
|
849
|
+
props: {
|
|
850
|
+
name: String,
|
|
851
|
+
size: {
|
|
852
|
+
type: Number,
|
|
853
|
+
default: 18
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
setup(e) {
|
|
857
|
+
return () => f("i", {
|
|
858
|
+
class: e.name,
|
|
859
|
+
style: {
|
|
860
|
+
fontSize: `${e.size}px`,
|
|
861
|
+
display: "inline-flex",
|
|
862
|
+
alignItems: "center",
|
|
863
|
+
justifyContent: "center"
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
return y(() => {
|
|
869
|
+
R.value && clearTimeout(R.value);
|
|
870
|
+
}), (r, c) => {
|
|
871
|
+
let l = T("RouterView");
|
|
872
|
+
return b(), o("div", Mt, [
|
|
873
|
+
s("div", { class: g(["top-navbar", [k(v) ? "dark-theme" : "light-theme"]]) }, [s("div", Nt, [s("div", {
|
|
874
|
+
class: "hover-trigger-area",
|
|
875
|
+
onMouseenter: B,
|
|
876
|
+
onMouseleave: z
|
|
877
|
+
}, [w(r.$slots, "menu-trigger", {}, () => [c[0] ||= s("div", { class: "menu-indicator" }, [s("span", { class: "hamburger-icon" }, [
|
|
878
|
+
s("span"),
|
|
879
|
+
s("span"),
|
|
880
|
+
s("span")
|
|
881
|
+
])], -1)], !0)], 32), w(r.$slots, "logo", {}, () => [
|
|
882
|
+
s("div", Pt, [c[1] ||= s("div", { class: "logo-glow" }, null, -1), I.logoType === "video" && I.logoSrc ? (b(), o("video", {
|
|
883
|
+
key: 0,
|
|
884
|
+
src: I.logoSrc,
|
|
885
|
+
width: I.logoSize || 36,
|
|
886
|
+
height: I.logoSize || 36,
|
|
887
|
+
autoplay: "",
|
|
888
|
+
loop: "",
|
|
889
|
+
muted: "",
|
|
890
|
+
playsinline: "",
|
|
891
|
+
class: "logo-video"
|
|
892
|
+
}, " 您的浏览器不支持 video 标签。 ", 8, Ft)) : I.logoSrc ? (b(), o("img", {
|
|
893
|
+
key: 1,
|
|
894
|
+
src: I.logoSrc,
|
|
895
|
+
width: I.logoSize || 36,
|
|
896
|
+
height: I.logoSize || 36,
|
|
897
|
+
class: "logo-video",
|
|
898
|
+
alt: I.name || "Logo"
|
|
899
|
+
}, null, 8, It)) : a("", !0)]),
|
|
900
|
+
s("div", Lt, [s("span", Rt, D(I.name), 1), s("span", zt, D(I.subtitle), 1)]),
|
|
901
|
+
c[2] ||= s("div", { class: "navbar-divider" }, null, -1)
|
|
902
|
+
], !0)]), w(r.$slots, "header-extra", {}, void 0, !0)], 2),
|
|
903
|
+
O.value ? (b(), o("div", {
|
|
904
|
+
key: 0,
|
|
905
|
+
class: "tags-view-container",
|
|
906
|
+
style: _({ height: `${A.value}px` })
|
|
907
|
+
}, [w(r.$slots, "tags-view", {}, void 0, !0)], 4)) : a("", !0),
|
|
908
|
+
s("div", {
|
|
909
|
+
class: g(["drawer-menu", [k(v) ? "dark-theme" : "light-theme", { visible: L.value }]]),
|
|
910
|
+
onMouseenter: B,
|
|
911
|
+
onMouseleave: z
|
|
912
|
+
}, [w(r.$slots, "drawer-menu", {}, () => [c[3] ||= s("div", { class: "drawer-header" }, [s("div", { class: "drawer-title" }, [s("span", { class: "grid-icon" }, [
|
|
913
|
+
s("span"),
|
|
914
|
+
s("span"),
|
|
915
|
+
s("span"),
|
|
916
|
+
s("span")
|
|
917
|
+
]), s("span", null, "功能导航")])], -1), s("div", Bt, [s("div", Vt, [(b(!0), o(e, null, C(x.value, (t) => (b(), o("div", {
|
|
918
|
+
key: t.path,
|
|
919
|
+
class: "menu-category"
|
|
920
|
+
}, [s("div", {
|
|
921
|
+
class: "category-header",
|
|
922
|
+
role: "link",
|
|
923
|
+
tabindex: t.disabled ? -1 : 0,
|
|
924
|
+
"aria-disabled": t.disabled || void 0,
|
|
925
|
+
onClick: (e) => U(t),
|
|
926
|
+
onKeydown: [N((e) => U(t), ["enter"]), N(P((e) => U(t), ["prevent"]), ["space"])]
|
|
927
|
+
}, [t.meta?.icon ? (b(), i(E(k(ee)), {
|
|
928
|
+
key: 0,
|
|
929
|
+
name: t.meta.icon,
|
|
930
|
+
size: 18
|
|
931
|
+
}, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, Ht), t.children && t.children.length > 0 ? (b(), o("div", Ut, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
|
|
932
|
+
key: e.path,
|
|
933
|
+
class: "menu-item",
|
|
934
|
+
role: "link",
|
|
935
|
+
tabindex: e.disabled ? -1 : 0,
|
|
936
|
+
"aria-disabled": e.disabled || void 0,
|
|
937
|
+
onClick: (t) => U(e),
|
|
938
|
+
onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
|
|
939
|
+
}, [e.meta?.icon ? (b(), i(E(k(ee)), {
|
|
940
|
+
key: 0,
|
|
941
|
+
name: e.meta.icon,
|
|
942
|
+
size: 16
|
|
943
|
+
}, null, 8, ["name"])) : a("", !0), s("span", Gt, D(e.meta?.title), 1)], 40, Wt))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: "sub-" + t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Kt, [s("div", qt, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
|
|
944
|
+
key: e.path,
|
|
945
|
+
class: "menu-item submenu-item",
|
|
946
|
+
role: "link",
|
|
947
|
+
tabindex: e.disabled ? -1 : 0,
|
|
948
|
+
"aria-disabled": e.disabled || void 0,
|
|
949
|
+
onClick: (t) => U(e),
|
|
950
|
+
onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
|
|
951
|
+
}, [e.meta?.icon ? (b(), i(E(k(ee)), {
|
|
952
|
+
key: 0,
|
|
953
|
+
name: e.meta.icon,
|
|
954
|
+
size: 14
|
|
955
|
+
}, null, 8, ["name"])) : a("", !0), s("span", Yt, D(e.meta?.title), 1)], 40, Jt))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], !0)], 34),
|
|
956
|
+
s("div", Xt, [u(k(V), { class: "content-layout" }, {
|
|
957
|
+
default: M(() => [u(k(H), { class: "main-content p16px app-content" }, {
|
|
958
|
+
default: M(() => [s("div", Zt, [u(l, null, {
|
|
959
|
+
default: M(({ Component: e, route: r }) => [u(n, {
|
|
960
|
+
name: F.value,
|
|
961
|
+
mode: "out-in"
|
|
962
|
+
}, {
|
|
963
|
+
default: M(() => [(b(), i(t, {
|
|
964
|
+
include: k(p),
|
|
965
|
+
max: k(m)
|
|
966
|
+
}, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
967
|
+
_: 2
|
|
968
|
+
}, 1032, ["name"])]),
|
|
969
|
+
_: 1
|
|
970
|
+
})])]),
|
|
971
|
+
_: 1
|
|
972
|
+
}), j.value ? w(r.$slots, "footer", {}, void 0, !0, 0) : a("", !0)]),
|
|
973
|
+
_: 3
|
|
974
|
+
})])
|
|
975
|
+
]);
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
}), [["__scopeId", "data-v-c5ad8728"]]), $t = {
|
|
979
|
+
key: 6,
|
|
980
|
+
class: "layout-coming-soon"
|
|
981
|
+
}, en = /* @__PURE__ */ d({
|
|
982
|
+
name: "C_LayoutContainer",
|
|
983
|
+
__name: "index",
|
|
984
|
+
setup(e) {
|
|
985
|
+
let t = Y(), n = t.layoutMode, a = t.isDark, l = S(!1), u = r({
|
|
986
|
+
get: () => t.collapsed?.value ?? l.value,
|
|
987
|
+
set: (e) => {
|
|
988
|
+
t.collapsed ? t.collapsed.value = e : l.value = e;
|
|
989
|
+
}
|
|
990
|
+
}), d = {
|
|
991
|
+
isCollapsed: u,
|
|
992
|
+
handleCollapsedChange: (e) => {
|
|
993
|
+
u.value = e;
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
return x(le, d), x("menuCollapse", d), (e, t) => (b(), o("div", { class: g(["layout-container", k(a) ? "dark-mode" : "light-mode"]) }, [k(n) === "side" ? (b(), i(pe, {
|
|
997
|
+
key: 0,
|
|
998
|
+
collapsed: u.value,
|
|
999
|
+
"onUpdate:collapsed": t[0] ||= (e) => u.value = e
|
|
1000
|
+
}, c({
|
|
1001
|
+
menu: M(() => [w(e.$slots, "menu", { collapsed: u.value })]),
|
|
1002
|
+
header: M(() => [w(e.$slots, "header")]),
|
|
1003
|
+
footer: M(() => [w(e.$slots, "footer")]),
|
|
1004
|
+
_: 2
|
|
1005
|
+
}, [e.$slots.logo ? {
|
|
1006
|
+
name: "logo",
|
|
1007
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1008
|
+
key: "0"
|
|
1009
|
+
} : void 0]), 1032, ["collapsed"])) : k(n) === "top" ? (b(), i(Oe, { key: 1 }, c({ _: 2 }, [
|
|
1010
|
+
e.$slots.logo ? {
|
|
1011
|
+
name: "logo",
|
|
1012
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1013
|
+
key: "0"
|
|
1014
|
+
} : void 0,
|
|
1015
|
+
e.$slots["top-menu"] ? {
|
|
1016
|
+
name: "menu",
|
|
1017
|
+
fn: M(() => [w(e.$slots, "top-menu")]),
|
|
1018
|
+
key: "1"
|
|
1019
|
+
} : void 0,
|
|
1020
|
+
e.$slots["header-extra"] ? {
|
|
1021
|
+
name: "header-extra",
|
|
1022
|
+
fn: M(() => [w(e.$slots, "header-extra")]),
|
|
1023
|
+
key: "2"
|
|
1024
|
+
} : void 0,
|
|
1025
|
+
e.$slots["tags-view"] ? {
|
|
1026
|
+
name: "tags-view",
|
|
1027
|
+
fn: M(() => [w(e.$slots, "tags-view")]),
|
|
1028
|
+
key: "3"
|
|
1029
|
+
} : void 0,
|
|
1030
|
+
e.$slots.footer ? {
|
|
1031
|
+
name: "footer",
|
|
1032
|
+
fn: M(() => [w(e.$slots, "footer")]),
|
|
1033
|
+
key: "4"
|
|
1034
|
+
} : void 0
|
|
1035
|
+
]), 1024)) : k(n) === "mix" ? (b(), i(Ke, { key: 2 }, c({
|
|
1036
|
+
header: M(() => [w(e.$slots, "header")]),
|
|
1037
|
+
_: 2
|
|
1038
|
+
}, [e.$slots.logo ? {
|
|
1039
|
+
name: "logo",
|
|
1040
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1041
|
+
key: "0"
|
|
1042
|
+
} : void 0, e.$slots.footer ? {
|
|
1043
|
+
name: "footer",
|
|
1044
|
+
fn: M(() => [w(e.$slots, "footer")]),
|
|
1045
|
+
key: "1"
|
|
1046
|
+
} : void 0]), 1024)) : k(n) === "mix-top" ? (b(), i(lt, { key: 3 }, c({ _: 2 }, [
|
|
1047
|
+
e.$slots.logo ? {
|
|
1048
|
+
name: "logo",
|
|
1049
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1050
|
+
key: "0"
|
|
1051
|
+
} : void 0,
|
|
1052
|
+
e.$slots.brand ? {
|
|
1053
|
+
name: "brand",
|
|
1054
|
+
fn: M(() => [w(e.$slots, "brand")]),
|
|
1055
|
+
key: "1"
|
|
1056
|
+
} : void 0,
|
|
1057
|
+
e.$slots["top-menu"] ? {
|
|
1058
|
+
name: "top-menu",
|
|
1059
|
+
fn: M(() => [w(e.$slots, "top-menu")]),
|
|
1060
|
+
key: "2"
|
|
1061
|
+
} : void 0,
|
|
1062
|
+
e.$slots["header-extra"] ? {
|
|
1063
|
+
name: "header-extra",
|
|
1064
|
+
fn: M(() => [w(e.$slots, "header-extra")]),
|
|
1065
|
+
key: "3"
|
|
1066
|
+
} : void 0,
|
|
1067
|
+
e.$slots["tags-view"] ? {
|
|
1068
|
+
name: "tags-view",
|
|
1069
|
+
fn: M(() => [w(e.$slots, "tags-view")]),
|
|
1070
|
+
key: "4"
|
|
1071
|
+
} : void 0,
|
|
1072
|
+
e.$slots.footer ? {
|
|
1073
|
+
name: "footer",
|
|
1074
|
+
fn: M(() => [w(e.$slots, "footer")]),
|
|
1075
|
+
key: "5"
|
|
1076
|
+
} : void 0
|
|
1077
|
+
]), 1024)) : k(n) === "reverse-horizontal-mix" ? (b(), i(jt, { key: 4 }, c({ _: 2 }, [
|
|
1078
|
+
e.$slots.logo ? {
|
|
1079
|
+
name: "logo",
|
|
1080
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1081
|
+
key: "0"
|
|
1082
|
+
} : void 0,
|
|
1083
|
+
e.$slots["top-menu"] ? {
|
|
1084
|
+
name: "top-menu",
|
|
1085
|
+
fn: M(() => [w(e.$slots, "top-menu")]),
|
|
1086
|
+
key: "1"
|
|
1087
|
+
} : void 0,
|
|
1088
|
+
e.$slots["header-extra"] ? {
|
|
1089
|
+
name: "header-extra",
|
|
1090
|
+
fn: M(() => [w(e.$slots, "header-extra")]),
|
|
1091
|
+
key: "2"
|
|
1092
|
+
} : void 0,
|
|
1093
|
+
e.$slots["tags-view"] ? {
|
|
1094
|
+
name: "tags-view",
|
|
1095
|
+
fn: M(() => [w(e.$slots, "tags-view")]),
|
|
1096
|
+
key: "3"
|
|
1097
|
+
} : void 0,
|
|
1098
|
+
e.$slots.footer ? {
|
|
1099
|
+
name: "footer",
|
|
1100
|
+
fn: M(() => [w(e.$slots, "footer")]),
|
|
1101
|
+
key: "4"
|
|
1102
|
+
} : void 0
|
|
1103
|
+
]), 1024)) : k(n) === "card-layout" ? (b(), i(Qt, { key: 5 }, c({ _: 2 }, [
|
|
1104
|
+
e.$slots["menu-trigger"] ? {
|
|
1105
|
+
name: "menu-trigger",
|
|
1106
|
+
fn: M(() => [w(e.$slots, "menu-trigger")]),
|
|
1107
|
+
key: "0"
|
|
1108
|
+
} : void 0,
|
|
1109
|
+
e.$slots.logo ? {
|
|
1110
|
+
name: "logo",
|
|
1111
|
+
fn: M(() => [w(e.$slots, "logo")]),
|
|
1112
|
+
key: "1"
|
|
1113
|
+
} : void 0,
|
|
1114
|
+
e.$slots["header-extra"] ? {
|
|
1115
|
+
name: "header-extra",
|
|
1116
|
+
fn: M(() => [w(e.$slots, "header-extra")]),
|
|
1117
|
+
key: "2"
|
|
1118
|
+
} : void 0,
|
|
1119
|
+
e.$slots["tags-view"] ? {
|
|
1120
|
+
name: "tags-view",
|
|
1121
|
+
fn: M(() => [w(e.$slots, "tags-view")]),
|
|
1122
|
+
key: "3"
|
|
1123
|
+
} : void 0,
|
|
1124
|
+
e.$slots["drawer-menu"] ? {
|
|
1125
|
+
name: "drawer-menu",
|
|
1126
|
+
fn: M(() => [w(e.$slots, "drawer-menu")]),
|
|
1127
|
+
key: "4"
|
|
1128
|
+
} : void 0,
|
|
1129
|
+
e.$slots.footer ? {
|
|
1130
|
+
name: "footer",
|
|
1131
|
+
fn: M(() => [w(e.$slots, "footer")]),
|
|
1132
|
+
key: "5"
|
|
1133
|
+
} : void 0
|
|
1134
|
+
]), 1024)) : (b(), o("div", $t, [...t[1] ||= [s("div", { class: "coming-soon-content" }, [s("div", { class: "coming-soon-icon" }, "🚧"), s("div", { class: "coming-soon-title" }, "布局开发中")], -1)]]))], 2));
|
|
1135
|
+
}
|
|
1136
|
+
}), tn = [
|
|
1137
|
+
{
|
|
1138
|
+
name: "拂晓蓝",
|
|
1139
|
+
value: "#409eff"
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: "薄暮红",
|
|
1143
|
+
value: "#f5222d"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: "火山橙",
|
|
1147
|
+
value: "#fa541c"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: "日暮黄",
|
|
1151
|
+
value: "#faad14"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
name: "极光绿",
|
|
1155
|
+
value: "#52c41a"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
name: "明青",
|
|
1159
|
+
value: "#13c2c2"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: "极客蓝",
|
|
1163
|
+
value: "#2f54eb"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
name: "酱紫",
|
|
1167
|
+
value: "#722ed1"
|
|
1168
|
+
}
|
|
1169
|
+
], nn = [
|
|
1170
|
+
{
|
|
1171
|
+
name: "科技蓝",
|
|
1172
|
+
icon: "💙",
|
|
1173
|
+
primaryColor: "#409eff"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: "清新绿",
|
|
1177
|
+
icon: "💚",
|
|
1178
|
+
primaryColor: "#52c41a"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: "商务灰",
|
|
1182
|
+
icon: "🖤",
|
|
1183
|
+
primaryColor: "#595959"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: "活力橙",
|
|
1187
|
+
icon: "🧡",
|
|
1188
|
+
primaryColor: "#fa8c16"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
name: "优雅紫",
|
|
1192
|
+
icon: "💜",
|
|
1193
|
+
primaryColor: "#722ed1"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
name: "经典红",
|
|
1197
|
+
icon: "❤️",
|
|
1198
|
+
primaryColor: "#f5222d"
|
|
1199
|
+
}
|
|
1200
|
+
], rn = [
|
|
1201
|
+
{
|
|
1202
|
+
mode: "side",
|
|
1203
|
+
label: "左侧菜单",
|
|
1204
|
+
description: "经典的左侧导航布局",
|
|
1205
|
+
icon: "i-mdi:page-layout-sidebar-left"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
mode: "top",
|
|
1209
|
+
label: "顶部菜单",
|
|
1210
|
+
description: "顶部水平导航布局",
|
|
1211
|
+
icon: "i-mdi:page-layout-header"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
mode: "mix",
|
|
1215
|
+
label: "混合菜单",
|
|
1216
|
+
description: "顶部 + 侧边混合布局",
|
|
1217
|
+
icon: "i-mdi:view-dashboard-outline"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
mode: "mix-top",
|
|
1221
|
+
label: "顶部混合",
|
|
1222
|
+
description: "侧边优先的混合布局",
|
|
1223
|
+
icon: "i-mdi:view-dashboard-variant-outline"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
mode: "reverse-horizontal-mix",
|
|
1227
|
+
label: "反转混合",
|
|
1228
|
+
description: "反转的水平混合布局",
|
|
1229
|
+
icon: "i-mdi:page-layout-header-footer"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
mode: "card-layout",
|
|
1233
|
+
label: "卡片布局",
|
|
1234
|
+
description: "卡片式布局风格",
|
|
1235
|
+
icon: "i-mdi:card-outline"
|
|
1236
|
+
}
|
|
1237
|
+
], an = {
|
|
1238
|
+
small: "4px",
|
|
1239
|
+
medium: "6px",
|
|
1240
|
+
large: "8px"
|
|
1241
|
+
}, on = {
|
|
1242
|
+
fade: "fade-transform",
|
|
1243
|
+
slide: "fade-slide",
|
|
1244
|
+
zoom: "fade-zoom",
|
|
1245
|
+
none: ""
|
|
1246
|
+
}, $ = {
|
|
1247
|
+
themeMode: "light",
|
|
1248
|
+
primaryColor: "#409eff",
|
|
1249
|
+
borderRadius: "medium",
|
|
1250
|
+
transitionType: "slide",
|
|
1251
|
+
enableTransition: !0,
|
|
1252
|
+
layoutMode: "side",
|
|
1253
|
+
menuExpandMode: "inline",
|
|
1254
|
+
collapsed: !1,
|
|
1255
|
+
fixedHeader: !0,
|
|
1256
|
+
showBreadcrumb: !0,
|
|
1257
|
+
showBreadcrumbIcon: !0,
|
|
1258
|
+
showTagsView: !0,
|
|
1259
|
+
tagsViewHeight: 44,
|
|
1260
|
+
tagsViewStyle: "default",
|
|
1261
|
+
showFooter: !0,
|
|
1262
|
+
sidebarWidth: 220,
|
|
1263
|
+
sidebarCollapsedWidth: 64,
|
|
1264
|
+
headerHeight: 56,
|
|
1265
|
+
enableHotkeys: !0,
|
|
1266
|
+
version: "3.1.0"
|
|
1267
|
+
}, sn = tn.map((e) => e.value), cn = {
|
|
1268
|
+
themeMode: new Set([
|
|
1269
|
+
"light",
|
|
1270
|
+
"dark",
|
|
1271
|
+
"system"
|
|
1272
|
+
]),
|
|
1273
|
+
borderRadius: new Set([
|
|
1274
|
+
"small",
|
|
1275
|
+
"medium",
|
|
1276
|
+
"large"
|
|
1277
|
+
]),
|
|
1278
|
+
transitionType: new Set([
|
|
1279
|
+
"fade",
|
|
1280
|
+
"slide",
|
|
1281
|
+
"zoom",
|
|
1282
|
+
"none"
|
|
1283
|
+
]),
|
|
1284
|
+
layoutMode: new Set([
|
|
1285
|
+
"side",
|
|
1286
|
+
"top",
|
|
1287
|
+
"mix",
|
|
1288
|
+
"mix-top",
|
|
1289
|
+
"reverse-horizontal-mix",
|
|
1290
|
+
"card-layout"
|
|
1291
|
+
]),
|
|
1292
|
+
menuExpandMode: new Set(["inline", "panel"]),
|
|
1293
|
+
tagsViewStyle: new Set([
|
|
1294
|
+
"default",
|
|
1295
|
+
"card",
|
|
1296
|
+
"smart"
|
|
1297
|
+
])
|
|
1298
|
+
}, ln = new Set([
|
|
1299
|
+
"enableTransition",
|
|
1300
|
+
"collapsed",
|
|
1301
|
+
"fixedHeader",
|
|
1302
|
+
"showBreadcrumb",
|
|
1303
|
+
"showBreadcrumbIcon",
|
|
1304
|
+
"showTagsView",
|
|
1305
|
+
"showFooter",
|
|
1306
|
+
"enableHotkeys"
|
|
1307
|
+
]), un = {
|
|
1308
|
+
tagsViewHeight: [24, 100],
|
|
1309
|
+
sidebarWidth: [120, 480],
|
|
1310
|
+
sidebarCollapsedWidth: [32, 160],
|
|
1311
|
+
headerHeight: [32, 160]
|
|
1312
|
+
}, dn = 1;
|
|
1313
|
+
function fn(e) {
|
|
1314
|
+
if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("settings 必须是对象");
|
|
1315
|
+
let t = e, n = {}, r = (e, t) => {
|
|
1316
|
+
n[e] = t;
|
|
1317
|
+
};
|
|
1318
|
+
for (let [e, n] of Object.entries(cn)) {
|
|
1319
|
+
let i = t[e];
|
|
1320
|
+
if (i !== void 0) {
|
|
1321
|
+
if (typeof i != "string" || !n.has(i)) throw RangeError(`无效的设置项 ${e}: ${String(i)}`);
|
|
1322
|
+
r(e, i);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
for (let e of ln) {
|
|
1326
|
+
let n = t[e];
|
|
1327
|
+
if (n !== void 0) {
|
|
1328
|
+
if (typeof n != "boolean") throw TypeError(`设置项 ${e} 必须是布尔值`);
|
|
1329
|
+
r(e, n);
|
|
1330
|
+
}
|
|
908
1331
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
justifyContent: "center"
|
|
949
|
-
}
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
});
|
|
953
|
-
return (r, c) => {
|
|
954
|
-
let l = w("RouterView");
|
|
955
|
-
return y(), o("div", vt, [
|
|
956
|
-
s("div", { class: h(["top-navbar", [O(_) ? "dark-theme" : "light-theme"]]) }, [
|
|
957
|
-
s("div", yt, [C(r.$slots, "logo", {}, () => [
|
|
958
|
-
s("div", bt, [c[0] ||= s("div", { class: "logo-glow" }, null, -1), M.logoType === "video" ? (y(), o("video", {
|
|
959
|
-
key: 0,
|
|
960
|
-
src: M.logoSrc,
|
|
961
|
-
width: M.logoSize || 36,
|
|
962
|
-
height: M.logoSize || 36,
|
|
963
|
-
autoplay: "",
|
|
964
|
-
loop: "",
|
|
965
|
-
muted: "",
|
|
966
|
-
playsinline: "",
|
|
967
|
-
class: "logo-video"
|
|
968
|
-
}, " 您的浏览器不支持 video 标签。 ", 8, xt)) : (y(), o("img", {
|
|
969
|
-
key: 1,
|
|
970
|
-
src: M.logoSrc,
|
|
971
|
-
width: M.logoSize || 36,
|
|
972
|
-
height: M.logoSize || 36,
|
|
973
|
-
class: "logo-video"
|
|
974
|
-
}, null, 8, St))]),
|
|
975
|
-
s("div", Ct, [s("span", wt, E(M.name), 1), s("span", Tt, E(M.subtitle), 1)]),
|
|
976
|
-
c[1] ||= s("div", { class: "navbar-divider" }, null, -1)
|
|
977
|
-
])]),
|
|
978
|
-
s("div", Et, [C(r.$slots, "top-menu", {}, () => [u($, { data: v.value }, null, 8, ["data"])])]),
|
|
979
|
-
C(r.$slots, "header-extra")
|
|
980
|
-
], 2),
|
|
981
|
-
b.value ? (y(), o("div", {
|
|
982
|
-
key: 0,
|
|
983
|
-
class: "tags-view-container",
|
|
984
|
-
style: g({ height: `${D.value}px` })
|
|
985
|
-
}, [C(r.$slots, "tags-view")], 4)) : a("", !0),
|
|
986
|
-
s("div", Dt, [
|
|
987
|
-
u(O(V), { class: "content-layout" }, {
|
|
988
|
-
default: j(() => [u(O(H), { class: "main-content" }, {
|
|
989
|
-
default: j(() => [s("div", Ot, [u(l, null, {
|
|
990
|
-
default: j(({ Component: e, route: r }) => [u(n, {
|
|
991
|
-
name: A.value,
|
|
992
|
-
mode: "out-in"
|
|
993
|
-
}, {
|
|
994
|
-
default: j(() => [(y(), i(t, {
|
|
995
|
-
include: O(p),
|
|
996
|
-
max: O(m)
|
|
997
|
-
}, [(y(), i(T(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
998
|
-
_: 2
|
|
999
|
-
}, 1032, ["name"])]),
|
|
1000
|
-
_: 1
|
|
1001
|
-
})])]),
|
|
1002
|
-
_: 1
|
|
1003
|
-
}), k.value ? C(r.$slots, "footer", { key: 0 }) : a("", !0)]),
|
|
1004
|
-
_: 3
|
|
1005
|
-
}),
|
|
1006
|
-
O(N).currentSecondMenus.value.length > 0 ? (y(), o("div", {
|
|
1007
|
-
key: 0,
|
|
1008
|
-
class: h(["sidebar-toggle", [O(_) ? "dark-theme" : "light-theme", { active: !P.value }]]),
|
|
1009
|
-
onClick: F
|
|
1010
|
-
}, [s("span", { class: h([
|
|
1011
|
-
"collapse-arrow",
|
|
1012
|
-
"toggle-icon",
|
|
1013
|
-
P.value ? "collapsed" : "expanded"
|
|
1014
|
-
]) }, [...c[2] ||= [s("span", { class: "arrow-line" }, null, -1), s("span", { class: "arrow-line" }, null, -1)]], 2)], 2)) : a("", !0),
|
|
1015
|
-
O(N).currentSecondMenus.value.length > 0 ? (y(), o("div", {
|
|
1016
|
-
key: 1,
|
|
1017
|
-
class: h(["right-sidebar-wrapper", { collapsed: P.value }])
|
|
1018
|
-
}, [s("div", { class: h(["right-sidebar", [O(_) ? "dark-theme" : "light-theme"]]) }, [s("div", { class: h(["sidebar-header", [O(_) ? "dark-theme" : "light-theme"]]) }, [s("div", kt, [O(N).activeFirstMenuItem.value?.meta?.icon ? (y(), i(T(O(I)), {
|
|
1019
|
-
key: 0,
|
|
1020
|
-
name: O(N).activeFirstMenuItem.value.meta.icon,
|
|
1021
|
-
size: 20
|
|
1022
|
-
}, null, 8, ["name"])) : a("", !0)]), s("span", At, E(O(N).activeFirstMenuItem.value?.meta?.title || "菜单"), 1)], 2), s("div", jt, [(y(!0), o(e, null, S(O(N).currentSecondMenus.value, (t) => (y(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (y(), o("div", Mt, [s("div", Nt, [t.meta?.icon ? (y(), i(T(O(I)), {
|
|
1023
|
-
key: 0,
|
|
1024
|
-
name: t.meta.icon,
|
|
1025
|
-
size: 16
|
|
1026
|
-
}, null, 8, ["name"])) : a("", !0), s("span", null, E(t.meta?.title), 1)]), (y(!0), o(e, null, S(t.children, (e) => (y(), o("div", {
|
|
1027
|
-
key: e.path,
|
|
1028
|
-
class: h(["menu-item sub-item", { active: O(N).isMenuItemActive(e.path) }]),
|
|
1029
|
-
onClick: (t) => O(N).handleSecondMenuClick(e)
|
|
1030
|
-
}, [e.meta?.icon ? (y(), i(T(O(I)), {
|
|
1031
|
-
key: 0,
|
|
1032
|
-
name: e.meta.icon,
|
|
1033
|
-
size: 16
|
|
1034
|
-
}, null, 8, ["name"])) : a("", !0), s("span", Ft, E(e.meta?.title), 1)], 10, Pt))), 128))])) : (y(), o("div", {
|
|
1035
|
-
key: 1,
|
|
1036
|
-
class: h(["menu-item", { active: O(N).isMenuItemActive(t.path) }]),
|
|
1037
|
-
onClick: (e) => O(N).handleSecondMenuClick(t)
|
|
1038
|
-
}, [t.meta?.icon ? (y(), i(T(O(I)), {
|
|
1039
|
-
key: 0,
|
|
1040
|
-
name: t.meta.icon,
|
|
1041
|
-
size: 18
|
|
1042
|
-
}, null, 8, ["name"])) : a("", !0), s("span", Lt, E(t.meta?.title), 1)], 10, It))], 64))), 128))])], 2)], 2)) : a("", !0)
|
|
1043
|
-
])
|
|
1044
|
-
]);
|
|
1332
|
+
for (let [e, n] of Object.entries(un)) {
|
|
1333
|
+
let i = t[e];
|
|
1334
|
+
if (i !== void 0) {
|
|
1335
|
+
if (typeof i != "number" || !Number.isFinite(i) || i < n[0] || i > n[1]) throw RangeError(`设置项 ${e} 超出允许范围`);
|
|
1336
|
+
r(e, i);
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
if (t.primaryColor !== void 0) {
|
|
1340
|
+
if (typeof t.primaryColor != "string" || !/^#[0-9a-fA-F]{6}$/.test(t.primaryColor)) throw RangeError("primaryColor 必须是 #rrggbb 格式");
|
|
1341
|
+
n.primaryColor = t.primaryColor;
|
|
1342
|
+
}
|
|
1343
|
+
if (t.version !== void 0) {
|
|
1344
|
+
if (typeof t.version != "string" || t.version.length > 50) throw TypeError("version 必须是长度不超过 50 的字符串");
|
|
1345
|
+
n.version = t.version;
|
|
1346
|
+
}
|
|
1347
|
+
return n;
|
|
1348
|
+
}
|
|
1349
|
+
function pn(e) {
|
|
1350
|
+
if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("配置文件根节点必须是对象");
|
|
1351
|
+
let t = e, n = {};
|
|
1352
|
+
if (t.schemaVersion !== void 0) {
|
|
1353
|
+
if (typeof t.schemaVersion != "number" || !Number.isInteger(t.schemaVersion) || t.schemaVersion < 1 || t.schemaVersion > 1) throw RangeError("不支持的配置格式版本");
|
|
1354
|
+
n.schemaVersion = t.schemaVersion;
|
|
1355
|
+
}
|
|
1356
|
+
t.settings !== void 0 && (n.settings = fn(t.settings));
|
|
1357
|
+
for (let e of ["gray", "colorWeak"]) {
|
|
1358
|
+
let r = t[e];
|
|
1359
|
+
if (r !== void 0) {
|
|
1360
|
+
if (typeof r != "boolean") throw TypeError(`${e} 必须是布尔值`);
|
|
1361
|
+
n[e] = r;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
if (t.watermark !== void 0) {
|
|
1365
|
+
if (!t.watermark || typeof t.watermark != "object" || Array.isArray(t.watermark)) throw TypeError("watermark 必须是对象");
|
|
1366
|
+
let e = t.watermark;
|
|
1367
|
+
if (typeof e.enabled != "boolean" || typeof e.text != "string" || e.text.length > 200) throw TypeError("watermark 配置无效");
|
|
1368
|
+
n.watermark = {
|
|
1369
|
+
enabled: e.enabled,
|
|
1370
|
+
text: e.text
|
|
1045
1371
|
};
|
|
1046
1372
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
"
|
|
1051
|
-
|
|
1052
|
-
"
|
|
1053
|
-
"
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1373
|
+
return n;
|
|
1374
|
+
}
|
|
1375
|
+
function mn(e, t) {
|
|
1376
|
+
if (typeof e != "string") return "#000000";
|
|
1377
|
+
if (!Number.isFinite(t)) return e;
|
|
1378
|
+
let n = Math.round(t), r = e.trim(), i = r.startsWith("#") ? r.slice(1) : r;
|
|
1379
|
+
if (i.length === 3 && (i = i.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(i)) return e;
|
|
1380
|
+
let a = parseInt(i, 16), o = Math.min(255, Math.max(0, (a >> 16) + n)), s = Math.min(255, Math.max(0, (a >> 8 & 255) + n)), c = Math.min(255, Math.max(0, (a & 255) + n));
|
|
1381
|
+
return `#${(o << 16 | s << 8 | c).toString(16).padStart(6, "0")}`;
|
|
1382
|
+
}
|
|
1383
|
+
//#endregion
|
|
1384
|
+
//#region src/stores/settings.ts
|
|
1385
|
+
function hn(e = {}) {
|
|
1386
|
+
let { id: t = "settings", defaults: n = {}, onThemeModeChange: i } = e;
|
|
1387
|
+
if (typeof t != "string" || !t.trim()) throw RangeError("Settings store id 不能为空");
|
|
1388
|
+
let a = {
|
|
1389
|
+
...$,
|
|
1390
|
+
...fn(n)
|
|
1391
|
+
};
|
|
1392
|
+
return se(t, () => {
|
|
1393
|
+
let e = S(a.themeMode), t = S(a.primaryColor), n = S(a.borderRadius), o = S(a.transitionType), s = S(a.enableTransition), c = S(a.layoutMode), l = S(a.menuExpandMode), u = S(a.collapsed), d = S(a.fixedHeader), f = S(a.showBreadcrumb), p = S(a.showBreadcrumbIcon), m = S(a.showTagsView), h = S(a.tagsViewHeight), g = S(a.tagsViewStyle), _ = S(a.showFooter), v = S(a.sidebarWidth), y = S(a.sidebarCollapsedWidth), b = S(a.headerHeight), x = S(a.enableHotkeys), C = S(a.version), w = r(() => an[n.value]), T = r(() => s.value && o.value !== "none"), E = r(() => T.value ? on[o.value] : ""), D = r(() => ({
|
|
1394
|
+
themeMode: e.value,
|
|
1395
|
+
primaryColor: t.value,
|
|
1396
|
+
borderRadius: n.value,
|
|
1397
|
+
transitionType: o.value,
|
|
1398
|
+
enableTransition: s.value,
|
|
1399
|
+
layoutMode: c.value,
|
|
1400
|
+
menuExpandMode: l.value,
|
|
1401
|
+
collapsed: u.value,
|
|
1402
|
+
fixedHeader: d.value,
|
|
1403
|
+
showBreadcrumb: f.value,
|
|
1404
|
+
showBreadcrumbIcon: p.value,
|
|
1405
|
+
showTagsView: m.value,
|
|
1406
|
+
tagsViewHeight: h.value,
|
|
1407
|
+
tagsViewStyle: g.value,
|
|
1408
|
+
showFooter: _.value,
|
|
1409
|
+
sidebarWidth: v.value,
|
|
1410
|
+
sidebarCollapsedWidth: y.value,
|
|
1411
|
+
headerHeight: b.value,
|
|
1412
|
+
enableHotkeys: x.value,
|
|
1413
|
+
version: C.value
|
|
1414
|
+
})), O = () => {
|
|
1415
|
+
if (typeof document > "u") return;
|
|
1416
|
+
let e = document.documentElement;
|
|
1417
|
+
e.style.setProperty("--primary-color", t.value), e.style.setProperty("--primary-color-hover", mn(t.value, 10)), e.style.setProperty("--primary-color-pressed", mn(t.value, -10)), e.style.setProperty("--border-radius", w.value), e.style.setProperty("--sidebar-width", `${v.value}px`), e.style.setProperty("--sidebar-collapsed-width", `${y.value}px`), e.style.setProperty("--header-height", `${b.value}px`), e.style.setProperty("--tags-view-height", `${h.value}px`);
|
|
1418
|
+
};
|
|
1419
|
+
return j([
|
|
1420
|
+
t,
|
|
1421
|
+
w,
|
|
1422
|
+
v,
|
|
1423
|
+
y,
|
|
1424
|
+
b,
|
|
1425
|
+
h
|
|
1426
|
+
], () => {
|
|
1427
|
+
O();
|
|
1428
|
+
}, { immediate: !0 }), {
|
|
1429
|
+
themeMode: e,
|
|
1430
|
+
primaryColor: t,
|
|
1431
|
+
borderRadius: n,
|
|
1432
|
+
transitionType: o,
|
|
1433
|
+
enableTransition: s,
|
|
1434
|
+
layoutMode: c,
|
|
1435
|
+
menuExpandMode: l,
|
|
1436
|
+
collapsed: u,
|
|
1437
|
+
fixedHeader: d,
|
|
1438
|
+
showBreadcrumb: f,
|
|
1439
|
+
showBreadcrumbIcon: p,
|
|
1440
|
+
showTagsView: m,
|
|
1441
|
+
tagsViewHeight: h,
|
|
1442
|
+
tagsViewStyle: g,
|
|
1443
|
+
showFooter: _,
|
|
1444
|
+
sidebarWidth: v,
|
|
1445
|
+
sidebarCollapsedWidth: y,
|
|
1446
|
+
headerHeight: b,
|
|
1447
|
+
enableHotkeys: x,
|
|
1448
|
+
version: C,
|
|
1449
|
+
borderRadiusValue: w,
|
|
1450
|
+
transitionName: E,
|
|
1451
|
+
shouldEnableTransition: T,
|
|
1452
|
+
settingsState: D,
|
|
1453
|
+
syncCSSVariables: O,
|
|
1454
|
+
applyPreset: async (e) => {
|
|
1455
|
+
t.value = e.primaryColor, e.settings && (e.settings.borderRadius && (n.value = e.settings.borderRadius), e.settings.transitionType && (o.value = e.settings.transitionType), e.settings.showBreadcrumb !== void 0 && (f.value = e.settings.showBreadcrumb), e.settings.showTagsView !== void 0 && (m.value = e.settings.showTagsView), e.settings.tagsViewStyle && (g.value = e.settings.tagsViewStyle));
|
|
1456
|
+
},
|
|
1457
|
+
resetSettings: () => {
|
|
1458
|
+
e.value = a.themeMode, t.value = a.primaryColor, n.value = a.borderRadius, o.value = a.transitionType, s.value = a.enableTransition, c.value = a.layoutMode, l.value = a.menuExpandMode, u.value = a.collapsed, d.value = a.fixedHeader, f.value = a.showBreadcrumb, p.value = a.showBreadcrumbIcon, m.value = a.showTagsView, h.value = a.tagsViewHeight, g.value = a.tagsViewStyle, _.value = a.showFooter, v.value = a.sidebarWidth, y.value = a.sidebarCollapsedWidth, b.value = a.headerHeight, x.value = a.enableHotkeys, C.value = a.version;
|
|
1459
|
+
},
|
|
1460
|
+
updateThemeMode: async (t) => {
|
|
1461
|
+
fn({ themeMode: t });
|
|
1462
|
+
let n = e.value;
|
|
1463
|
+
e.value = t;
|
|
1464
|
+
try {
|
|
1465
|
+
i && await i(t);
|
|
1466
|
+
} catch (t) {
|
|
1467
|
+
throw e.value = n, t;
|
|
1083
1468
|
}
|
|
1084
1469
|
},
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
class: e.name,
|
|
1088
|
-
style: {
|
|
1089
|
-
fontSize: `${e.size}px`,
|
|
1090
|
-
display: "inline-flex",
|
|
1091
|
-
alignItems: "center",
|
|
1092
|
-
justifyContent: "center"
|
|
1093
|
-
}
|
|
1094
|
-
});
|
|
1470
|
+
toggleCollapse: () => {
|
|
1471
|
+
u.value = !u.value;
|
|
1095
1472
|
}
|
|
1096
|
-
});
|
|
1097
|
-
return v(() => {
|
|
1098
|
-
I.value && clearTimeout(I.value);
|
|
1099
|
-
}), (r, c) => {
|
|
1100
|
-
let l = w("RouterView");
|
|
1101
|
-
return y(), o("div", zt, [
|
|
1102
|
-
s("div", { class: h(["top-navbar", [O(b) ? "dark-theme" : "light-theme"]]) }, [s("div", Bt, [s("div", {
|
|
1103
|
-
class: "hover-trigger-area",
|
|
1104
|
-
onMouseenter: R,
|
|
1105
|
-
onMouseleave: L
|
|
1106
|
-
}, [C(r.$slots, "menu-trigger", {}, () => [c[0] ||= s("div", { class: "menu-indicator" }, [s("span", { class: "hamburger-icon" }, [
|
|
1107
|
-
s("span"),
|
|
1108
|
-
s("span"),
|
|
1109
|
-
s("span")
|
|
1110
|
-
])], -1)], !0)], 32), C(r.$slots, "logo", {}, () => [
|
|
1111
|
-
s("div", Vt, [c[1] ||= s("div", { class: "logo-glow" }, null, -1), P.logoType === "video" ? (y(), o("video", {
|
|
1112
|
-
key: 0,
|
|
1113
|
-
src: P.logoSrc,
|
|
1114
|
-
width: P.logoSize || 36,
|
|
1115
|
-
height: P.logoSize || 36,
|
|
1116
|
-
autoplay: "",
|
|
1117
|
-
loop: "",
|
|
1118
|
-
muted: "",
|
|
1119
|
-
playsinline: "",
|
|
1120
|
-
class: "logo-video"
|
|
1121
|
-
}, " 您的浏览器不支持 video 标签。 ", 8, Ht)) : (y(), o("img", {
|
|
1122
|
-
key: 1,
|
|
1123
|
-
src: P.logoSrc,
|
|
1124
|
-
width: P.logoSize || 36,
|
|
1125
|
-
height: P.logoSize || 36,
|
|
1126
|
-
class: "logo-video"
|
|
1127
|
-
}, null, 8, Ut))]),
|
|
1128
|
-
s("div", Wt, [s("span", Gt, E(P.name), 1), s("span", Kt, E(P.subtitle), 1)]),
|
|
1129
|
-
c[2] ||= s("div", { class: "navbar-divider" }, null, -1)
|
|
1130
|
-
], !0)]), C(r.$slots, "header-extra", {}, void 0, !0)], 2),
|
|
1131
|
-
k.value ? (y(), o("div", {
|
|
1132
|
-
key: 0,
|
|
1133
|
-
class: "tags-view-container",
|
|
1134
|
-
style: g({ height: `${A.value}px` })
|
|
1135
|
-
}, [C(r.$slots, "tags-view", {}, void 0, !0)], 4)) : a("", !0),
|
|
1136
|
-
s("div", {
|
|
1137
|
-
class: h(["drawer-menu", [O(b) ? "dark-theme" : "light-theme", { visible: F.value }]]),
|
|
1138
|
-
onMouseenter: R,
|
|
1139
|
-
onMouseleave: L
|
|
1140
|
-
}, [C(r.$slots, "drawer-menu", {}, () => [c[3] ||= s("div", { class: "drawer-header" }, [s("div", { class: "drawer-title" }, [s("span", { class: "grid-icon" }, [
|
|
1141
|
-
s("span"),
|
|
1142
|
-
s("span"),
|
|
1143
|
-
s("span"),
|
|
1144
|
-
s("span")
|
|
1145
|
-
]), s("span", null, "功能导航")])], -1), s("div", qt, [s("div", Jt, [(y(!0), o(e, null, S(D.value, (t) => (y(), o("div", {
|
|
1146
|
-
key: t.path,
|
|
1147
|
-
class: "menu-category"
|
|
1148
|
-
}, [s("div", {
|
|
1149
|
-
class: "category-header",
|
|
1150
|
-
onClick: (e) => z(t)
|
|
1151
|
-
}, [t.meta?.icon ? (y(), i(T(O(B)), {
|
|
1152
|
-
key: 0,
|
|
1153
|
-
name: t.meta.icon,
|
|
1154
|
-
size: 18
|
|
1155
|
-
}, null, 8, ["name"])) : a("", !0), s("span", null, E(t.meta?.title), 1)], 8, Yt), t.children && t.children.length > 0 ? (y(), o("div", Xt, [(y(!0), o(e, null, S(t.children, (e) => (y(), o("div", {
|
|
1156
|
-
key: e.path,
|
|
1157
|
-
class: "menu-item",
|
|
1158
|
-
onClick: (t) => z(e)
|
|
1159
|
-
}, [e.meta?.icon ? (y(), i(T(O(B)), {
|
|
1160
|
-
key: 0,
|
|
1161
|
-
name: e.meta.icon,
|
|
1162
|
-
size: 16
|
|
1163
|
-
}, null, 8, ["name"])) : a("", !0), s("span", Qt, E(e.meta?.title), 1)], 8, Zt))), 128)), (y(!0), o(e, null, S(t.children, (t) => (y(), o(e, { key: "sub-" + t.path }, [t.children && t.children.length > 0 ? (y(), o("div", $t, [s("div", en, E(t.meta?.title), 1), (y(!0), o(e, null, S(t.children, (e) => (y(), o("div", {
|
|
1164
|
-
key: e.path,
|
|
1165
|
-
class: "menu-item submenu-item",
|
|
1166
|
-
onClick: (t) => z(e)
|
|
1167
|
-
}, [e.meta?.icon ? (y(), i(T(O(B)), {
|
|
1168
|
-
key: 0,
|
|
1169
|
-
name: e.meta.icon,
|
|
1170
|
-
size: 14
|
|
1171
|
-
}, null, 8, ["name"])) : a("", !0), s("span", nn, E(e.meta?.title), 1)], 8, tn))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], !0)], 34),
|
|
1172
|
-
s("div", rn, [u(O(V), { class: "content-layout" }, {
|
|
1173
|
-
default: j(() => [u(O(H), { class: "main-content p16px app-content" }, {
|
|
1174
|
-
default: j(() => [s("div", an, [u(l, null, {
|
|
1175
|
-
default: j(({ Component: e, route: r }) => [u(n, {
|
|
1176
|
-
name: N.value,
|
|
1177
|
-
mode: "out-in"
|
|
1178
|
-
}, {
|
|
1179
|
-
default: j(() => [(y(), i(t, {
|
|
1180
|
-
include: O(p),
|
|
1181
|
-
max: O(m)
|
|
1182
|
-
}, [(y(), i(T(e), { key: r.path }))], 1032, ["include", "max"]))]),
|
|
1183
|
-
_: 2
|
|
1184
|
-
}, 1032, ["name"])]),
|
|
1185
|
-
_: 1
|
|
1186
|
-
})])]),
|
|
1187
|
-
_: 1
|
|
1188
|
-
}), M.value ? C(r.$slots, "footer", { key: 0 }, void 0, !0) : a("", !0)]),
|
|
1189
|
-
_: 3
|
|
1190
|
-
})])
|
|
1191
|
-
]);
|
|
1192
1473
|
};
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
class: "layout-coming-soon"
|
|
1197
|
-
}, cn = /* @__PURE__ */ d({
|
|
1198
|
-
name: "C_LayoutContainer",
|
|
1199
|
-
__name: "index",
|
|
1200
|
-
setup(e) {
|
|
1201
|
-
let t = ye(), n = Y(), a = r(() => t.layoutMode), l = n.isDark, u = x(!1);
|
|
1202
|
-
return b("menuCollapse", {
|
|
1203
|
-
isCollapsed: u,
|
|
1204
|
-
handleCollapsedChange: (e) => {
|
|
1205
|
-
u.value = e;
|
|
1206
|
-
}
|
|
1207
|
-
}), (e, t) => (y(), o("div", { class: h(["layout-container", O(l) ? "dark-mode" : "light-mode"]) }, [a.value === "side" ? (y(), i(Se, {
|
|
1208
|
-
key: 0,
|
|
1209
|
-
collapsed: u.value,
|
|
1210
|
-
"onUpdate:collapsed": t[0] ||= (e) => u.value = e
|
|
1211
|
-
}, c({
|
|
1212
|
-
menu: j(() => [C(e.$slots, "menu", { collapsed: u.value })]),
|
|
1213
|
-
header: j(() => [C(e.$slots, "header")]),
|
|
1214
|
-
footer: j(() => [C(e.$slots, "footer")]),
|
|
1215
|
-
_: 2
|
|
1216
|
-
}, [e.$slots.logo ? {
|
|
1217
|
-
name: "logo",
|
|
1218
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1219
|
-
key: "0"
|
|
1220
|
-
} : void 0]), 1032, ["collapsed"])) : a.value === "top" ? (y(), i(Ie, { key: 1 }, c({ _: 2 }, [
|
|
1221
|
-
e.$slots.logo ? {
|
|
1222
|
-
name: "logo",
|
|
1223
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1224
|
-
key: "0"
|
|
1225
|
-
} : void 0,
|
|
1226
|
-
e.$slots["top-menu"] ? {
|
|
1227
|
-
name: "menu",
|
|
1228
|
-
fn: j(() => [C(e.$slots, "top-menu")]),
|
|
1229
|
-
key: "1"
|
|
1230
|
-
} : void 0,
|
|
1231
|
-
e.$slots["header-extra"] ? {
|
|
1232
|
-
name: "header-extra",
|
|
1233
|
-
fn: j(() => [C(e.$slots, "header-extra")]),
|
|
1234
|
-
key: "2"
|
|
1235
|
-
} : void 0,
|
|
1236
|
-
e.$slots["tags-view"] ? {
|
|
1237
|
-
name: "tags-view",
|
|
1238
|
-
fn: j(() => [C(e.$slots, "tags-view")]),
|
|
1239
|
-
key: "3"
|
|
1240
|
-
} : void 0,
|
|
1241
|
-
e.$slots.footer ? {
|
|
1242
|
-
name: "footer",
|
|
1243
|
-
fn: j(() => [C(e.$slots, "footer")]),
|
|
1244
|
-
key: "4"
|
|
1245
|
-
} : void 0
|
|
1246
|
-
]), 1024)) : a.value === "mix" ? (y(), i(et, { key: 2 }, c({
|
|
1247
|
-
header: j(() => [C(e.$slots, "header")]),
|
|
1248
|
-
_: 2
|
|
1249
|
-
}, [e.$slots.logo ? {
|
|
1250
|
-
name: "logo",
|
|
1251
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1252
|
-
key: "0"
|
|
1253
|
-
} : void 0, e.$slots.footer ? {
|
|
1254
|
-
name: "footer",
|
|
1255
|
-
fn: j(() => [C(e.$slots, "footer")]),
|
|
1256
|
-
key: "1"
|
|
1257
|
-
} : void 0]), 1024)) : a.value === "mix-top" ? (y(), i(_t, { key: 3 }, c({ _: 2 }, [
|
|
1258
|
-
e.$slots.logo ? {
|
|
1259
|
-
name: "logo",
|
|
1260
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1261
|
-
key: "0"
|
|
1262
|
-
} : void 0,
|
|
1263
|
-
e.$slots.brand ? {
|
|
1264
|
-
name: "brand",
|
|
1265
|
-
fn: j(() => [C(e.$slots, "brand")]),
|
|
1266
|
-
key: "1"
|
|
1267
|
-
} : void 0,
|
|
1268
|
-
e.$slots["top-menu"] ? {
|
|
1269
|
-
name: "top-menu",
|
|
1270
|
-
fn: j(() => [C(e.$slots, "top-menu")]),
|
|
1271
|
-
key: "2"
|
|
1272
|
-
} : void 0,
|
|
1273
|
-
e.$slots["header-extra"] ? {
|
|
1274
|
-
name: "header-extra",
|
|
1275
|
-
fn: j(() => [C(e.$slots, "header-extra")]),
|
|
1276
|
-
key: "3"
|
|
1277
|
-
} : void 0,
|
|
1278
|
-
e.$slots["tags-view"] ? {
|
|
1279
|
-
name: "tags-view",
|
|
1280
|
-
fn: j(() => [C(e.$slots, "tags-view")]),
|
|
1281
|
-
key: "4"
|
|
1282
|
-
} : void 0,
|
|
1283
|
-
e.$slots.footer ? {
|
|
1284
|
-
name: "footer",
|
|
1285
|
-
fn: j(() => [C(e.$slots, "footer")]),
|
|
1286
|
-
key: "5"
|
|
1287
|
-
} : void 0
|
|
1288
|
-
]), 1024)) : a.value === "reverse-horizontal-mix" ? (y(), i(Rt, { key: 4 }, c({ _: 2 }, [
|
|
1289
|
-
e.$slots.logo ? {
|
|
1290
|
-
name: "logo",
|
|
1291
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1292
|
-
key: "0"
|
|
1293
|
-
} : void 0,
|
|
1294
|
-
e.$slots["top-menu"] ? {
|
|
1295
|
-
name: "top-menu",
|
|
1296
|
-
fn: j(() => [C(e.$slots, "top-menu")]),
|
|
1297
|
-
key: "1"
|
|
1298
|
-
} : void 0,
|
|
1299
|
-
e.$slots["header-extra"] ? {
|
|
1300
|
-
name: "header-extra",
|
|
1301
|
-
fn: j(() => [C(e.$slots, "header-extra")]),
|
|
1302
|
-
key: "2"
|
|
1303
|
-
} : void 0,
|
|
1304
|
-
e.$slots["tags-view"] ? {
|
|
1305
|
-
name: "tags-view",
|
|
1306
|
-
fn: j(() => [C(e.$slots, "tags-view")]),
|
|
1307
|
-
key: "3"
|
|
1308
|
-
} : void 0,
|
|
1309
|
-
e.$slots.footer ? {
|
|
1310
|
-
name: "footer",
|
|
1311
|
-
fn: j(() => [C(e.$slots, "footer")]),
|
|
1312
|
-
key: "4"
|
|
1313
|
-
} : void 0
|
|
1314
|
-
]), 1024)) : a.value === "card-layout" ? (y(), i(on, { key: 5 }, c({ _: 2 }, [
|
|
1315
|
-
e.$slots["menu-trigger"] ? {
|
|
1316
|
-
name: "menu-trigger",
|
|
1317
|
-
fn: j(() => [C(e.$slots, "menu-trigger")]),
|
|
1318
|
-
key: "0"
|
|
1319
|
-
} : void 0,
|
|
1320
|
-
e.$slots.logo ? {
|
|
1321
|
-
name: "logo",
|
|
1322
|
-
fn: j(() => [C(e.$slots, "logo")]),
|
|
1323
|
-
key: "1"
|
|
1324
|
-
} : void 0,
|
|
1325
|
-
e.$slots["header-extra"] ? {
|
|
1326
|
-
name: "header-extra",
|
|
1327
|
-
fn: j(() => [C(e.$slots, "header-extra")]),
|
|
1328
|
-
key: "2"
|
|
1329
|
-
} : void 0,
|
|
1330
|
-
e.$slots["tags-view"] ? {
|
|
1331
|
-
name: "tags-view",
|
|
1332
|
-
fn: j(() => [C(e.$slots, "tags-view")]),
|
|
1333
|
-
key: "3"
|
|
1334
|
-
} : void 0,
|
|
1335
|
-
e.$slots["drawer-menu"] ? {
|
|
1336
|
-
name: "drawer-menu",
|
|
1337
|
-
fn: j(() => [C(e.$slots, "drawer-menu")]),
|
|
1338
|
-
key: "4"
|
|
1339
|
-
} : void 0,
|
|
1340
|
-
e.$slots.footer ? {
|
|
1341
|
-
name: "footer",
|
|
1342
|
-
fn: j(() => [C(e.$slots, "footer")]),
|
|
1343
|
-
key: "5"
|
|
1344
|
-
} : void 0
|
|
1345
|
-
]), 1024)) : (y(), o("div", sn, [...t[1] ||= [s("div", { class: "coming-soon-content" }, [s("div", { class: "coming-soon-icon" }, "🚧"), s("div", { class: "coming-soon-title" }, "布局开发中")], -1)]]))], 2));
|
|
1346
|
-
}
|
|
1347
|
-
}), ln = [
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
var gn = hn(), _n = [
|
|
1348
1477
|
{
|
|
1349
1478
|
label: "左侧菜单(默认)",
|
|
1350
1479
|
value: "side",
|
|
@@ -1381,49 +1510,55 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1381
1510
|
disabled: !1,
|
|
1382
1511
|
svg: "\n <rect x=\"0\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"32\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.6\"/>\n <rect x=\"32\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
|
|
1383
1512
|
}
|
|
1384
|
-
],
|
|
1513
|
+
], vn = { class: "settings-section" }, yn = { class: "preset-grid" }, bn = [
|
|
1385
1514
|
"aria-pressed",
|
|
1386
1515
|
"onClick",
|
|
1387
1516
|
"onKeydown"
|
|
1388
|
-
],
|
|
1517
|
+
], xn = { class: "preset-icon" }, Sn = { class: "preset-name" }, Cn = { class: "preset-color" }, wn = { class: "settings-section" }, Tn = { class: "settings-section" }, En = { class: "color-picker-wrapper" }, Dn = { class: "color-value" }, On = { class: "settings-section" }, kn = { class: "settings-section" }, An = { class: "flex items-center justify-between mb-2" }, jn = { class: "settings-section" }, Mn = { class: "settings-section" }, Nn = { class: "layout-grid" }, Pn = [
|
|
1389
1518
|
"tabindex",
|
|
1390
1519
|
"aria-disabled",
|
|
1391
1520
|
"aria-pressed",
|
|
1392
1521
|
"onClick",
|
|
1393
1522
|
"onKeydown"
|
|
1394
|
-
],
|
|
1523
|
+
], Fn = { class: "layout-screenshot" }, In = {
|
|
1395
1524
|
class: "layout-svg",
|
|
1396
1525
|
viewBox: "0 0 56 48",
|
|
1397
1526
|
fill: "none",
|
|
1398
1527
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1399
|
-
},
|
|
1528
|
+
}, Ln = ["innerHTML"], Rn = { class: "layout-label" }, zn = {
|
|
1400
1529
|
key: 0,
|
|
1401
1530
|
class: "badge-soon"
|
|
1402
|
-
},
|
|
1531
|
+
}, Bn = {
|
|
1403
1532
|
class: "settings-section menu-expand-section",
|
|
1404
1533
|
"data-menu-expand-mode": "built-in"
|
|
1405
|
-
},
|
|
1534
|
+
}, Vn = { class: "settings-section" }, Hn = { class: "setting-item" }, Un = { class: "setting-item" }, Wn = { class: "setting-item" }, Gn = { class: "setting-item" }, Kn = { class: "settings-section" }, qn = { class: "slider-item" }, Jn = { class: "slider-label" }, Yn = { class: "slider-value" }, Xn = { class: "slider-item" }, Zn = { class: "slider-label" }, Qn = { class: "slider-value" }, $n = { class: "settings-section" }, er = { class: "settings-section" }, tr = { class: "action-buttons-grid" }, nr = { class: "settings-section" }, rr = { class: "action-buttons-grid" }, ir = { class: "settings-section" }, ar = { class: "setting-item" }, or = { class: "setting-item" }, sr = { class: "settings-section" }, cr = { class: "setting-item" }, lr = {
|
|
1406
1535
|
key: 0,
|
|
1407
1536
|
class: "mt-2"
|
|
1408
|
-
},
|
|
1537
|
+
}, ur = { class: "settings-section" }, dr = { class: "system-info" }, fr = { class: "info-item" }, pr = { class: "info-value" }, mr = { class: "info-item" }, hr = { class: "info-value" }, gr = { class: "info-item" }, _r = { class: "info-value" }, vr = { class: "info-item" }, yr = { class: "info-value" }, br = { class: "info-item" }, xr = { class: "info-value" }, Sr = { class: "info-item" }, Cr = { class: "info-value" }, wr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
1409
1538
|
__name: "index",
|
|
1410
|
-
props: {
|
|
1539
|
+
props: /* @__PURE__ */ m({
|
|
1540
|
+
width: { default: 380 },
|
|
1541
|
+
store: {},
|
|
1542
|
+
actions: {},
|
|
1543
|
+
maxImportBytes: { default: 1024 * 1024 }
|
|
1544
|
+
}, {
|
|
1411
1545
|
show: {
|
|
1412
1546
|
type: Boolean,
|
|
1413
1547
|
default: !1
|
|
1414
1548
|
},
|
|
1415
1549
|
showModifiers: {}
|
|
1416
|
-
},
|
|
1550
|
+
}),
|
|
1417
1551
|
emits: ["update:show"],
|
|
1418
1552
|
setup(t) {
|
|
1419
|
-
let n = oe(),
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1553
|
+
let n = t, c = oe(), d = ae(), f = p(ce, null), m = n.store ?? f ?? gn(), h = A(t, "show"), v = S("appearance"), x = typeof document < "u" && document.documentElement.classList.contains("gray-mode"), T = typeof document < "u" && document.documentElement.classList.contains("color-weak-mode"), E = S(x), O = S(T), z = S(!1), V = S("Robot Admin"), H = null, U = (e) => {
|
|
1554
|
+
if (typeof document > "u") return;
|
|
1555
|
+
H &&= (H.remove(), null);
|
|
1556
|
+
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
1557
|
+
if (!n) {
|
|
1558
|
+
c.error("当前浏览器无法创建水印画布");
|
|
1424
1559
|
return;
|
|
1425
1560
|
}
|
|
1426
|
-
t.width = 200, t.height = 150,
|
|
1561
|
+
t.width = 200, t.height = 150, n.font = "14px Microsoft JhengHei", n.fillStyle = "rgba(120, 120, 120, 0.15)", n.rotate(-20 * Math.PI / 180), n.fillText(e, 0, 80), H = document.createElement("div"), H.dataset.robotAdminLayoutWatermark = "true", H.style.cssText = `
|
|
1427
1562
|
position: fixed;
|
|
1428
1563
|
top: 0;
|
|
1429
1564
|
left: 0;
|
|
@@ -1434,20 +1569,20 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1434
1569
|
background-repeat: repeat;
|
|
1435
1570
|
z-index: 9999;
|
|
1436
1571
|
user-select: none;
|
|
1437
|
-
`, document.body.appendChild(
|
|
1438
|
-
},
|
|
1439
|
-
|
|
1572
|
+
`, document.body.appendChild(H);
|
|
1573
|
+
}, ee = () => {
|
|
1574
|
+
H &&= (H.remove(), null);
|
|
1440
1575
|
};
|
|
1441
|
-
|
|
1442
|
-
document.documentElement.classList.toggle("gray-mode", e);
|
|
1443
|
-
}),
|
|
1444
|
-
document.documentElement.classList.toggle("color-weak-mode", e);
|
|
1445
|
-
}),
|
|
1446
|
-
e ?
|
|
1447
|
-
}),
|
|
1448
|
-
|
|
1576
|
+
j(E, (e) => {
|
|
1577
|
+
typeof document < "u" && document.documentElement.classList.toggle("gray-mode", e);
|
|
1578
|
+
}), j(O, (e) => {
|
|
1579
|
+
typeof document < "u" && document.documentElement.classList.toggle("color-weak-mode", e);
|
|
1580
|
+
}), j(z, (e) => {
|
|
1581
|
+
e ? U(V.value) : ee();
|
|
1582
|
+
}), j(V, (e) => {
|
|
1583
|
+
z.value && U(e);
|
|
1449
1584
|
});
|
|
1450
|
-
let
|
|
1585
|
+
let K = r(() => {
|
|
1451
1586
|
if (typeof navigator > "u" || typeof window > "u") return {
|
|
1452
1587
|
browser: "Unknown",
|
|
1453
1588
|
os: "Unknown",
|
|
@@ -1457,7 +1592,7 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1457
1592
|
timezone: "Unknown"
|
|
1458
1593
|
};
|
|
1459
1594
|
let e = navigator.userAgent, t = "Unknown", n = "Unknown";
|
|
1460
|
-
return e.includes("
|
|
1595
|
+
return e.includes("Edg/") ? t = "Edge" : e.includes("Firefox") ? t = "Firefox" : e.includes("Chrome") ? t = "Chrome" : e.includes("Safari") && (t = "Safari"), e.includes("Windows") ? n = "Windows" : e.includes("Mac") ? n = "macOS" : e.includes("Android") ? n = "Android" : e.includes("iOS") ? n = "iOS" : e.includes("Linux") && (n = "Linux"), {
|
|
1461
1596
|
browser: t,
|
|
1462
1597
|
os: n,
|
|
1463
1598
|
resolution: `${window.screen.width} × ${window.screen.height}`,
|
|
@@ -1466,283 +1601,288 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1466
1601
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
1467
1602
|
};
|
|
1468
1603
|
});
|
|
1469
|
-
|
|
1470
|
-
|
|
1604
|
+
y(() => {
|
|
1605
|
+
ee(), typeof document < "u" && (document.documentElement.classList.toggle("gray-mode", x), document.documentElement.classList.toggle("color-weak-mode", T));
|
|
1471
1606
|
});
|
|
1472
|
-
let
|
|
1473
|
-
t || (
|
|
1474
|
-
},
|
|
1475
|
-
|
|
1476
|
-
},
|
|
1607
|
+
let q = (e, t) => {
|
|
1608
|
+
t || (m.layoutMode = e);
|
|
1609
|
+
}, se = (e) => m.primaryColor === e.primaryColor, J = (e) => {
|
|
1610
|
+
m.applyPreset(e), c.success(`已应用「${e.name}」主题方案`);
|
|
1611
|
+
}, le = async (e) => {
|
|
1612
|
+
try {
|
|
1613
|
+
await m.updateThemeMode(e);
|
|
1614
|
+
} catch {
|
|
1615
|
+
c.error("主题模式切换失败");
|
|
1616
|
+
}
|
|
1617
|
+
}, ue = async () => {
|
|
1477
1618
|
try {
|
|
1478
|
-
await
|
|
1619
|
+
await m.updateThemeMode($.themeMode), m.primaryColor = $.primaryColor, m.borderRadius = $.borderRadius, m.transitionType = $.transitionType, m.enableTransition = $.enableTransition, c.success("已恢复外观默认设置");
|
|
1479
1620
|
} catch {
|
|
1480
|
-
|
|
1621
|
+
c.error("恢复外观默认设置失败");
|
|
1481
1622
|
}
|
|
1482
|
-
},
|
|
1483
|
-
|
|
1484
|
-
},
|
|
1485
|
-
d.
|
|
1486
|
-
}, q = () => {
|
|
1487
|
-
c.warning({
|
|
1623
|
+
}, Y = () => {
|
|
1624
|
+
m.layoutMode = $.layoutMode, m.menuExpandMode = $.menuExpandMode, m.fixedHeader = $.fixedHeader, m.showBreadcrumb = $.showBreadcrumb, m.showBreadcrumbIcon = $.showBreadcrumbIcon, m.showTagsView = $.showTagsView, m.tagsViewHeight = $.tagsViewHeight, m.tagsViewStyle = $.tagsViewStyle, m.showFooter = $.showFooter, m.sidebarWidth = $.sidebarWidth, m.sidebarCollapsedWidth = $.sidebarCollapsedWidth, m.headerHeight = $.headerHeight, c.success("已恢复布局默认设置");
|
|
1625
|
+
}, de = () => {
|
|
1626
|
+
d.warning({
|
|
1488
1627
|
title: "确认重置",
|
|
1489
1628
|
content: "确定要恢复默认配置吗?此操作不可撤销。",
|
|
1490
1629
|
positiveText: "确认",
|
|
1491
1630
|
negativeText: "取消",
|
|
1492
|
-
onPositiveClick: () => {
|
|
1493
|
-
|
|
1631
|
+
onPositiveClick: async () => {
|
|
1632
|
+
let e = { ...m.settingsState };
|
|
1633
|
+
try {
|
|
1634
|
+
m.resetSettings(), await m.updateThemeMode(m.themeMode), c.success("已恢复默认配置");
|
|
1635
|
+
} catch {
|
|
1636
|
+
m.$patch(e), c.error("恢复默认配置失败");
|
|
1637
|
+
}
|
|
1494
1638
|
}
|
|
1495
1639
|
});
|
|
1496
|
-
},
|
|
1497
|
-
|
|
1640
|
+
}, X = () => {
|
|
1641
|
+
d.warning({
|
|
1498
1642
|
title: "确认清除",
|
|
1499
1643
|
content: "确定要清除浏览器缓存吗?",
|
|
1500
1644
|
positiveText: "确认",
|
|
1501
1645
|
negativeText: "取消",
|
|
1502
|
-
onPositiveClick: () => {
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
}
|
|
1646
|
+
onPositiveClick: async () => {
|
|
1647
|
+
if (!n.actions?.clearCache) {
|
|
1648
|
+
c.warning("宿主应用未配置可安全清理的缓存");
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
try {
|
|
1652
|
+
await n.actions.clearCache(), c.success("缓存已清除");
|
|
1653
|
+
} catch {
|
|
1654
|
+
c.error("缓存清除失败");
|
|
1655
|
+
}
|
|
1507
1656
|
}
|
|
1508
1657
|
});
|
|
1509
|
-
},
|
|
1510
|
-
location.reload();
|
|
1511
|
-
},
|
|
1658
|
+
}, fe = () => {
|
|
1659
|
+
n.actions?.reloadPage ? n.actions.reloadPage() : typeof window < "u" && window.location.reload();
|
|
1660
|
+
}, Z = () => {
|
|
1512
1661
|
let e = {
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1662
|
+
schemaVersion: 1,
|
|
1663
|
+
settings: m.settingsState,
|
|
1664
|
+
gray: E.value,
|
|
1665
|
+
colorWeak: O.value,
|
|
1516
1666
|
watermark: {
|
|
1517
|
-
enabled:
|
|
1518
|
-
text:
|
|
1667
|
+
enabled: z.value,
|
|
1668
|
+
text: V.value
|
|
1519
1669
|
},
|
|
1520
1670
|
exportTime: (/* @__PURE__ */ new Date()).toISOString()
|
|
1521
|
-
}, t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }),
|
|
1522
|
-
|
|
1523
|
-
},
|
|
1671
|
+
}, t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1672
|
+
r.href = n, r.download = `robot-admin-config-${Date.now()}.json`, r.click(), URL.revokeObjectURL(n), c.success("配置已导出");
|
|
1673
|
+
}, pe = () => {
|
|
1674
|
+
if (typeof document > "u") return;
|
|
1524
1675
|
let e = document.createElement("input");
|
|
1525
1676
|
e.type = "file", e.accept = "application/json", e.onchange = async (e) => {
|
|
1526
1677
|
let t = e.target.files?.[0];
|
|
1527
1678
|
if (t) try {
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
e.themeMode !== void 0 && (await d.updateThemeMode(e.themeMode), delete e.themeMode), d.$patch(e);
|
|
1534
|
-
}
|
|
1535
|
-
if (i.gray !== void 0) {
|
|
1536
|
-
if (typeof i.gray != "boolean") throw TypeError("gray");
|
|
1537
|
-
m.value = i.gray;
|
|
1679
|
+
if (t.size > n.maxImportBytes) throw RangeError("配置文件过大");
|
|
1680
|
+
let e = await t.text(), r = pn(JSON.parse(e));
|
|
1681
|
+
if (r.settings !== void 0) {
|
|
1682
|
+
let { themeMode: e, ...t } = r.settings;
|
|
1683
|
+
e !== void 0 && await m.updateThemeMode(e), m.$patch(t);
|
|
1538
1684
|
}
|
|
1539
|
-
|
|
1540
|
-
if (typeof i.colorWeak != "boolean") throw TypeError("colorWeak");
|
|
1541
|
-
_.value = i.colorWeak;
|
|
1542
|
-
}
|
|
1543
|
-
if (i.watermark !== void 0) {
|
|
1544
|
-
if (!i.watermark || typeof i.watermark != "object" || Array.isArray(i.watermark)) throw TypeError("watermark");
|
|
1545
|
-
let e = i.watermark;
|
|
1546
|
-
if (typeof e.enabled != "boolean" || typeof e.text != "string" || e.text.length > 200) throw TypeError("watermark");
|
|
1547
|
-
b.value = e.enabled, C.value = e.text;
|
|
1548
|
-
}
|
|
1549
|
-
n.success("配置已导入");
|
|
1685
|
+
r.gray !== void 0 && (E.value = r.gray), r.colorWeak !== void 0 && (O.value = r.colorWeak), r.watermark !== void 0 && (z.value = r.watermark.enabled, V.value = r.watermark.text), c.success("配置已导入");
|
|
1550
1686
|
} catch {
|
|
1551
|
-
|
|
1687
|
+
c.error("配置文件格式错误");
|
|
1552
1688
|
}
|
|
1553
1689
|
}, e.click();
|
|
1554
1690
|
};
|
|
1555
|
-
return (
|
|
1556
|
-
show:
|
|
1557
|
-
"onUpdate:show":
|
|
1558
|
-
width:
|
|
1691
|
+
return (n, r) => (b(), i(k(L), {
|
|
1692
|
+
show: h.value,
|
|
1693
|
+
"onUpdate:show": r[16] ||= (e) => h.value = e,
|
|
1694
|
+
width: t.width,
|
|
1559
1695
|
placement: "right",
|
|
1560
1696
|
"trap-focus": !0,
|
|
1561
1697
|
"block-scroll": !0
|
|
1562
1698
|
}, {
|
|
1563
|
-
default:
|
|
1699
|
+
default: M(() => [u(k(R), {
|
|
1564
1700
|
title: "⚙️ 布局配置",
|
|
1565
1701
|
closable: ""
|
|
1566
1702
|
}, {
|
|
1567
|
-
default:
|
|
1568
|
-
value:
|
|
1569
|
-
"onUpdate:value":
|
|
1703
|
+
default: M(() => [u(k(ie), {
|
|
1704
|
+
value: v.value,
|
|
1705
|
+
"onUpdate:value": r[15] ||= (e) => v.value = e,
|
|
1570
1706
|
animated: "",
|
|
1571
1707
|
class: "settings-tabs"
|
|
1572
1708
|
}, {
|
|
1573
|
-
default:
|
|
1574
|
-
u(
|
|
1709
|
+
default: M(() => [
|
|
1710
|
+
u(k(re), {
|
|
1575
1711
|
name: "appearance",
|
|
1576
1712
|
tab: "🎨 外观"
|
|
1577
1713
|
}, {
|
|
1578
|
-
default:
|
|
1579
|
-
|
|
1714
|
+
default: M(() => [
|
|
1715
|
+
w(n.$slots, "appearance-prepend", { settings: k(m) }, void 0, !0),
|
|
1716
|
+
s("div", vn, [s("div", yn, [(b(!0), o(e, null, C(k(nn), (e) => (b(), o("div", {
|
|
1580
1717
|
key: e.name,
|
|
1581
|
-
class:
|
|
1718
|
+
class: g(["preset-card", { active: se(e) }]),
|
|
1582
1719
|
role: "button",
|
|
1583
1720
|
tabindex: "0",
|
|
1584
|
-
"aria-pressed":
|
|
1585
|
-
onClick: (t) =>
|
|
1586
|
-
onKeydown: [
|
|
1721
|
+
"aria-pressed": se(e),
|
|
1722
|
+
onClick: (t) => J(e),
|
|
1723
|
+
onKeydown: [N((t) => J(e), ["enter"]), N(P((t) => J(e), ["prevent"]), ["space"])]
|
|
1587
1724
|
}, [
|
|
1588
|
-
s("div",
|
|
1589
|
-
s("div",
|
|
1590
|
-
s("div",
|
|
1725
|
+
s("div", xn, D(e.icon), 1),
|
|
1726
|
+
s("div", Sn, D(e.name), 1),
|
|
1727
|
+
s("div", Cn, [s("span", {
|
|
1591
1728
|
class: "color-dot",
|
|
1592
|
-
style:
|
|
1729
|
+
style: _({ backgroundColor: e.primaryColor })
|
|
1593
1730
|
}, null, 4)])
|
|
1594
|
-
], 42,
|
|
1595
|
-
s("div",
|
|
1596
|
-
value:
|
|
1731
|
+
], 42, bn))), 128))])]),
|
|
1732
|
+
s("div", wn, [r[20] ||= s("div", { class: "section-title" }, "主题模式", -1), u(k(te), {
|
|
1733
|
+
value: k(m).themeMode,
|
|
1597
1734
|
class: "mode-group",
|
|
1598
|
-
"onUpdate:value":
|
|
1735
|
+
"onUpdate:value": le
|
|
1599
1736
|
}, {
|
|
1600
|
-
default:
|
|
1601
|
-
u(
|
|
1602
|
-
default:
|
|
1737
|
+
default: M(() => [
|
|
1738
|
+
u(k(W), { value: "light" }, {
|
|
1739
|
+
default: M(() => [...r[17] ||= [s("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1), l(" 浅色 ", -1)]]),
|
|
1603
1740
|
_: 1
|
|
1604
1741
|
}),
|
|
1605
|
-
u(
|
|
1606
|
-
default:
|
|
1742
|
+
u(k(W), { value: "dark" }, {
|
|
1743
|
+
default: M(() => [...r[18] ||= [s("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1), l(" 深色 ", -1)]]),
|
|
1607
1744
|
_: 1
|
|
1608
1745
|
}),
|
|
1609
|
-
u(
|
|
1610
|
-
default:
|
|
1746
|
+
u(k(W), { value: "system" }, {
|
|
1747
|
+
default: M(() => [...r[19] ||= [s("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1), l(" 自动 ", -1)]]),
|
|
1611
1748
|
_: 1
|
|
1612
1749
|
})
|
|
1613
1750
|
]),
|
|
1614
1751
|
_: 1
|
|
1615
1752
|
}, 8, ["value"])]),
|
|
1616
|
-
s("div",
|
|
1617
|
-
value:
|
|
1618
|
-
"onUpdate:value":
|
|
1753
|
+
s("div", Tn, [r[21] ||= s("div", { class: "section-title" }, "主题色", -1), s("div", En, [u(k(I), {
|
|
1754
|
+
value: k(m).primaryColor,
|
|
1755
|
+
"onUpdate:value": r[0] ||= (e) => k(m).primaryColor = e,
|
|
1619
1756
|
"show-alpha": !1,
|
|
1620
|
-
swatches:
|
|
1757
|
+
swatches: k(sn),
|
|
1621
1758
|
actions: ["confirm"]
|
|
1622
|
-
}, null, 8, ["value", "swatches"]), s("span",
|
|
1623
|
-
s("div",
|
|
1624
|
-
value:
|
|
1625
|
-
"onUpdate:value":
|
|
1759
|
+
}, null, 8, ["value", "swatches"]), s("span", Dn, D(k(m).primaryColor), 1)])]),
|
|
1760
|
+
s("div", On, [r[25] ||= s("div", { class: "section-title" }, "圆角大小", -1), u(k(te), {
|
|
1761
|
+
value: k(m).borderRadius,
|
|
1762
|
+
"onUpdate:value": r[1] ||= (e) => k(m).borderRadius = e,
|
|
1626
1763
|
class: "radius-group"
|
|
1627
1764
|
}, {
|
|
1628
|
-
default:
|
|
1629
|
-
u(
|
|
1630
|
-
default:
|
|
1765
|
+
default: M(() => [
|
|
1766
|
+
u(k(W), { value: "small" }, {
|
|
1767
|
+
default: M(() => [...r[22] ||= [l("小 (4px)", -1)]]),
|
|
1631
1768
|
_: 1
|
|
1632
1769
|
}),
|
|
1633
|
-
u(
|
|
1634
|
-
default:
|
|
1770
|
+
u(k(W), { value: "medium" }, {
|
|
1771
|
+
default: M(() => [...r[23] ||= [l("中 (6px)", -1)]]),
|
|
1635
1772
|
_: 1
|
|
1636
1773
|
}),
|
|
1637
|
-
u(
|
|
1638
|
-
default:
|
|
1774
|
+
u(k(W), { value: "large" }, {
|
|
1775
|
+
default: M(() => [...r[24] ||= [l("大 (8px)", -1)]]),
|
|
1639
1776
|
_: 1
|
|
1640
1777
|
})
|
|
1641
1778
|
]),
|
|
1642
1779
|
_: 1
|
|
1643
1780
|
}, 8, ["value"])]),
|
|
1644
|
-
s("div",
|
|
1645
|
-
|
|
1646
|
-
s("div",
|
|
1647
|
-
value:
|
|
1648
|
-
"onUpdate:value":
|
|
1781
|
+
s("div", kn, [
|
|
1782
|
+
r[31] ||= s("div", { class: "section-title" }, "页面动画", -1),
|
|
1783
|
+
s("div", An, [r[26] ||= s("span", { class: "text-sm" }, "启用动画", -1), u(k(G), {
|
|
1784
|
+
value: k(m).enableTransition,
|
|
1785
|
+
"onUpdate:value": r[2] ||= (e) => k(m).enableTransition = e
|
|
1649
1786
|
}, null, 8, ["value"])]),
|
|
1650
|
-
u(
|
|
1651
|
-
value:
|
|
1652
|
-
"onUpdate:value":
|
|
1653
|
-
disabled: !
|
|
1787
|
+
u(k(te), {
|
|
1788
|
+
value: k(m).transitionType,
|
|
1789
|
+
"onUpdate:value": r[3] ||= (e) => k(m).transitionType = e,
|
|
1790
|
+
disabled: !k(m).enableTransition,
|
|
1654
1791
|
class: "transition-group"
|
|
1655
1792
|
}, {
|
|
1656
|
-
default:
|
|
1657
|
-
u(
|
|
1658
|
-
default:
|
|
1793
|
+
default: M(() => [
|
|
1794
|
+
u(k(W), { value: "fade" }, {
|
|
1795
|
+
default: M(() => [...r[27] ||= [l("淡入", -1)]]),
|
|
1659
1796
|
_: 1
|
|
1660
1797
|
}),
|
|
1661
|
-
u(
|
|
1662
|
-
default:
|
|
1798
|
+
u(k(W), { value: "slide" }, {
|
|
1799
|
+
default: M(() => [...r[28] ||= [l("滑动", -1)]]),
|
|
1663
1800
|
_: 1
|
|
1664
1801
|
}),
|
|
1665
|
-
u(
|
|
1666
|
-
default:
|
|
1802
|
+
u(k(W), { value: "zoom" }, {
|
|
1803
|
+
default: M(() => [...r[29] ||= [l("缩放", -1)]]),
|
|
1667
1804
|
_: 1
|
|
1668
1805
|
}),
|
|
1669
|
-
u(
|
|
1670
|
-
default:
|
|
1806
|
+
u(k(W), { value: "none" }, {
|
|
1807
|
+
default: M(() => [...r[30] ||= [l("无", -1)]]),
|
|
1671
1808
|
_: 1
|
|
1672
1809
|
})
|
|
1673
1810
|
]),
|
|
1674
1811
|
_: 1
|
|
1675
1812
|
}, 8, ["value", "disabled"])
|
|
1676
1813
|
]),
|
|
1677
|
-
s("div",
|
|
1814
|
+
s("div", jn, [u(k(F), {
|
|
1678
1815
|
block: "",
|
|
1679
1816
|
secondary: "",
|
|
1680
|
-
onClick:
|
|
1817
|
+
onClick: ue
|
|
1681
1818
|
}, {
|
|
1682
|
-
icon:
|
|
1683
|
-
default:
|
|
1819
|
+
icon: M(() => [...r[32] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
|
|
1820
|
+
default: M(() => [r[33] ||= l(" 恢复外观默认设置 ", -1)]),
|
|
1684
1821
|
_: 1
|
|
1685
|
-
})])
|
|
1822
|
+
})]),
|
|
1823
|
+
w(n.$slots, "appearance-append", { settings: k(m) }, void 0, !0)
|
|
1686
1824
|
]),
|
|
1687
|
-
_:
|
|
1825
|
+
_: 3
|
|
1688
1826
|
}),
|
|
1689
|
-
u(
|
|
1827
|
+
u(k(re), {
|
|
1690
1828
|
name: "layout",
|
|
1691
1829
|
tab: "📐 布局"
|
|
1692
1830
|
}, {
|
|
1693
|
-
default:
|
|
1694
|
-
|
|
1831
|
+
default: M(() => [
|
|
1832
|
+
w(n.$slots, "layout-prepend", { settings: k(m) }, void 0, !0),
|
|
1833
|
+
s("div", Mn, [r[34] ||= s("div", { class: "section-title" }, "布局模式", -1), s("div", Nn, [(b(!0), o(e, null, C(k(_n), (e) => (b(), o("div", {
|
|
1695
1834
|
key: e.value,
|
|
1696
|
-
class:
|
|
1697
|
-
active:
|
|
1835
|
+
class: g(["layout-item", {
|
|
1836
|
+
active: k(m).layoutMode === e.value,
|
|
1698
1837
|
disabled: e.disabled
|
|
1699
1838
|
}]),
|
|
1700
1839
|
role: "button",
|
|
1701
1840
|
tabindex: e.disabled ? -1 : 0,
|
|
1702
1841
|
"aria-disabled": e.disabled,
|
|
1703
|
-
"aria-pressed":
|
|
1704
|
-
onClick:
|
|
1705
|
-
onKeydown: [
|
|
1706
|
-
}, [s("div",
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1842
|
+
"aria-pressed": k(m).layoutMode === e.value,
|
|
1843
|
+
onClick: P((t) => q(e.value, e.disabled), ["stop"]),
|
|
1844
|
+
onKeydown: [N(P((t) => q(e.value, e.disabled), ["stop"]), ["enter"]), N(P((t) => q(e.value, e.disabled), ["stop", "prevent"]), ["space"])]
|
|
1845
|
+
}, [s("div", Fn, [(b(), o("svg", In, [s("g", { innerHTML: e.svg }, null, 8, Ln)]))]), s("div", Rn, [l(D(e.label) + " ", 1), e.disabled ? (b(), o("span", zn, "敬请期待")) : a("", !0)])], 42, Pn))), 128))])]),
|
|
1846
|
+
w(n.$slots, "layout-after-mode", { settings: k(m) }, void 0, !0),
|
|
1847
|
+
s("div", Bn, [r[37] ||= s("div", { class: "section-title" }, "菜单展开方式", -1), u(k(te), {
|
|
1848
|
+
value: k(m).menuExpandMode,
|
|
1849
|
+
"onUpdate:value": r[4] ||= (e) => k(m).menuExpandMode = e,
|
|
1710
1850
|
class: "menu-expand-group"
|
|
1711
1851
|
}, {
|
|
1712
|
-
default:
|
|
1713
|
-
default:
|
|
1852
|
+
default: M(() => [u(k(W), { value: "inline" }, {
|
|
1853
|
+
default: M(() => [...r[35] ||= [l("传统展开", -1)]]),
|
|
1714
1854
|
_: 1
|
|
1715
|
-
}), u(
|
|
1716
|
-
default:
|
|
1855
|
+
}), u(k(W), { value: "panel" }, {
|
|
1856
|
+
default: M(() => [...r[36] ||= [l("右侧面板", -1)]]),
|
|
1717
1857
|
_: 1
|
|
1718
1858
|
})]),
|
|
1719
1859
|
_: 1
|
|
1720
1860
|
}, 8, ["value"])]),
|
|
1721
|
-
s("div",
|
|
1722
|
-
|
|
1723
|
-
s("div",
|
|
1724
|
-
value:
|
|
1725
|
-
"onUpdate:value":
|
|
1861
|
+
s("div", Vn, [
|
|
1862
|
+
r[42] ||= s("div", { class: "section-title" }, "界面元素", -1),
|
|
1863
|
+
s("div", Hn, [r[38] ||= s("span", null, "显示面包屑", -1), u(k(G), {
|
|
1864
|
+
value: k(m).showBreadcrumb,
|
|
1865
|
+
"onUpdate:value": r[5] ||= (e) => k(m).showBreadcrumb = e
|
|
1726
1866
|
}, null, 8, ["value"])]),
|
|
1727
|
-
s("div",
|
|
1728
|
-
value:
|
|
1729
|
-
"onUpdate:value":
|
|
1730
|
-
disabled: !
|
|
1867
|
+
s("div", Un, [r[39] ||= s("span", null, "显示面包屑图标", -1), u(k(G), {
|
|
1868
|
+
value: k(m).showBreadcrumbIcon,
|
|
1869
|
+
"onUpdate:value": r[6] ||= (e) => k(m).showBreadcrumbIcon = e,
|
|
1870
|
+
disabled: !k(m).showBreadcrumb
|
|
1731
1871
|
}, null, 8, ["value", "disabled"])]),
|
|
1732
|
-
s("div",
|
|
1733
|
-
value:
|
|
1734
|
-
"onUpdate:value":
|
|
1872
|
+
s("div", Wn, [r[40] ||= s("span", null, "显示标签页", -1), u(k(G), {
|
|
1873
|
+
value: k(m).showTagsView,
|
|
1874
|
+
"onUpdate:value": r[7] ||= (e) => k(m).showTagsView = e
|
|
1735
1875
|
}, null, 8, ["value"])]),
|
|
1736
|
-
s("div",
|
|
1737
|
-
value:
|
|
1738
|
-
"onUpdate:value":
|
|
1876
|
+
s("div", Gn, [r[41] ||= s("span", null, "显示页脚", -1), u(k(G), {
|
|
1877
|
+
value: k(m).showFooter,
|
|
1878
|
+
"onUpdate:value": r[8] ||= (e) => k(m).showFooter = e
|
|
1739
1879
|
}, null, 8, ["value"])])
|
|
1740
1880
|
]),
|
|
1741
|
-
s("div",
|
|
1742
|
-
|
|
1743
|
-
s("div",
|
|
1744
|
-
value:
|
|
1745
|
-
"onUpdate:value":
|
|
1881
|
+
s("div", Kn, [
|
|
1882
|
+
r[45] ||= s("div", { class: "section-title" }, "尺寸调整", -1),
|
|
1883
|
+
s("div", qn, [s("div", Jn, [r[43] ||= s("span", null, "侧边栏宽度", -1), s("span", Yn, D(k(m).sidebarWidth) + "px", 1)]), u(k(ne), {
|
|
1884
|
+
value: k(m).sidebarWidth,
|
|
1885
|
+
"onUpdate:value": r[9] ||= (e) => k(m).sidebarWidth = e,
|
|
1746
1886
|
min: 180,
|
|
1747
1887
|
max: 280,
|
|
1748
1888
|
step: 10,
|
|
@@ -1752,9 +1892,9 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1752
1892
|
280: "280"
|
|
1753
1893
|
}
|
|
1754
1894
|
}, null, 8, ["value"])]),
|
|
1755
|
-
s("div",
|
|
1756
|
-
value:
|
|
1757
|
-
"onUpdate:value":
|
|
1895
|
+
s("div", Xn, [s("div", Zn, [r[44] ||= s("span", null, "头部高度", -1), s("span", Qn, D(k(m).headerHeight) + "px", 1)]), u(k(ne), {
|
|
1896
|
+
value: k(m).headerHeight,
|
|
1897
|
+
"onUpdate:value": r[10] ||= (e) => k(m).headerHeight = e,
|
|
1758
1898
|
min: 48,
|
|
1759
1899
|
max: 64,
|
|
1760
1900
|
step: 4,
|
|
@@ -1765,125 +1905,128 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1765
1905
|
}
|
|
1766
1906
|
}, null, 8, ["value"])])
|
|
1767
1907
|
]),
|
|
1768
|
-
s("div",
|
|
1908
|
+
s("div", $n, [u(k(F), {
|
|
1769
1909
|
block: "",
|
|
1770
1910
|
secondary: "",
|
|
1771
|
-
onClick:
|
|
1911
|
+
onClick: Y
|
|
1772
1912
|
}, {
|
|
1773
|
-
icon:
|
|
1774
|
-
default:
|
|
1913
|
+
icon: M(() => [...r[46] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
|
|
1914
|
+
default: M(() => [r[47] ||= l(" 恢复布局默认设置 ", -1)]),
|
|
1775
1915
|
_: 1
|
|
1776
|
-
})])
|
|
1916
|
+
})]),
|
|
1917
|
+
w(n.$slots, "layout-append", { settings: k(m) }, void 0, !0)
|
|
1777
1918
|
]),
|
|
1778
|
-
_:
|
|
1919
|
+
_: 3
|
|
1779
1920
|
}),
|
|
1780
|
-
u(
|
|
1921
|
+
u(k(re), {
|
|
1781
1922
|
name: "features",
|
|
1782
1923
|
tab: "🔧 功能"
|
|
1783
1924
|
}, {
|
|
1784
|
-
default:
|
|
1785
|
-
|
|
1925
|
+
default: M(() => [
|
|
1926
|
+
w(n.$slots, "features-prepend", { settings: k(m) }, void 0, !0),
|
|
1927
|
+
s("div", er, [r[52] ||= s("div", { class: "section-title" }, "缓存管理", -1), s("div", tr, [u(k(F), {
|
|
1786
1928
|
secondary: "",
|
|
1787
|
-
onClick:
|
|
1929
|
+
onClick: X
|
|
1788
1930
|
}, {
|
|
1789
|
-
icon:
|
|
1790
|
-
default:
|
|
1931
|
+
icon: M(() => [...r[48] ||= [s("span", { class: "i-mdi:delete-sweep" }, null, -1)]]),
|
|
1932
|
+
default: M(() => [r[49] ||= l(" 清除缓存 ", -1)]),
|
|
1791
1933
|
_: 1
|
|
1792
|
-
}), u(
|
|
1934
|
+
}), u(k(F), {
|
|
1793
1935
|
secondary: "",
|
|
1794
|
-
onClick:
|
|
1936
|
+
onClick: fe
|
|
1795
1937
|
}, {
|
|
1796
|
-
icon:
|
|
1797
|
-
default:
|
|
1938
|
+
icon: M(() => [...r[50] ||= [s("span", { class: "i-mdi:refresh" }, null, -1)]]),
|
|
1939
|
+
default: M(() => [r[51] ||= l(" 重新加载 ", -1)]),
|
|
1798
1940
|
_: 1
|
|
1799
1941
|
})])]),
|
|
1800
|
-
s("div",
|
|
1801
|
-
|
|
1802
|
-
s("div",
|
|
1942
|
+
s("div", nr, [
|
|
1943
|
+
r[59] ||= s("div", { class: "section-title" }, "配置管理", -1),
|
|
1944
|
+
s("div", rr, [u(k(F), {
|
|
1803
1945
|
secondary: "",
|
|
1804
|
-
onClick:
|
|
1946
|
+
onClick: Z
|
|
1805
1947
|
}, {
|
|
1806
|
-
icon:
|
|
1807
|
-
default:
|
|
1948
|
+
icon: M(() => [...r[53] ||= [s("span", { class: "i-mdi:download" }, null, -1)]]),
|
|
1949
|
+
default: M(() => [r[54] ||= l(" 导出配置 ", -1)]),
|
|
1808
1950
|
_: 1
|
|
1809
|
-
}), u(
|
|
1951
|
+
}), u(k(F), {
|
|
1810
1952
|
secondary: "",
|
|
1811
|
-
onClick:
|
|
1953
|
+
onClick: pe
|
|
1812
1954
|
}, {
|
|
1813
|
-
icon:
|
|
1814
|
-
default:
|
|
1955
|
+
icon: M(() => [...r[55] ||= [s("span", { class: "i-mdi:upload" }, null, -1)]]),
|
|
1956
|
+
default: M(() => [r[56] ||= l(" 导入配置 ", -1)]),
|
|
1815
1957
|
_: 1
|
|
1816
1958
|
})]),
|
|
1817
|
-
u(
|
|
1959
|
+
u(k(F), {
|
|
1818
1960
|
block: "",
|
|
1819
1961
|
type: "error",
|
|
1820
1962
|
secondary: "",
|
|
1821
1963
|
class: "mt-2",
|
|
1822
|
-
onClick:
|
|
1964
|
+
onClick: de
|
|
1823
1965
|
}, {
|
|
1824
|
-
icon:
|
|
1825
|
-
default:
|
|
1966
|
+
icon: M(() => [...r[57] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
|
|
1967
|
+
default: M(() => [r[58] ||= l(" 重置所有配置 ", -1)]),
|
|
1826
1968
|
_: 1
|
|
1827
1969
|
})
|
|
1828
1970
|
]),
|
|
1829
|
-
s("div",
|
|
1830
|
-
|
|
1831
|
-
s("div",
|
|
1832
|
-
value:
|
|
1833
|
-
"onUpdate:value":
|
|
1971
|
+
s("div", ir, [
|
|
1972
|
+
r[62] ||= s("div", { class: "section-title" }, "系统模式", -1),
|
|
1973
|
+
s("div", ar, [r[60] ||= s("div", { class: "setting-label" }, [s("span", null, "灰色模式"), s("span", { class: "setting-desc" }, "用于哀悼日场景")], -1), u(k(G), {
|
|
1974
|
+
value: E.value,
|
|
1975
|
+
"onUpdate:value": r[11] ||= (e) => E.value = e
|
|
1834
1976
|
}, null, 8, ["value"])]),
|
|
1835
|
-
s("div",
|
|
1836
|
-
value:
|
|
1837
|
-
"onUpdate:value":
|
|
1977
|
+
s("div", or, [r[61] ||= s("div", { class: "setting-label" }, [s("span", null, "色弱模式"), s("span", { class: "setting-desc" }, "提供无障碍访问支持")], -1), u(k(G), {
|
|
1978
|
+
value: O.value,
|
|
1979
|
+
"onUpdate:value": r[12] ||= (e) => O.value = e
|
|
1838
1980
|
}, null, 8, ["value"])])
|
|
1839
1981
|
]),
|
|
1840
|
-
s("div",
|
|
1841
|
-
|
|
1842
|
-
s("div",
|
|
1843
|
-
value:
|
|
1844
|
-
"onUpdate:value":
|
|
1982
|
+
s("div", sr, [
|
|
1983
|
+
r[64] ||= s("div", { class: "section-title" }, "水印设置", -1),
|
|
1984
|
+
s("div", cr, [r[63] ||= s("span", null, "启用水印", -1), u(k(G), {
|
|
1985
|
+
value: z.value,
|
|
1986
|
+
"onUpdate:value": r[13] ||= (e) => z.value = e
|
|
1845
1987
|
}, null, 8, ["value"])]),
|
|
1846
|
-
|
|
1847
|
-
value:
|
|
1848
|
-
"onUpdate:value":
|
|
1988
|
+
z.value ? (b(), o("div", lr, [u(k(B), {
|
|
1989
|
+
value: V.value,
|
|
1990
|
+
"onUpdate:value": r[14] ||= (e) => V.value = e,
|
|
1849
1991
|
placeholder: "请输入水印内容",
|
|
1850
1992
|
size: "small"
|
|
1851
1993
|
}, null, 8, ["value"])])) : a("", !0)
|
|
1852
1994
|
]),
|
|
1853
|
-
s("div",
|
|
1854
|
-
s("div",
|
|
1855
|
-
s("div",
|
|
1856
|
-
s("div",
|
|
1857
|
-
s("div",
|
|
1858
|
-
s("div",
|
|
1859
|
-
s("div",
|
|
1860
|
-
])])
|
|
1995
|
+
s("div", ur, [r[71] ||= s("div", { class: "section-title" }, "系统信息", -1), s("div", dr, [
|
|
1996
|
+
s("div", fr, [r[65] ||= s("span", { class: "info-label" }, "浏览器", -1), s("span", pr, D(K.value.browser), 1)]),
|
|
1997
|
+
s("div", mr, [r[66] ||= s("span", { class: "info-label" }, "操作系统", -1), s("span", hr, D(K.value.os), 1)]),
|
|
1998
|
+
s("div", gr, [r[67] ||= s("span", { class: "info-label" }, "屏幕分辨率", -1), s("span", _r, D(K.value.resolution), 1)]),
|
|
1999
|
+
s("div", vr, [r[68] ||= s("span", { class: "info-label" }, "设备像素比", -1), s("span", yr, D(K.value.pixelRatio), 1)]),
|
|
2000
|
+
s("div", br, [r[69] ||= s("span", { class: "info-label" }, "语言", -1), s("span", xr, D(K.value.language), 1)]),
|
|
2001
|
+
s("div", Sr, [r[70] ||= s("span", { class: "info-label" }, "时区", -1), s("span", Cr, D(K.value.timezone), 1)])
|
|
2002
|
+
])]),
|
|
2003
|
+
w(n.$slots, "features-append", { settings: k(m) }, void 0, !0)
|
|
1861
2004
|
]),
|
|
1862
|
-
_:
|
|
2005
|
+
_: 3
|
|
1863
2006
|
})
|
|
1864
2007
|
]),
|
|
1865
|
-
_:
|
|
2008
|
+
_: 3
|
|
1866
2009
|
}, 8, ["value"])]),
|
|
1867
|
-
_:
|
|
2010
|
+
_: 3
|
|
1868
2011
|
})]),
|
|
1869
|
-
_:
|
|
1870
|
-
}, 8, ["show"]));
|
|
2012
|
+
_: 3
|
|
2013
|
+
}, 8, ["show", "width"]));
|
|
1871
2014
|
}
|
|
1872
|
-
}), [["__scopeId", "data-v-
|
|
2015
|
+
}), [["__scopeId", "data-v-d9843552"]]), Tr = { class: "brand-logo__icon" }, Er = [
|
|
1873
2016
|
"src",
|
|
1874
2017
|
"width",
|
|
1875
2018
|
"height"
|
|
1876
|
-
],
|
|
2019
|
+
], Dr = [
|
|
1877
2020
|
"src",
|
|
1878
2021
|
"width",
|
|
1879
2022
|
"height"
|
|
1880
|
-
],
|
|
2023
|
+
], Or = { class: "brand-logo__name" }, kr = { class: "brand-logo__title" }, Ar = {
|
|
1881
2024
|
key: 0,
|
|
1882
2025
|
class: "brand-logo__subtitle"
|
|
1883
|
-
},
|
|
2026
|
+
}, jr = {
|
|
1884
2027
|
key: 0,
|
|
1885
2028
|
class: "brand-logo__divider"
|
|
1886
|
-
},
|
|
2029
|
+
}, Mr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
1887
2030
|
name: "BrandLogo",
|
|
1888
2031
|
__name: "index",
|
|
1889
2032
|
props: {
|
|
@@ -1907,10 +2050,10 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1907
2050
|
...X,
|
|
1908
2051
|
...n.brand
|
|
1909
2052
|
};
|
|
1910
|
-
return (n, i) => (
|
|
2053
|
+
return (n, i) => (b(), o("div", { class: g(["brand-logo", {
|
|
1911
2054
|
"brand-logo--collapsed": t.collapsed,
|
|
1912
2055
|
"brand-logo--horizontal": t.variant === "horizontal"
|
|
1913
|
-
}]) }, [s("div",
|
|
2056
|
+
}]) }, [s("div", Tr, [i[0] ||= s("div", { class: "brand-logo__glow" }, null, -1), r.logoType === "video" && r.logoSrc ? (b(), o("video", {
|
|
1914
2057
|
key: 0,
|
|
1915
2058
|
src: r.logoSrc,
|
|
1916
2059
|
width: t.size,
|
|
@@ -1920,19 +2063,19 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1920
2063
|
muted: "",
|
|
1921
2064
|
playsinline: "",
|
|
1922
2065
|
class: "brand-logo__media"
|
|
1923
|
-
}, null, 8,
|
|
2066
|
+
}, null, 8, Er)) : r.logoSrc ? (b(), o("img", {
|
|
1924
2067
|
key: 1,
|
|
1925
2068
|
src: r.logoSrc,
|
|
1926
2069
|
width: t.size,
|
|
1927
2070
|
height: t.size,
|
|
1928
2071
|
class: "brand-logo__media",
|
|
1929
2072
|
alt: "Logo"
|
|
1930
|
-
}, null, 8,
|
|
2073
|
+
}, null, 8, Dr)) : a("", !0)]), t.showName && !t.collapsed ? (b(), o(e, { key: 0 }, [s("div", Or, [s("span", kr, D(r.name), 1), r.subtitle ? (b(), o("span", Ar, D(r.subtitle), 1)) : a("", !0)]), t.showDivider ? (b(), o("div", jr)) : a("", !0)], 64)) : a("", !0)], 2));
|
|
1931
2074
|
}
|
|
1932
|
-
}), [["__scopeId", "data-v-fd1c2eec"]]),
|
|
2075
|
+
}), [["__scopeId", "data-v-fd1c2eec"]]), Nr = { class: "icon-menu" }, Pr = ["onClick"], Fr = { class: "icon-menu__icon" }, Ir = {
|
|
1933
2076
|
key: 1,
|
|
1934
2077
|
class: "icon-menu__fallback"
|
|
1935
|
-
},
|
|
2078
|
+
}, Lr = { class: "icon-menu__label" }, Rr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
1936
2079
|
name: "IconMenu",
|
|
1937
2080
|
__name: "index",
|
|
1938
2081
|
props: {
|
|
@@ -1942,20 +2085,20 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1942
2085
|
emits: ["click"],
|
|
1943
2086
|
setup(t, { emit: n }) {
|
|
1944
2087
|
let r = n, a = Y();
|
|
1945
|
-
return (n, c) => (
|
|
2088
|
+
return (n, c) => (b(), o("div", Nr, [(b(!0), o(e, null, C(t.menus, (e) => (b(), o("div", {
|
|
1946
2089
|
key: e.path,
|
|
1947
|
-
class:
|
|
2090
|
+
class: g(["icon-menu__item", { "icon-menu__item--active": t.active === e.path }]),
|
|
1948
2091
|
onClick: (t) => r("click", e)
|
|
1949
|
-
}, [s("div",
|
|
2092
|
+
}, [s("div", Fr, [k(a).iconComponent && e.meta?.icon ? (b(), i(E(k(a).iconComponent), {
|
|
1950
2093
|
key: 0,
|
|
1951
2094
|
name: e.meta.icon,
|
|
1952
2095
|
size: 20
|
|
1953
|
-
}, null, 8, ["name"])) : (
|
|
2096
|
+
}, null, 8, ["name"])) : (b(), o("span", Ir, D(e.meta?.title?.charAt(0) || "?"), 1))]), s("div", Lr, D(e.meta?.title), 1)], 10, Pr))), 128))]));
|
|
1954
2097
|
}
|
|
1955
|
-
}), [["__scopeId", "data-v-f985d475"]]),
|
|
2098
|
+
}), [["__scopeId", "data-v-f985d475"]]), zr = { class: "floating-menu__header" }, Br = { class: "floating-menu__brand" }, Vr = { class: "floating-menu__brand-title" }, Hr = { class: "floating-menu__brand-subtitle" }, Ur = { class: "floating-menu__list" }, Wr = {
|
|
1956
2099
|
key: 0,
|
|
1957
2100
|
class: "floating-menu__group"
|
|
1958
|
-
},
|
|
2101
|
+
}, Gr = { class: "floating-menu__group-title" }, Kr = ["onClick", "onKeydown"], qr = { class: "floating-menu__item-text" }, Jr = ["onClick", "onKeydown"], Yr = { class: "floating-menu__item-text" }, Xr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
1959
2102
|
name: "FloatingMenu",
|
|
1960
2103
|
__name: "index",
|
|
1961
2104
|
props: {
|
|
@@ -1969,46 +2112,46 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
1969
2112
|
...X,
|
|
1970
2113
|
...l.brand
|
|
1971
2114
|
};
|
|
1972
|
-
return (r, d) => (
|
|
1973
|
-
default:
|
|
2115
|
+
return (r, d) => (b(), i(n, { name: "slide-fade" }, {
|
|
2116
|
+
default: M(() => [t.show && t.menuItem ? (b(), o("div", {
|
|
1974
2117
|
key: 0,
|
|
1975
|
-
class:
|
|
2118
|
+
class: g(["floating-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]]),
|
|
1976
2119
|
role: "navigation",
|
|
1977
2120
|
"aria-label": "二级功能导航"
|
|
1978
|
-
}, [s("div",
|
|
2121
|
+
}, [s("div", zr, [s("div", Br, [s("span", Vr, D(u.name), 1), s("span", Hr, D(u.subtitle), 1)])]), s("div", Ur, [(b(!0), o(e, null, C(t.menuItem.children, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", Wr, [s("div", Gr, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
1979
2122
|
key: 0,
|
|
1980
2123
|
name: n.meta.icon,
|
|
1981
2124
|
size: 16
|
|
1982
|
-
}, null, 8, ["name"])) : a("", !0), s("span", null,
|
|
2125
|
+
}, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
|
|
1983
2126
|
key: e.path,
|
|
1984
|
-
class:
|
|
2127
|
+
class: g(["floating-menu__item floating-menu__item--sub", { active: t.isActive?.(e.path) }]),
|
|
1985
2128
|
role: "link",
|
|
1986
2129
|
tabindex: "0",
|
|
1987
2130
|
onClick: (t) => c("click", e),
|
|
1988
|
-
onKeydown: [
|
|
1989
|
-
}, [
|
|
2131
|
+
onKeydown: [N((t) => c("click", e), ["enter"]), N(P((t) => c("click", e), ["prevent"]), ["space"])]
|
|
2132
|
+
}, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
1990
2133
|
key: 0,
|
|
1991
2134
|
name: e.meta.icon,
|
|
1992
2135
|
size: 16
|
|
1993
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2136
|
+
}, null, 8, ["name"])) : a("", !0), s("span", qr, D(e.meta?.title), 1)], 42, Kr))), 128))])) : (b(), o("div", {
|
|
1994
2137
|
key: 1,
|
|
1995
|
-
class:
|
|
2138
|
+
class: g(["floating-menu__item", { active: t.isActive?.(n.path) }]),
|
|
1996
2139
|
role: "link",
|
|
1997
2140
|
tabindex: "0",
|
|
1998
2141
|
onClick: (e) => c("click", n),
|
|
1999
|
-
onKeydown: [
|
|
2000
|
-
}, [
|
|
2142
|
+
onKeydown: [N((e) => c("click", n), ["enter"]), N(P((e) => c("click", n), ["prevent"]), ["space"])]
|
|
2143
|
+
}, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
2001
2144
|
key: 0,
|
|
2002
2145
|
name: n.meta.icon,
|
|
2003
2146
|
size: 18
|
|
2004
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2147
|
+
}, null, 8, ["name"])) : a("", !0), s("span", Yr, D(n.meta?.title), 1)], 42, Jr))], 64))), 128))])], 2)) : a("", !0)]),
|
|
2005
2148
|
_: 1
|
|
2006
2149
|
}));
|
|
2007
2150
|
}
|
|
2008
|
-
}), [["__scopeId", "data-v-3dc6f434"]]),
|
|
2151
|
+
}), [["__scopeId", "data-v-3dc6f434"]]), Zr = { class: "side-menu__header" }, Qr = { class: "side-menu__header-icon" }, $r = { class: "side-menu__header-title" }, ei = { class: "side-menu__list" }, ti = {
|
|
2009
2152
|
key: 0,
|
|
2010
2153
|
class: "side-menu__group"
|
|
2011
|
-
},
|
|
2154
|
+
}, ni = { class: "side-menu__group-label" }, ri = ["onClick"], ii = { class: "side-menu__item-text" }, ai = ["onClick"], oi = { class: "side-menu__item-text" }, si = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
2012
2155
|
name: "SideMenu",
|
|
2013
2156
|
__name: "index",
|
|
2014
2157
|
props: {
|
|
@@ -2018,49 +2161,49 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
2018
2161
|
},
|
|
2019
2162
|
emits: ["click"],
|
|
2020
2163
|
setup(t, { emit: r }) {
|
|
2021
|
-
let c = r, l = Y(), d =
|
|
2022
|
-
return (r, f) => t.menus.length > 0 ? (
|
|
2023
|
-
class:
|
|
2164
|
+
let c = r, l = Y(), d = S(!1);
|
|
2165
|
+
return (r, f) => t.menus.length > 0 ? (b(), o(e, { key: 0 }, [s("div", {
|
|
2166
|
+
class: g(["side-menu-toggle", [k(l).isDark.value ? "dark-theme" : "light-theme", { active: !d.value }]]),
|
|
2024
2167
|
onClick: f[0] ||= (e) => d.value = !d.value
|
|
2025
|
-
}, [s("i", { class:
|
|
2026
|
-
default:
|
|
2168
|
+
}, [s("i", { class: g(["toggle-icon", d.value ? "i-ri:side-bar-line" : "i-ri:arrow-right-s-line"]) }, null, 2)], 2), u(n, { name: "glass-slide" }, {
|
|
2169
|
+
default: M(() => [d.value ? a("", !0) : (b(), o("div", {
|
|
2027
2170
|
key: 0,
|
|
2028
|
-
class:
|
|
2029
|
-
}, [s("div",
|
|
2171
|
+
class: g(["side-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]])
|
|
2172
|
+
}, [s("div", Zr, [s("div", Qr, [k(l).iconComponent && t.activeItem?.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
2030
2173
|
key: 0,
|
|
2031
2174
|
name: t.activeItem.meta.icon,
|
|
2032
2175
|
size: 17
|
|
2033
|
-
}, null, 8, ["name"])) : a("", !0)]), s("span",
|
|
2176
|
+
}, null, 8, ["name"])) : a("", !0)]), s("span", $r, D(t.activeItem?.meta?.title || "菜单"), 1)]), s("div", ei, [(b(!0), o(e, null, C(t.menus, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", ti, [s("div", ni, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
2034
2177
|
key: 0,
|
|
2035
2178
|
name: n.meta.icon,
|
|
2036
2179
|
size: 14
|
|
2037
|
-
}, null, 8, ["name"])) : a("", !0), s("span", null,
|
|
2180
|
+
}, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
|
|
2038
2181
|
key: e.path,
|
|
2039
|
-
class:
|
|
2182
|
+
class: g(["side-menu__item", { active: t.isActive?.(e.path) }]),
|
|
2040
2183
|
onClick: (t) => c("click", e)
|
|
2041
|
-
}, [
|
|
2184
|
+
}, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
2042
2185
|
key: 0,
|
|
2043
2186
|
name: e.meta.icon,
|
|
2044
2187
|
size: 15
|
|
2045
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2188
|
+
}, null, 8, ["name"])) : a("", !0), s("span", ii, D(e.meta?.title), 1)], 10, ri))), 128))])) : (b(), o("div", {
|
|
2046
2189
|
key: 1,
|
|
2047
|
-
class:
|
|
2190
|
+
class: g(["side-menu__item", { active: t.isActive?.(n.path) }]),
|
|
2048
2191
|
onClick: (e) => c("click", n)
|
|
2049
|
-
}, [
|
|
2192
|
+
}, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
|
|
2050
2193
|
key: 0,
|
|
2051
2194
|
name: n.meta.icon,
|
|
2052
2195
|
size: 16
|
|
2053
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2196
|
+
}, null, 8, ["name"])) : a("", !0), s("span", oi, D(n.meta?.title), 1)], 10, ai))], 64))), 128))])], 2))]),
|
|
2054
2197
|
_: 1
|
|
2055
2198
|
})], 64)) : a("", !0);
|
|
2056
2199
|
}
|
|
2057
|
-
}), [["__scopeId", "data-v-1909f229"]]),
|
|
2200
|
+
}), [["__scopeId", "data-v-1909f229"]]), ci = ["aria-hidden"], li = { class: "drawer-menu__content" }, ui = { class: "drawer-menu__grid" }, di = ["onClick", "onKeydown"], fi = {
|
|
2058
2201
|
key: 0,
|
|
2059
2202
|
class: "drawer-menu__items"
|
|
2060
|
-
},
|
|
2203
|
+
}, pi = ["onClick", "onKeydown"], mi = { class: "drawer-menu__item-text" }, hi = {
|
|
2061
2204
|
key: 0,
|
|
2062
2205
|
class: "drawer-menu__sub-items"
|
|
2063
|
-
},
|
|
2206
|
+
}, gi = { class: "drawer-menu__sub-title" }, _i = ["onClick", "onKeydown"], vi = { class: "drawer-menu__item-text" }, yi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
2064
2207
|
name: "DrawerMenu",
|
|
2065
2208
|
__name: "index",
|
|
2066
2209
|
props: {
|
|
@@ -2068,26 +2211,26 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
2068
2211
|
show: { type: Boolean }
|
|
2069
2212
|
},
|
|
2070
2213
|
setup(t) {
|
|
2071
|
-
let n = Y(), r = q(), c = p(
|
|
2214
|
+
let n = Y(), r = q(), c = p(ue, {
|
|
2072
2215
|
show: () => {},
|
|
2073
2216
|
startHide: () => {},
|
|
2074
2217
|
hide: () => {}
|
|
2075
2218
|
}), l = (e) => {
|
|
2076
2219
|
e.path && (r.push(e.path), c.hide());
|
|
2077
2220
|
};
|
|
2078
|
-
return (r, u) => (
|
|
2079
|
-
class:
|
|
2221
|
+
return (r, u) => (b(), o("div", {
|
|
2222
|
+
class: g(["drawer-menu", [k(n).isDark.value ? "dark-theme" : "light-theme", { visible: t.show }]]),
|
|
2080
2223
|
role: "navigation",
|
|
2081
2224
|
"aria-label": "功能导航",
|
|
2082
2225
|
"aria-hidden": !t.show,
|
|
2083
|
-
onMouseenter: u[0] ||= (e) =>
|
|
2084
|
-
onMouseleave: u[1] ||= (e) =>
|
|
2226
|
+
onMouseenter: u[0] ||= (e) => k(c).show(),
|
|
2227
|
+
onMouseleave: u[1] ||= (e) => k(c).startHide()
|
|
2085
2228
|
}, [u[2] ||= s("div", { class: "drawer-menu__header" }, [s("div", { class: "drawer-menu__title" }, [s("span", { class: "grid-icon" }, [
|
|
2086
2229
|
s("span"),
|
|
2087
2230
|
s("span"),
|
|
2088
2231
|
s("span"),
|
|
2089
2232
|
s("span")
|
|
2090
|
-
]), s("span", null, "功能导航")])], -1), s("div",
|
|
2233
|
+
]), s("span", null, "功能导航")])], -1), s("div", li, [s("div", ui, [(b(!0), o(e, null, C(t.menus, (t) => (b(), o("div", {
|
|
2091
2234
|
key: t.path,
|
|
2092
2235
|
class: "drawer-menu__category"
|
|
2093
2236
|
}, [s("div", {
|
|
@@ -2095,49 +2238,49 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
2095
2238
|
role: "link",
|
|
2096
2239
|
tabindex: "0",
|
|
2097
2240
|
onClick: (e) => l(t),
|
|
2098
|
-
onKeydown: [
|
|
2099
|
-
}, [
|
|
2241
|
+
onKeydown: [N((e) => l(t), ["enter"]), N(P((e) => l(t), ["prevent"]), ["space"])]
|
|
2242
|
+
}, [k(n).iconComponent && t.meta?.icon ? (b(), i(E(k(n).iconComponent), {
|
|
2100
2243
|
key: 0,
|
|
2101
2244
|
name: t.meta.icon,
|
|
2102
2245
|
size: 18
|
|
2103
|
-
}, null, 8, ["name"])) : a("", !0), s("span", null,
|
|
2246
|
+
}, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, di), t.children && t.children.length > 0 ? (b(), o("div", fi, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
|
|
2104
2247
|
key: e.path,
|
|
2105
2248
|
class: "drawer-menu__item",
|
|
2106
2249
|
role: "link",
|
|
2107
2250
|
tabindex: "0",
|
|
2108
2251
|
onClick: (t) => l(e),
|
|
2109
|
-
onKeydown: [
|
|
2110
|
-
}, [
|
|
2252
|
+
onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
|
|
2253
|
+
}, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
|
|
2111
2254
|
key: 0,
|
|
2112
2255
|
name: e.meta.icon,
|
|
2113
2256
|
size: 16
|
|
2114
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2257
|
+
}, null, 8, ["name"])) : a("", !0), s("span", mi, D(e.meta?.title), 1)], 40, pi))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", hi, [s("div", gi, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
|
|
2115
2258
|
key: e.path,
|
|
2116
2259
|
class: "drawer-menu__item drawer-menu__item--sub",
|
|
2117
2260
|
role: "link",
|
|
2118
2261
|
tabindex: "0",
|
|
2119
2262
|
onClick: (t) => l(e),
|
|
2120
|
-
onKeydown: [
|
|
2121
|
-
}, [
|
|
2263
|
+
onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
|
|
2264
|
+
}, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
|
|
2122
2265
|
key: 0,
|
|
2123
2266
|
name: e.meta.icon,
|
|
2124
2267
|
size: 14
|
|
2125
|
-
}, null, 8, ["name"])) : a("", !0), s("span",
|
|
2268
|
+
}, null, 8, ["name"])) : a("", !0), s("span", vi, D(e.meta?.title), 1)], 40, _i))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], 42, ci));
|
|
2126
2269
|
}
|
|
2127
|
-
}), [["__scopeId", "data-v-91d54a20"]]),
|
|
2270
|
+
}), [["__scopeId", "data-v-91d54a20"]]), bi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
|
|
2128
2271
|
name: "MenuTrigger",
|
|
2129
2272
|
__name: "index",
|
|
2130
2273
|
props: { show: { type: Boolean } },
|
|
2131
2274
|
setup(e) {
|
|
2132
|
-
let t = p(
|
|
2275
|
+
let t = p(ue, {
|
|
2133
2276
|
show: () => {},
|
|
2134
2277
|
startHide: () => {},
|
|
2135
2278
|
hide: () => {}
|
|
2136
2279
|
});
|
|
2137
|
-
return (e, n) => (
|
|
2280
|
+
return (e, n) => (b(), o("div", {
|
|
2138
2281
|
class: "menu-trigger",
|
|
2139
|
-
onMouseenter: n[0] ||= (e) =>
|
|
2140
|
-
onMouseleave: n[1] ||= (e) =>
|
|
2282
|
+
onMouseenter: n[0] ||= (e) => k(t).show(),
|
|
2283
|
+
onMouseleave: n[1] ||= (e) => k(t).startHide()
|
|
2141
2284
|
}, [...n[2] ||= [s("div", { class: "menu-trigger__indicator" }, [s("span", { class: "hamburger-icon" }, [
|
|
2142
2285
|
s("span"),
|
|
2143
2286
|
s("span"),
|
|
@@ -2147,11 +2290,49 @@ var ze = { class: "mix-layout-container" }, Be = { class: "logo-container" }, Ve
|
|
|
2147
2290
|
}), [["__scopeId", "data-v-2c20af78"]]);
|
|
2148
2291
|
//#endregion
|
|
2149
2292
|
//#region src/setup.ts
|
|
2150
|
-
function
|
|
2151
|
-
let n =
|
|
2152
|
-
return
|
|
2293
|
+
function xi(e, t = {}) {
|
|
2294
|
+
let n = hn(t), r = n();
|
|
2295
|
+
return e.provide(ce, r), n;
|
|
2153
2296
|
}
|
|
2154
2297
|
//#endregion
|
|
2155
|
-
|
|
2298
|
+
//#region src/composables/createLayoutContext.ts
|
|
2299
|
+
function Si(e) {
|
|
2300
|
+
let { settings: t } = e;
|
|
2301
|
+
return {
|
|
2302
|
+
menus: r(() => O(e.menus)),
|
|
2303
|
+
isDark: r(() => O(e.isDark)),
|
|
2304
|
+
layoutMode: r(() => t.layoutMode),
|
|
2305
|
+
collapsed: r({
|
|
2306
|
+
get: () => t.collapsed,
|
|
2307
|
+
set: (e) => {
|
|
2308
|
+
t.collapsed = e;
|
|
2309
|
+
}
|
|
2310
|
+
}),
|
|
2311
|
+
menuExpandMode: r(() => t.menuExpandMode),
|
|
2312
|
+
sidebarWidth: r(() => t.sidebarWidth),
|
|
2313
|
+
sidebarCollapsedWidth: r(() => t.sidebarCollapsedWidth),
|
|
2314
|
+
showFooter: r(() => t.showFooter),
|
|
2315
|
+
showTagsView: r(() => t.showTagsView),
|
|
2316
|
+
tagsViewHeight: r(() => t.tagsViewHeight),
|
|
2317
|
+
headerHeight: r(() => t.headerHeight),
|
|
2318
|
+
transitionName: r(() => t.transitionName),
|
|
2319
|
+
showBreadcrumb: r(() => t.showBreadcrumb),
|
|
2320
|
+
showBreadcrumbIcon: r(() => t.showBreadcrumbIcon),
|
|
2321
|
+
fixedHeader: r(() => t.fixedHeader),
|
|
2322
|
+
brand: {
|
|
2323
|
+
...X,
|
|
2324
|
+
...e.brand
|
|
2325
|
+
},
|
|
2326
|
+
iconComponent: e.iconComponent
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2329
|
+
function Ci(e) {
|
|
2330
|
+
return de(Si(e));
|
|
2331
|
+
}
|
|
2332
|
+
//#endregion
|
|
2333
|
+
//#region src/index.ts
|
|
2334
|
+
var wi = pe, Ti = Oe, Ei = Ke, Di = lt, Oi = jt, ki = Qt;
|
|
2335
|
+
//#endregion
|
|
2336
|
+
export { an as BORDER_RADIUS_MAP, Mr as BrandLogo, sn as COLOR_SWATCHES, ki as C_CardLayout, en as C_LayoutContainer, Ei as C_MixLayout, Di as C_MixTopLayout, Oi as C_ReverseHorizontalMixLayout, wi as C_SideLayout, Ti as C_TopLayout, Qt as CardLayout, X as DEFAULT_BRAND_CONFIG, $ as DEFAULT_SETTINGS, ue as DRAWER_HANDLER_KEY, yi as DrawerMenu, Xr as FloatingMenu, Rr as IconMenu, J as LAYOUT_CONTEXT_KEY, rn as LAYOUT_MODES, ce as LAYOUT_SETTINGS_KEY, le as MENU_COLLAPSE_KEY, bi as MenuTrigger, Ke as MixLayout, lt as MixTopLayout, tn as PRESET_COLORS, _e as ResponsiveMenu, jt as ReverseHorizontalMixLayout, dn as SETTINGS_CONFIG_SCHEMA_VERSION, wr as SettingsDrawer, pe as SideLayout, si as SideMenu, nn as THEME_PRESETS, on as TRANSITION_MAP, Oe as TopLayout, mn as adjustColor, Si as createLayoutContext, hn as createSettingsStore, Ci as provideLayout, de as provideLayoutContext, pn as sanitizeLayoutSettingsConfig, fn as sanitizeSettingsPatch, xi as setupLayout, fe as shouldCacheRoute, Z as useLayoutCache, Y as useLayoutContext, Ae as useMenuSplit, gn as useSettingsStore };
|
|
2156
2337
|
|
|
2157
2338
|
//# sourceMappingURL=index.js.map
|