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