@robot-admin/layout 2.0.2 → 2.2.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,7 +1,8 @@
1
- import { ref as d, computed as F, watch as $, defineComponent as oe, useModel as le, onUnmounted as ie, openBlock as R, createBlock as ae, unref as l, withCtx as n, createVNode as a, createElementVNode as t, createElementBlock as W, Fragment as K, renderList as G, normalizeClass as Y, toDisplayString as h, normalizeStyle as ne, createTextVNode as c, withModifiers as re, createCommentVNode as Z } from "vue";
2
- import { useMessage as de, useDialog as ue, NDrawer as ce, NDrawerContent as ve, NTabs as pe, NTabPane as j, NRadioGroup as J, NRadioButton as M, NColorPicker as me, NSwitch as H, NButton as I, NSlider as q, NInput as ge } from "naive-ui";
3
- import { defineStore as fe } from "pinia";
4
- const ye = [
1
+ import { ref as V, computed as z, watch as q, inject as we, defineComponent as O, resolveComponent as de, openBlock as n, createBlock as S, unref as o, withCtx as l, createVNode as v, normalizeClass as A, renderSlot as _, Transition as Q, KeepAlive as ue, resolveDynamicComponent as N, onMounted as Me, nextTick as fe, onUnmounted as be, createElementBlock as r, createElementVNode as e, createCommentVNode as x, h as re, toDisplayString as $, normalizeStyle as he, toValue as xe, Fragment as E, renderList as W, provide as He, createSlots as le, useModel as Re, createTextVNode as U, withModifiers as Ae } from "vue";
2
+ import { defineStore as Le } from "pinia";
3
+ import { NLayout as ne, NLayoutSider as De, NLayoutContent as ce, NMenu as Ne, NDropdown as Ee, NButton as oe, useMessage as Be, useDialog as Fe, NDrawer as We, NDrawerContent as Oe, NTabs as Ue, NTabPane as _e, NRadioGroup as ye, NRadioButton as Z, NColorPicker as Pe, NSwitch as te, NSlider as Se, NInput as je } from "naive-ui";
4
+ import { useRoute as ke, useRouter as ge } from "vue-router";
5
+ const Ke = [
5
6
  { name: "拂晓蓝", value: "#409eff" },
6
7
  { name: "薄暮红", value: "#f5222d" },
7
8
  { name: "火山橙", value: "#fa541c" },
@@ -10,7 +11,7 @@ const ye = [
10
11
  { name: "明青", value: "#13c2c2" },
11
12
  { name: "极客蓝", value: "#2f54eb" },
12
13
  { name: "酱紫", value: "#722ed1" }
13
- ], he = [
14
+ ], Ye = [
14
15
  {
15
16
  name: "科技蓝",
16
17
  icon: "💙",
@@ -41,7 +42,7 @@ const ye = [
41
42
  icon: "❤️",
42
43
  primaryColor: "#f5222d"
43
44
  }
44
- ], Wt = [
45
+ ], Pn = [
45
46
  {
46
47
  mode: "side",
47
48
  label: "左侧菜单",
@@ -78,16 +79,16 @@ const ye = [
78
79
  description: "卡片式布局风格",
79
80
  icon: "i-mdi:card-outline"
80
81
  }
81
- ], be = {
82
+ ], Ge = {
82
83
  small: "4px",
83
84
  medium: "6px",
84
85
  large: "8px"
85
- }, we = {
86
+ }, Xe = {
86
87
  fade: "fade-transform",
87
88
  slide: "fade-slide",
88
89
  zoom: "fade-zoom",
89
90
  none: ""
90
- }, v = {
91
+ }, P = {
91
92
  // 外观
92
93
  themeMode: "light",
93
94
  primaryColor: "#409eff",
@@ -110,114 +111,1488 @@ const ye = [
110
111
  // 高级
111
112
  enableHotkeys: !0,
112
113
  version: "2.0.2"
113
- }, xe = ye.map((b) => b.value);
114
- function Q(b, u) {
115
- const p = parseInt(b.replace("#", ""), 16), s = Math.min(255, Math.max(0, (p >> 16) + u)), w = Math.min(255, Math.max(0, (p >> 8 & 255) + u)), g = Math.min(255, Math.max(0, (p & 255) + u));
116
- return `#${(s << 16 | w << 8 | g).toString(16).padStart(6, "0")}`;
114
+ }, Je = Ke.map((f) => f.value);
115
+ function Te(f, i) {
116
+ const y = parseInt(f.replace("#", ""), 16), s = Math.min(255, Math.max(0, (y >> 16) + i)), p = Math.min(255, Math.max(0, (y >> 8 & 255) + i)), m = Math.min(255, Math.max(0, (y & 255) + i));
117
+ return `#${(s << 16 | p << 8 | m).toString(16).padStart(6, "0")}`;
117
118
  }
118
- function X(b = {}) {
119
- const { defaults: u = {}, onThemeModeChange: p } = b, s = {
120
- ...v,
121
- ...u
119
+ function Ie(f = {}) {
120
+ const { defaults: i = {}, onThemeModeChange: y } = f, s = {
121
+ ...P,
122
+ ...i
122
123
  };
123
- return fe("settings", () => {
124
- const w = d(s.themeMode), g = d(s.primaryColor), x = d(s.borderRadius), f = d(s.transitionType), y = d(s.enableTransition), k = d(s.layoutMode), m = d(s.collapsed), O = d(s.fixedHeader), V = d(s.showBreadcrumb), S = d(s.showBreadcrumbIcon), P = d(s.showTagsView), B = d(s.tagsViewHeight), N = d(s.tagsViewStyle), L = d(s.showFooter), U = d(s.sidebarWidth), _ = d(
124
+ return Le("settings", () => {
125
+ const p = V(s.themeMode), m = V(s.primaryColor), a = V(s.borderRadius), u = V(s.transitionType), c = V(s.enableTransition), C = V(s.layoutMode), g = V(s.collapsed), h = V(s.fixedHeader), w = V(s.showBreadcrumb), M = V(s.showBreadcrumbIcon), T = V(s.showTagsView), R = V(s.tagsViewHeight), H = V(s.tagsViewStyle), b = V(s.showFooter), k = V(s.sidebarWidth), L = V(
125
126
  s.sidebarCollapsedWidth
126
- ), E = d(s.headerHeight), D = d(s.enableHotkeys), z = d(s.version), A = F(
127
- () => be[x.value]
128
- ), i = F(() => we[f.value]), e = F(
129
- () => y.value && f.value !== "none"
130
- ), o = F(() => ({
131
- themeMode: w.value,
132
- primaryColor: g.value,
133
- borderRadius: x.value,
134
- transitionType: f.value,
135
- enableTransition: y.value,
136
- layoutMode: k.value,
137
- collapsed: m.value,
138
- fixedHeader: O.value,
139
- showBreadcrumb: V.value,
140
- showBreadcrumbIcon: S.value,
141
- showTagsView: P.value,
142
- tagsViewHeight: B.value,
143
- tagsViewStyle: N.value,
144
- showFooter: L.value,
145
- sidebarWidth: U.value,
146
- sidebarCollapsedWidth: _.value,
147
- headerHeight: E.value,
148
- enableHotkeys: D.value,
149
- version: z.value
150
- })), C = () => {
127
+ ), j = V(s.headerHeight), F = V(s.enableHotkeys), B = V(s.version), G = z(
128
+ () => Ge[a.value]
129
+ ), I = z(() => Xe[u.value]), t = z(
130
+ () => c.value && u.value !== "none"
131
+ ), d = z(() => ({
132
+ themeMode: p.value,
133
+ primaryColor: m.value,
134
+ borderRadius: a.value,
135
+ transitionType: u.value,
136
+ enableTransition: c.value,
137
+ layoutMode: C.value,
138
+ collapsed: g.value,
139
+ fixedHeader: h.value,
140
+ showBreadcrumb: w.value,
141
+ showBreadcrumbIcon: M.value,
142
+ showTagsView: T.value,
143
+ tagsViewHeight: R.value,
144
+ tagsViewStyle: H.value,
145
+ showFooter: b.value,
146
+ sidebarWidth: k.value,
147
+ sidebarCollapsedWidth: L.value,
148
+ headerHeight: j.value,
149
+ enableHotkeys: F.value,
150
+ version: B.value
151
+ })), K = () => {
151
152
  if (typeof document > "u") return;
152
- const r = document.documentElement;
153
- r.style.setProperty("--primary-color", g.value), r.style.setProperty(
153
+ const D = document.documentElement;
154
+ D.style.setProperty("--primary-color", m.value), D.style.setProperty(
154
155
  "--primary-color-hover",
155
- Q(g.value, 10)
156
- ), r.style.setProperty(
156
+ Te(m.value, 10)
157
+ ), D.style.setProperty(
157
158
  "--primary-color-pressed",
158
- Q(g.value, -10)
159
- ), r.style.setProperty("--border-radius", A.value), r.style.setProperty("--sidebar-width", `${U.value}px`), r.style.setProperty(
159
+ Te(m.value, -10)
160
+ ), D.style.setProperty("--border-radius", G.value), D.style.setProperty("--sidebar-width", `${k.value}px`), D.style.setProperty(
160
161
  "--sidebar-collapsed-width",
161
- `${_.value}px`
162
- ), r.style.setProperty("--header-height", `${E.value}px`), r.style.setProperty("--tags-view-height", `${B.value}px`);
163
- }, T = async (r) => {
164
- g.value = r.primaryColor, r.settings && (r.settings.borderRadius && (x.value = r.settings.borderRadius), r.settings.transitionType && (f.value = r.settings.transitionType), r.settings.showBreadcrumb !== void 0 && (V.value = r.settings.showBreadcrumb), r.settings.showTagsView !== void 0 && (P.value = r.settings.showTagsView), r.settings.tagsViewStyle && (N.value = r.settings.tagsViewStyle));
165
- }, ee = () => {
166
- w.value = s.themeMode, g.value = s.primaryColor, x.value = s.borderRadius, f.value = s.transitionType, y.value = s.enableTransition, k.value = s.layoutMode, m.value = s.collapsed, O.value = s.fixedHeader, V.value = s.showBreadcrumb, S.value = s.showBreadcrumbIcon, P.value = s.showTagsView, B.value = s.tagsViewHeight, N.value = s.tagsViewStyle, L.value = s.showFooter, U.value = s.sidebarWidth, _.value = s.sidebarCollapsedWidth, E.value = s.headerHeight, D.value = s.enableHotkeys;
167
- }, te = async (r) => {
168
- w.value = r, p && await p(r);
162
+ `${L.value}px`
163
+ ), D.style.setProperty("--header-height", `${j.value}px`), D.style.setProperty("--tags-view-height", `${R.value}px`);
164
+ }, Y = async (D) => {
165
+ m.value = D.primaryColor, D.settings && (D.settings.borderRadius && (a.value = D.settings.borderRadius), D.settings.transitionType && (u.value = D.settings.transitionType), D.settings.showBreadcrumb !== void 0 && (w.value = D.settings.showBreadcrumb), D.settings.showTagsView !== void 0 && (T.value = D.settings.showTagsView), D.settings.tagsViewStyle && (H.value = D.settings.tagsViewStyle));
166
+ }, ve = () => {
167
+ p.value = s.themeMode, m.value = s.primaryColor, a.value = s.borderRadius, u.value = s.transitionType, c.value = s.enableTransition, C.value = s.layoutMode, g.value = s.collapsed, h.value = s.fixedHeader, w.value = s.showBreadcrumb, M.value = s.showBreadcrumbIcon, T.value = s.showTagsView, R.value = s.tagsViewHeight, H.value = s.tagsViewStyle, b.value = s.showFooter, k.value = s.sidebarWidth, L.value = s.sidebarCollapsedWidth, j.value = s.headerHeight, F.value = s.enableHotkeys;
168
+ }, ie = async (D) => {
169
+ p.value = D, y && await y(D);
169
170
  }, se = () => {
170
- m.value = !m.value;
171
+ g.value = !g.value;
171
172
  };
172
- return $(
173
+ return q(
173
174
  [
174
- g,
175
- A,
176
- U,
177
- _,
178
- E,
179
- B
175
+ m,
176
+ G,
177
+ k,
178
+ L,
179
+ j,
180
+ R
180
181
  ],
181
182
  () => {
182
- C();
183
+ K();
183
184
  },
184
185
  { immediate: !0 }
185
186
  ), {
186
187
  // 状态
187
- themeMode: w,
188
- primaryColor: g,
189
- borderRadius: x,
190
- transitionType: f,
191
- enableTransition: y,
192
- layoutMode: k,
193
- collapsed: m,
194
- fixedHeader: O,
195
- showBreadcrumb: V,
196
- showBreadcrumbIcon: S,
197
- showTagsView: P,
198
- tagsViewHeight: B,
199
- tagsViewStyle: N,
200
- showFooter: L,
201
- sidebarWidth: U,
202
- sidebarCollapsedWidth: _,
203
- headerHeight: E,
204
- enableHotkeys: D,
205
- version: z,
188
+ themeMode: p,
189
+ primaryColor: m,
190
+ borderRadius: a,
191
+ transitionType: u,
192
+ enableTransition: c,
193
+ layoutMode: C,
194
+ collapsed: g,
195
+ fixedHeader: h,
196
+ showBreadcrumb: w,
197
+ showBreadcrumbIcon: M,
198
+ showTagsView: T,
199
+ tagsViewHeight: R,
200
+ tagsViewStyle: H,
201
+ showFooter: b,
202
+ sidebarWidth: k,
203
+ sidebarCollapsedWidth: L,
204
+ headerHeight: j,
205
+ enableHotkeys: F,
206
+ version: B,
206
207
  // 计算属性
207
- borderRadiusValue: A,
208
- transitionName: i,
209
- shouldEnableTransition: e,
210
- settingsState: o,
208
+ borderRadiusValue: G,
209
+ transitionName: I,
210
+ shouldEnableTransition: t,
211
+ settingsState: d,
211
212
  // 方法
212
- syncCSSVariables: C,
213
- applyPreset: T,
214
- resetSettings: ee,
215
- updateThemeMode: te,
213
+ syncCSSVariables: K,
214
+ applyPreset: Y,
215
+ resetSettings: ve,
216
+ updateThemeMode: ie,
216
217
  toggleCollapse: se
217
218
  };
218
219
  });
219
220
  }
220
- const Ce = X(), Te = [
221
+ const ze = Ie(), Ze = /* @__PURE__ */ Symbol("layout-context"), Ve = /* @__PURE__ */ Symbol("drawer-handlers");
222
+ function X() {
223
+ const f = we(Ze);
224
+ if (!f)
225
+ throw new Error(
226
+ "[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。"
227
+ );
228
+ return f;
229
+ }
230
+ const ae = {
231
+ name: "Admin",
232
+ subtitle: "",
233
+ logoSrc: "",
234
+ logoType: "image",
235
+ logoSize: 36,
236
+ homePath: "/home",
237
+ copyright: ""
238
+ };
239
+ function me(f = {}) {
240
+ const {
241
+ maxCacheCount: i = 20,
242
+ enableDevLog: y = !0,
243
+ exposeToWindow: s = !0
244
+ } = f, p = ke(), m = V([]), a = V(i), u = (h) => !h || typeof h != "string" ? !1 : p.meta?.keepAlive === !0, c = (h) => {
245
+ !m.value.includes(h) && u(h) && (m.value.push(h), m.value.length > a.value && m.value.shift());
246
+ }, C = (h) => {
247
+ const w = m.value.indexOf(h);
248
+ w > -1 && m.value.splice(w, 1);
249
+ }, g = () => {
250
+ m.value = [];
251
+ };
252
+ return q(
253
+ () => p.name,
254
+ (h) => {
255
+ h && typeof h == "string" && c(h);
256
+ },
257
+ { immediate: !0 }
258
+ ), {
259
+ cachedViews: m,
260
+ maxCacheCount: a,
261
+ addCache: c,
262
+ removeCache: C,
263
+ clearAllCache: g
264
+ };
265
+ }
266
+ const qe = /* @__PURE__ */ O({
267
+ name: "SideLayout",
268
+ __name: "index",
269
+ props: {
270
+ collapsed: { type: Boolean, default: !1 }
271
+ },
272
+ emits: ["update:collapsed"],
273
+ setup(f, { expose: i, emit: y }) {
274
+ const s = f, p = y, m = X(), { cachedViews: a, maxCacheCount: u } = me(), c = V(s.collapsed);
275
+ q(
276
+ () => s.collapsed,
277
+ (w) => {
278
+ c.value = w;
279
+ }
280
+ );
281
+ const C = z(() => c.value), g = (w) => {
282
+ c.value = w, p("update:collapsed", w);
283
+ };
284
+ return i({
285
+ collapsed: C,
286
+ toggleCollapse: () => {
287
+ const w = !c.value;
288
+ c.value = w, p("update:collapsed", w);
289
+ }
290
+ }), (w, M) => {
291
+ const T = de("RouterView");
292
+ return n(), S(o(ne), { "has-sider": "" }, {
293
+ default: l(() => [
294
+ v(o(De), {
295
+ bordered: "",
296
+ "collapse-mode": "width",
297
+ "collapsed-width": o(m).sidebarCollapsedWidth.value,
298
+ width: o(m).sidebarWidth.value,
299
+ "native-scrollbar": !1,
300
+ collapsed: C.value,
301
+ "onUpdate:collapsed": g,
302
+ class: A([
303
+ "layout-sider",
304
+ "no-horizontal-scroll",
305
+ o(m).isDark.value ? "dark-theme" : "light-theme"
306
+ ])
307
+ }, {
308
+ default: l(() => [
309
+ _(w.$slots, "logo"),
310
+ _(w.$slots, "menu", { collapsed: C.value })
311
+ ]),
312
+ _: 3
313
+ }, 8, ["collapsed-width", "width", "collapsed", "class"]),
314
+ v(o(ne), null, {
315
+ default: l(() => [
316
+ _(w.$slots, "header"),
317
+ v(o(ce), { class: "content-with-header p16px app-content" }, {
318
+ default: l(() => [
319
+ v(T, null, {
320
+ default: l(({ Component: R, route: H }) => [
321
+ v(Q, {
322
+ name: o(m).transitionName.value,
323
+ mode: "out-in"
324
+ }, {
325
+ default: l(() => [
326
+ (n(), S(ue, {
327
+ include: o(a),
328
+ max: o(u)
329
+ }, [
330
+ (n(), S(N(R), {
331
+ key: H.path
332
+ }))
333
+ ], 1032, ["include", "max"]))
334
+ ]),
335
+ _: 2
336
+ }, 1032, ["name"])
337
+ ]),
338
+ _: 1
339
+ })
340
+ ]),
341
+ _: 1
342
+ }),
343
+ _(w.$slots, "footer")
344
+ ]),
345
+ _: 3
346
+ })
347
+ ]),
348
+ _: 3
349
+ });
350
+ };
351
+ }
352
+ }), Qe = {
353
+ ref: "visibleRef",
354
+ class: "responsive-menu__visible"
355
+ }, et = { class: "responsive-menu__more" }, tt = /* @__PURE__ */ O({
356
+ name: "ResponsiveMenu",
357
+ __name: "index",
358
+ props: {
359
+ data: {}
360
+ },
361
+ setup(f) {
362
+ const i = f, y = ke(), s = ge(), p = X(), m = z(() => i.data || []), a = z(() => y.path), u = p.isDark, c = {
363
+ itemTextColor: "rgba(51, 65, 85, 0.85)",
364
+ itemTextColorHover: "rgba(30, 64, 175, 0.95)",
365
+ itemTextColorActive: "rgba(30, 64, 175, 1)",
366
+ itemTextColorActiveHover: "rgba(30, 64, 175, 1)",
367
+ itemTextColorChildActive: "rgba(30, 64, 175, 1)",
368
+ itemIconColor: "rgba(51, 65, 85, 0.7)",
369
+ itemIconColorHover: "rgba(30, 64, 175, 0.85)",
370
+ itemIconColorActive: "rgba(30, 64, 175, 1)",
371
+ itemIconColorActiveHover: "rgba(30, 64, 175, 1)",
372
+ itemIconColorChildActive: "rgba(30, 64, 175, 1)",
373
+ itemColorHover: "rgba(30, 64, 175, 0.06)",
374
+ itemColorActive: "rgba(30, 64, 175, 0.1)",
375
+ itemColorActiveHover: "rgba(30, 64, 175, 0.12)",
376
+ itemColorActiveCollapsed: "rgba(30, 64, 175, 0.1)",
377
+ arrowColor: "rgba(51, 65, 85, 0.6)",
378
+ arrowColorHover: "rgba(30, 64, 175, 0.8)",
379
+ arrowColorActive: "rgba(30, 64, 175, 1)",
380
+ arrowColorChildActive: "rgba(30, 64, 175, 1)",
381
+ itemHeight: "42px",
382
+ itemPadding: "0 18px",
383
+ itemBorderRadius: "10px",
384
+ groupTextColor: "rgba(51, 65, 85, 0.65)"
385
+ }, C = {
386
+ itemTextColor: "rgba(226, 232, 240, 0.85)",
387
+ itemTextColorHover: "rgba(255, 255, 255, 0.95)",
388
+ itemTextColorActive: "rgba(147, 197, 253, 1)",
389
+ itemTextColorActiveHover: "rgba(147, 197, 253, 1)",
390
+ itemTextColorChildActive: "rgba(147, 197, 253, 1)",
391
+ itemIconColor: "rgba(226, 232, 240, 0.7)",
392
+ itemIconColorHover: "rgba(255, 255, 255, 0.85)",
393
+ itemIconColorActive: "rgba(147, 197, 253, 1)",
394
+ itemIconColorActiveHover: "rgba(147, 197, 253, 1)",
395
+ itemIconColorChildActive: "rgba(147, 197, 253, 1)",
396
+ itemColorHover: "rgba(59, 130, 246, 0.1)",
397
+ itemColorActive: "rgba(59, 130, 246, 0.15)",
398
+ itemColorActiveHover: "rgba(59, 130, 246, 0.18)",
399
+ itemColorActiveCollapsed: "rgba(59, 130, 246, 0.15)",
400
+ arrowColor: "rgba(226, 232, 240, 0.5)",
401
+ arrowColorHover: "rgba(255, 255, 255, 0.7)",
402
+ arrowColorActive: "rgba(147, 197, 253, 1)",
403
+ arrowColorChildActive: "rgba(147, 197, 253, 1)",
404
+ itemHeight: "42px",
405
+ itemPadding: "0 18px",
406
+ itemBorderRadius: "10px",
407
+ groupTextColor: "rgba(226, 232, 240, 0.6)"
408
+ }, g = z(
409
+ () => u.value ? C : c
410
+ ), h = (t, d = 18) => p.iconComponent ? () => re(p.iconComponent, { name: t, size: d }) : () => re("i", {
411
+ class: t,
412
+ style: {
413
+ fontSize: `${d}px`,
414
+ display: "inline-flex",
415
+ alignItems: "center"
416
+ }
417
+ }), w = (t) => ({
418
+ key: t.path || "",
419
+ label: t.meta?.title || t.name || "",
420
+ icon: t.meta?.icon ? h(t.meta.icon, 18) : void 0,
421
+ children: t.children?.length ? t.children.map(w) : void 0
422
+ }), M = V(), T = V([]), R = V([]), H = z(
423
+ () => T.value.map(w)
424
+ ), b = z(
425
+ () => R.value.map((t) => ({
426
+ key: t.path || "",
427
+ label: t.meta?.title || t.name || "",
428
+ icon: t.meta?.icon ? h(t.meta.icon, 16) : void 0,
429
+ children: t.children?.length ? t.children.map((d) => ({
430
+ key: d.path || "",
431
+ label: d.meta?.title || d.name || "",
432
+ icon: d.meta?.icon ? h(d.meta.icon, 16) : void 0
433
+ })) : void 0
434
+ }))
435
+ ), k = (t) => {
436
+ t && s.push(t);
437
+ }, L = (t) => {
438
+ const ie = t.meta?.title || t.name || "";
439
+ let se = 0;
440
+ for (const pe of ie) {
441
+ const J = pe.charCodeAt(0);
442
+ J >= 19968 && J <= 40959 || // CJK 统一汉字
443
+ J >= 13312 && J <= 19903 || // CJK 扩展 A
444
+ J >= 12288 && J <= 12351 || // CJK 符号
445
+ J >= 65280 && J <= 65519 || // 全角字符
446
+ J >= 12352 && J <= 12447 || // 平假名
447
+ J >= 12448 && J <= 12543 ? se += 15 : se += 8;
448
+ }
449
+ const D = t.meta?.icon ? 26 : 0;
450
+ return se + D + 36 + 8 + 8;
451
+ }, j = (t) => {
452
+ if (!m.value.length) return 0;
453
+ const d = 80, K = 15;
454
+ let Y = 0;
455
+ for (const D of m.value)
456
+ Y += L(D);
457
+ if (Y + K <= t)
458
+ return m.value.length;
459
+ let ve = 0, ie = 0;
460
+ const se = t - d - K;
461
+ for (const D of m.value) {
462
+ const pe = L(D);
463
+ if (ve + pe <= se)
464
+ ve += pe, ie++;
465
+ else break;
466
+ }
467
+ return Math.max(ie, 1);
468
+ }, F = () => {
469
+ if (!M.value || !m.value.length) return;
470
+ const t = M.value.offsetWidth;
471
+ if (t === 0) {
472
+ fe(() => F());
473
+ return;
474
+ }
475
+ const d = j(t);
476
+ T.value = m.value.slice(0, d), R.value = m.value.slice(d);
477
+ };
478
+ let B = null;
479
+ const G = () => {
480
+ B && clearTimeout(B), B = window.setTimeout(() => F(), 100);
481
+ };
482
+ let I = null;
483
+ return Me(() => {
484
+ fe(() => F()), M.value && (I = new ResizeObserver(() => G()), I.observe(M.value));
485
+ }), be(() => {
486
+ I?.disconnect(), B && clearTimeout(B);
487
+ }), q(
488
+ () => i.data,
489
+ () => fe(() => F()),
490
+ {
491
+ deep: !0
492
+ }
493
+ ), (t, d) => (n(), r("div", {
494
+ ref_key: "containerRef",
495
+ ref: M,
496
+ class: "responsive-menu"
497
+ }, [
498
+ e("div", Qe, [
499
+ H.value.length > 0 ? (n(), S(o(Ne), {
500
+ key: 0,
501
+ mode: "horizontal",
502
+ value: a.value,
503
+ options: H.value,
504
+ "theme-overrides": g.value,
505
+ "onUpdate:value": k
506
+ }, null, 8, ["value", "options", "theme-overrides"])) : x("", !0)
507
+ ], 512),
508
+ R.value.length > 0 ? (n(), S(o(Ee), {
509
+ key: 0,
510
+ options: b.value,
511
+ placement: "bottom-end",
512
+ trigger: "hover",
513
+ onSelect: k
514
+ }, {
515
+ default: l(() => [
516
+ e("div", et, [
517
+ v(o(oe), {
518
+ text: "",
519
+ class: "responsive-menu__more-btn"
520
+ }, {
521
+ default: l(() => [...d[0] || (d[0] = [
522
+ e("span", { class: "dots-icon" }, [
523
+ e("span"),
524
+ e("span"),
525
+ e("span")
526
+ ], -1)
527
+ ])]),
528
+ _: 1
529
+ })
530
+ ])
531
+ ]),
532
+ _: 1
533
+ }, 8, ["options"])) : x("", !0)
534
+ ], 512));
535
+ }
536
+ }), ee = (f, i) => {
537
+ const y = f.__vccOpts || f;
538
+ for (const [s, p] of i)
539
+ y[s] = p;
540
+ return y;
541
+ }, $e = /* @__PURE__ */ ee(tt, [["__scopeId", "data-v-d329131b"]]), ot = { class: "top-layout-container" }, st = { class: "navbar-left" }, nt = { class: "logo-container" }, at = ["src", "width", "height"], it = ["src", "width", "height"], lt = { class: "brand-name" }, rt = { class: "brand-title" }, dt = { class: "brand-subtitle" }, ut = { class: "navbar-center" }, ct = { class: "page-content" }, mt = /* @__PURE__ */ O({
542
+ name: "TopLayout",
543
+ __name: "index",
544
+ setup(f) {
545
+ const i = X(), { cachedViews: y, maxCacheCount: s } = me(), p = i.isDark, m = z(() => i.menus.value), a = z(() => i.showTagsView.value), u = z(() => i.tagsViewHeight.value), c = z(() => i.showFooter.value), C = z(() => i.transitionName.value), g = { ...ae, ...i.brand };
546
+ return (h, w) => {
547
+ const M = de("RouterView");
548
+ return n(), r("div", ot, [
549
+ e("div", {
550
+ class: A(["top-navbar", [o(p) ? "dark-theme" : "light-theme"]])
551
+ }, [
552
+ e("div", st, [
553
+ _(h.$slots, "logo", {}, () => [
554
+ e("div", nt, [
555
+ w[0] || (w[0] = e("div", { class: "logo-glow" }, null, -1)),
556
+ g.logoType === "video" ? (n(), r("video", {
557
+ key: 0,
558
+ src: g.logoSrc,
559
+ width: g.logoSize || 36,
560
+ height: g.logoSize || 36,
561
+ autoplay: "",
562
+ loop: "",
563
+ muted: "",
564
+ playsinline: "",
565
+ class: "logo-video"
566
+ }, " 您的浏览器不支持 video 标签。 ", 8, at)) : (n(), r("img", {
567
+ key: 1,
568
+ src: g.logoSrc,
569
+ width: g.logoSize || 36,
570
+ height: g.logoSize || 36,
571
+ class: "logo-video"
572
+ }, null, 8, it))
573
+ ]),
574
+ e("div", lt, [
575
+ e("span", rt, $(g.name), 1),
576
+ e("span", dt, $(g.subtitle), 1)
577
+ ]),
578
+ w[1] || (w[1] = e("div", { class: "navbar-divider" }, null, -1))
579
+ ])
580
+ ]),
581
+ e("div", ut, [
582
+ _(h.$slots, "menu", {}, () => [
583
+ v($e, { data: m.value }, null, 8, ["data"])
584
+ ])
585
+ ]),
586
+ _(h.$slots, "header-extra")
587
+ ], 2),
588
+ a.value ? (n(), r("div", {
589
+ key: 0,
590
+ class: "tags-view-container",
591
+ style: he({ height: `${u.value}px` })
592
+ }, [
593
+ _(h.$slots, "tags-view")
594
+ ], 4)) : x("", !0),
595
+ v(o(ne), null, {
596
+ default: l(() => [
597
+ v(o(ce), { class: "main-content" }, {
598
+ default: l(() => [
599
+ e("div", ct, [
600
+ v(M, null, {
601
+ default: l(({ Component: T, route: R }) => [
602
+ v(Q, {
603
+ name: C.value,
604
+ mode: "out-in"
605
+ }, {
606
+ default: l(() => [
607
+ (n(), S(ue, {
608
+ include: o(y),
609
+ max: o(s)
610
+ }, [
611
+ (n(), S(N(T), {
612
+ key: R.path
613
+ }))
614
+ ], 1032, ["include", "max"]))
615
+ ]),
616
+ _: 2
617
+ }, 1032, ["name"])
618
+ ]),
619
+ _: 1
620
+ })
621
+ ])
622
+ ]),
623
+ _: 1
624
+ }),
625
+ c.value ? _(h.$slots, "footer", { key: 0 }) : x("", !0)
626
+ ]),
627
+ _: 3
628
+ })
629
+ ]);
630
+ };
631
+ }
632
+ });
633
+ function Ce(f) {
634
+ const { menus: i, floatingSecondMenu: y = !1 } = f, s = ke(), p = ge(), m = V(""), a = V(null), u = V(!1), c = z(
635
+ () => a.value || w.value || null
636
+ ), C = (b) => b.startsWith("/") ? b : `/${b}`, g = (b) => {
637
+ if (!b) return !1;
638
+ const k = s.path;
639
+ if (k === b) return !0;
640
+ const L = C(b), j = C(k);
641
+ return j === L ? !0 : j.includes(`/${b}`);
642
+ }, h = (b) => {
643
+ for (const k of b)
644
+ if (g(k.path) || k.children?.length && h(k.children))
645
+ return k;
646
+ return null;
647
+ }, w = z(
648
+ () => i.value.find((b) => b.path === m.value)
649
+ ), M = z(
650
+ () => w.value?.children || []
651
+ ), T = (b) => {
652
+ xe(y) ? b.children && b.children.length > 0 ? u.value && m.value === b.path ? u.value = !1 : (m.value = b.path || "", u.value = !0) : (m.value = b.path || "", u.value = !1, b.path && p.push(b.path)) : (!b.children || b.children.length === 0) && b.path && p.push(b.path);
653
+ }, R = (b) => {
654
+ b.path && p.push(b.path);
655
+ }, H = () => {
656
+ const b = i.value, k = h(b);
657
+ k ? (m.value = k.path || "", xe(y) && k.children?.length && (u.value = !0)) : b.length > 0 && !m.value && (m.value = b[0].path || "");
658
+ };
659
+ return q(
660
+ () => s.path,
661
+ () => H(),
662
+ { immediate: !0 }
663
+ ), q(
664
+ i,
665
+ (b) => {
666
+ b && b.length > 0 && H();
667
+ },
668
+ { immediate: !0 }
669
+ ), Me(() => H()), {
670
+ activeFirstMenu: m,
671
+ activeFirstMenuItem: w,
672
+ currentSecondMenus: M,
673
+ hoveredMenuItem: a,
674
+ /** 实际在悬浮面板上展示的菜单项(hovered 优先,fallback 到 active) */
675
+ displayMenuItem: c,
676
+ showSecondMenu: u,
677
+ handleFirstMenuClick: T,
678
+ handleSecondMenuClick: R,
679
+ isMenuItemActive: g
680
+ };
681
+ }
682
+ const vt = { class: "mix-layout-container" }, ht = { class: "logo-container" }, pt = ["src", "width", "height"], gt = ["src", "width", "height"], ft = { class: "first-menu-list" }, _t = ["onClick"], yt = { class: "menu-item-content" }, wt = {
683
+ key: 1,
684
+ class: "menu-item-text"
685
+ }, bt = { class: "menu-item-label" }, kt = { class: "second-menu-header" }, $t = { class: "menu-title" }, Ct = { class: "second-menu-list" }, xt = ["onClick"], St = { class: "menu-item-label" }, Tt = { class: "main-layout" }, Mt = /* @__PURE__ */ O({
686
+ name: "MixLayout",
687
+ __name: "index",
688
+ setup(f) {
689
+ const i = X(), { cachedViews: y, maxCacheCount: s } = me(), p = i.isDark, m = z(() => i.menus.value), a = z(() => i.showFooter.value), u = z(() => i.transitionName.value), c = { ...ae, ...i.brand }, C = Ce({
690
+ menus: i.menus,
691
+ floatingSecondMenu: z(() => !0)
692
+ }), g = i.iconComponent ?? O({
693
+ name: "LayoutIcon",
694
+ props: { name: String, size: { type: Number, default: 18 } },
695
+ setup(h) {
696
+ return () => re("i", {
697
+ class: h.name,
698
+ style: {
699
+ fontSize: `${h.size}px`,
700
+ display: "inline-flex",
701
+ alignItems: "center",
702
+ justifyContent: "center"
703
+ }
704
+ });
705
+ }
706
+ });
707
+ return (h, w) => {
708
+ const M = de("RouterView");
709
+ return n(), r("div", vt, [
710
+ e("div", {
711
+ class: A(["first-level-menu", [o(p) ? "dark-theme" : "light-theme"]])
712
+ }, [
713
+ e("div", ht, [
714
+ _(h.$slots, "logo", {}, () => [
715
+ w[0] || (w[0] = e("div", { class: "logo-glow" }, null, -1)),
716
+ c.logoType === "video" ? (n(), r("video", {
717
+ key: 0,
718
+ src: c.logoSrc,
719
+ width: c.logoSize || 40,
720
+ height: c.logoSize || 40,
721
+ autoplay: "",
722
+ loop: "",
723
+ muted: "",
724
+ playsinline: "",
725
+ class: "logo-video"
726
+ }, " 您的浏览器不支持 video 标签。 ", 8, pt)) : (n(), r("img", {
727
+ key: 1,
728
+ src: c.logoSrc,
729
+ width: c.logoSize || 40,
730
+ height: c.logoSize || 40,
731
+ class: "logo-video"
732
+ }, null, 8, gt))
733
+ ])
734
+ ]),
735
+ e("div", ft, [
736
+ (n(!0), r(E, null, W(m.value, (T) => (n(), r("div", {
737
+ key: T.path,
738
+ class: A(["first-menu-item", {
739
+ active: o(C).activeFirstMenu.value === T.path
740
+ }]),
741
+ onClick: (R) => o(C).handleFirstMenuClick(T)
742
+ }, [
743
+ e("div", yt, [
744
+ T.meta?.icon ? (n(), S(N(o(g)), {
745
+ key: 0,
746
+ name: T.meta.icon,
747
+ size: 22
748
+ }, null, 8, ["name"])) : (n(), r("span", wt, $((T.meta?.title || "")[0]), 1))
749
+ ]),
750
+ e("span", bt, $(T.meta?.title), 1)
751
+ ], 10, _t))), 128))
752
+ ])
753
+ ], 2),
754
+ v(Q, { name: "slide-fade" }, {
755
+ default: l(() => [
756
+ o(C).showSecondMenu.value ? (n(), r("div", {
757
+ key: 0,
758
+ class: A(["second-level-menu-popup", [o(p) ? "dark-theme" : "light-theme"]])
759
+ }, [
760
+ e("div", kt, [
761
+ o(C).displayMenuItem.value?.meta?.icon ? (n(), S(N(o(g)), {
762
+ key: 0,
763
+ name: o(C).displayMenuItem.value.meta.icon,
764
+ size: 20
765
+ }, null, 8, ["name"])) : x("", !0),
766
+ e("span", $t, $(o(C).displayMenuItem.value?.meta?.title), 1)
767
+ ]),
768
+ e("div", Ct, [
769
+ (n(!0), r(E, null, W(o(C).displayMenuItem.value?.children || [], (T) => (n(), r("div", {
770
+ key: T.path,
771
+ class: A(["second-menu-item", { active: o(C).isMenuItemActive(T.path) }]),
772
+ onClick: (R) => o(C).handleSecondMenuClick(T)
773
+ }, [
774
+ T.meta?.icon ? (n(), S(N(o(g)), {
775
+ key: 0,
776
+ name: T.meta.icon,
777
+ size: 16
778
+ }, null, 8, ["name"])) : x("", !0),
779
+ e("span", St, $(T.meta?.title), 1)
780
+ ], 10, xt))), 128))
781
+ ])
782
+ ], 2)) : x("", !0)
783
+ ]),
784
+ _: 1
785
+ }),
786
+ e("div", Tt, [
787
+ _(h.$slots, "header"),
788
+ v(o(ne), null, {
789
+ default: l(() => [
790
+ v(o(ce), { class: "content-with-header p16px app-content" }, {
791
+ default: l(() => [
792
+ v(M, null, {
793
+ default: l(({ Component: T, route: R }) => [
794
+ v(Q, {
795
+ name: u.value,
796
+ mode: "out-in"
797
+ }, {
798
+ default: l(() => [
799
+ (n(), S(ue, {
800
+ include: o(y),
801
+ max: o(s)
802
+ }, [
803
+ (n(), S(N(T), {
804
+ key: R.path
805
+ }))
806
+ ], 1032, ["include", "max"]))
807
+ ]),
808
+ _: 2
809
+ }, 1032, ["name"])
810
+ ]),
811
+ _: 1
812
+ })
813
+ ]),
814
+ _: 1
815
+ }),
816
+ a.value ? _(h.$slots, "footer", { key: 0 }) : x("", !0)
817
+ ]),
818
+ _: 3
819
+ })
820
+ ])
821
+ ]);
822
+ };
823
+ }
824
+ }), It = { class: "mix-top-layout-container" }, zt = { class: "logo-container" }, Vt = ["src", "width", "height"], Ht = ["src", "width", "height"], Rt = { class: "first-menu-list" }, At = ["onClick"], Lt = { class: "menu-item-content" }, Dt = {
825
+ key: 1,
826
+ class: "menu-item-text"
827
+ }, Nt = { class: "menu-item-label" }, Et = { class: "main-area" }, Bt = { class: "navbar-left" }, Ft = { class: "brand-name" }, Wt = { class: "brand-title" }, Ot = { class: "brand-subtitle" }, Ut = { class: "navbar-center" }, Pt = { class: "page-content" }, jt = /* @__PURE__ */ O({
828
+ name: "MixTopLayout",
829
+ __name: "index",
830
+ setup(f) {
831
+ const i = X(), { cachedViews: y, maxCacheCount: s } = me(), p = i.isDark, m = z(() => i.menus.value), a = z(() => i.showTagsView.value), u = z(() => i.tagsViewHeight.value), c = z(() => i.showFooter.value), C = z(() => i.transitionName.value), g = { ...ae, ...i.brand }, h = Ce({
832
+ menus: i.menus,
833
+ floatingSecondMenu: z(() => !1)
834
+ }), w = i.iconComponent ?? O({
835
+ name: "LayoutIcon",
836
+ props: { name: String, size: { type: Number, default: 18 } },
837
+ setup(M) {
838
+ return () => re("i", {
839
+ class: M.name,
840
+ style: {
841
+ fontSize: `${M.size}px`,
842
+ display: "inline-flex",
843
+ alignItems: "center",
844
+ justifyContent: "center"
845
+ }
846
+ });
847
+ }
848
+ });
849
+ return (M, T) => {
850
+ const R = de("RouterView");
851
+ return n(), r("div", It, [
852
+ e("div", {
853
+ class: A(["first-level-sidebar", [o(p) ? "dark-theme" : "light-theme"]])
854
+ }, [
855
+ e("div", zt, [
856
+ _(M.$slots, "logo", {}, () => [
857
+ T[0] || (T[0] = e("div", { class: "logo-glow" }, null, -1)),
858
+ g.logoType === "video" ? (n(), r("video", {
859
+ key: 0,
860
+ src: g.logoSrc,
861
+ width: g.logoSize || 40,
862
+ height: g.logoSize || 40,
863
+ autoplay: "",
864
+ loop: "",
865
+ muted: "",
866
+ playsinline: "",
867
+ class: "logo-video"
868
+ }, " 您的浏览器不支持 video 标签。 ", 8, Vt)) : (n(), r("img", {
869
+ key: 1,
870
+ src: g.logoSrc,
871
+ width: g.logoSize || 40,
872
+ height: g.logoSize || 40,
873
+ class: "logo-video"
874
+ }, null, 8, Ht))
875
+ ])
876
+ ]),
877
+ e("div", Rt, [
878
+ (n(!0), r(E, null, W(m.value, (H) => (n(), r("div", {
879
+ key: H.path,
880
+ class: A(["first-menu-item", {
881
+ active: o(h).activeFirstMenu.value === H.path
882
+ }]),
883
+ onClick: (b) => o(h).handleFirstMenuClick(H)
884
+ }, [
885
+ e("div", Lt, [
886
+ H.meta?.icon ? (n(), S(N(o(w)), {
887
+ key: 0,
888
+ name: H.meta.icon,
889
+ size: 22
890
+ }, null, 8, ["name"])) : (n(), r("span", Dt, $((H.meta?.title || "")[0]), 1))
891
+ ]),
892
+ e("span", Nt, $(H.meta?.title), 1)
893
+ ], 10, At))), 128))
894
+ ])
895
+ ], 2),
896
+ e("div", Et, [
897
+ e("div", {
898
+ class: A(["top-navbar", [o(p) ? "dark-theme" : "light-theme"]])
899
+ }, [
900
+ e("div", Bt, [
901
+ _(M.$slots, "brand", {}, () => [
902
+ e("div", Ft, [
903
+ e("span", Wt, $(g.name), 1),
904
+ e("span", Ot, $(g.subtitle), 1)
905
+ ]),
906
+ T[1] || (T[1] = e("div", { class: "navbar-divider" }, null, -1))
907
+ ])
908
+ ]),
909
+ e("div", Ut, [
910
+ _(M.$slots, "top-menu", {}, () => [
911
+ o(h).currentSecondMenus.value.length > 0 ? (n(), S($e, {
912
+ key: 0,
913
+ data: o(h).currentSecondMenus.value
914
+ }, null, 8, ["data"])) : x("", !0)
915
+ ])
916
+ ]),
917
+ _(M.$slots, "header-extra")
918
+ ], 2),
919
+ a.value ? (n(), r("div", {
920
+ key: 0,
921
+ class: "tags-view-container",
922
+ style: he({ height: `${u.value}px` })
923
+ }, [
924
+ _(M.$slots, "tags-view")
925
+ ], 4)) : x("", !0),
926
+ v(o(ne), { class: "content-layout" }, {
927
+ default: l(() => [
928
+ v(o(ce), { class: "main-content" }, {
929
+ default: l(() => [
930
+ e("div", Pt, [
931
+ v(R, null, {
932
+ default: l(({ Component: H, route: b }) => [
933
+ v(Q, {
934
+ name: C.value,
935
+ mode: "out-in"
936
+ }, {
937
+ default: l(() => [
938
+ (n(), S(ue, {
939
+ include: o(y),
940
+ max: o(s)
941
+ }, [
942
+ (n(), S(N(H), {
943
+ key: b.path
944
+ }))
945
+ ], 1032, ["include", "max"]))
946
+ ]),
947
+ _: 2
948
+ }, 1032, ["name"])
949
+ ]),
950
+ _: 1
951
+ })
952
+ ])
953
+ ]),
954
+ _: 1
955
+ }),
956
+ c.value ? _(M.$slots, "footer", { key: 0 }) : x("", !0)
957
+ ]),
958
+ _: 3
959
+ })
960
+ ])
961
+ ]);
962
+ };
963
+ }
964
+ }), Kt = { class: "reverse-horizontal-mix-layout-container" }, Yt = { class: "navbar-left" }, Gt = { class: "logo-container" }, Xt = ["src", "width", "height"], Jt = ["src", "width", "height"], Zt = { class: "brand-name" }, qt = { class: "brand-title" }, Qt = { class: "brand-subtitle" }, eo = { class: "navbar-center" }, to = { class: "main-area" }, oo = { class: "page-content" }, so = { class: "header-icon" }, no = { class: "header-title" }, ao = { class: "sidebar-menu-list" }, io = {
965
+ key: 0,
966
+ class: "menu-group"
967
+ }, lo = { class: "group-title" }, ro = ["onClick"], uo = { class: "item-title" }, co = ["onClick"], mo = { class: "item-title" }, vo = /* @__PURE__ */ O({
968
+ name: "ReverseHorizontalMixLayout",
969
+ __name: "index",
970
+ setup(f) {
971
+ const i = X(), { cachedViews: y, maxCacheCount: s } = me(), p = i.isDark, m = z(() => i.menus.value), a = z(() => i.showTagsView.value), u = z(() => i.tagsViewHeight.value), c = z(() => i.showFooter.value), C = z(() => i.transitionName.value), g = { ...ae, ...i.brand }, h = Ce({
972
+ menus: i.menus,
973
+ floatingSecondMenu: z(() => !1)
974
+ }), w = V(!1), M = () => {
975
+ w.value = !w.value;
976
+ }, T = i.iconComponent ?? O({
977
+ name: "LayoutIcon",
978
+ props: { name: String, size: { type: Number, default: 18 } },
979
+ setup(R) {
980
+ return () => re("i", {
981
+ class: R.name,
982
+ style: {
983
+ fontSize: `${R.size}px`,
984
+ display: "inline-flex",
985
+ alignItems: "center",
986
+ justifyContent: "center"
987
+ }
988
+ });
989
+ }
990
+ });
991
+ return (R, H) => {
992
+ const b = de("RouterView");
993
+ return n(), r("div", Kt, [
994
+ e("div", {
995
+ class: A(["top-navbar", [o(p) ? "dark-theme" : "light-theme"]])
996
+ }, [
997
+ e("div", Yt, [
998
+ _(R.$slots, "logo", {}, () => [
999
+ e("div", Gt, [
1000
+ H[0] || (H[0] = e("div", { class: "logo-glow" }, null, -1)),
1001
+ g.logoType === "video" ? (n(), r("video", {
1002
+ key: 0,
1003
+ src: g.logoSrc,
1004
+ width: g.logoSize || 36,
1005
+ height: g.logoSize || 36,
1006
+ autoplay: "",
1007
+ loop: "",
1008
+ muted: "",
1009
+ playsinline: "",
1010
+ class: "logo-video"
1011
+ }, " 您的浏览器不支持 video 标签。 ", 8, Xt)) : (n(), r("img", {
1012
+ key: 1,
1013
+ src: g.logoSrc,
1014
+ width: g.logoSize || 36,
1015
+ height: g.logoSize || 36,
1016
+ class: "logo-video"
1017
+ }, null, 8, Jt))
1018
+ ]),
1019
+ e("div", Zt, [
1020
+ e("span", qt, $(g.name), 1),
1021
+ e("span", Qt, $(g.subtitle), 1)
1022
+ ]),
1023
+ H[1] || (H[1] = e("div", { class: "navbar-divider" }, null, -1))
1024
+ ])
1025
+ ]),
1026
+ e("div", eo, [
1027
+ _(R.$slots, "top-menu", {}, () => [
1028
+ v($e, { data: m.value }, null, 8, ["data"])
1029
+ ])
1030
+ ]),
1031
+ _(R.$slots, "header-extra")
1032
+ ], 2),
1033
+ a.value ? (n(), r("div", {
1034
+ key: 0,
1035
+ class: "tags-view-container",
1036
+ style: he({ height: `${u.value}px` })
1037
+ }, [
1038
+ _(R.$slots, "tags-view")
1039
+ ], 4)) : x("", !0),
1040
+ e("div", to, [
1041
+ v(o(ne), { class: "content-layout" }, {
1042
+ default: l(() => [
1043
+ v(o(ce), { class: "main-content" }, {
1044
+ default: l(() => [
1045
+ e("div", oo, [
1046
+ v(b, null, {
1047
+ default: l(({ Component: k, route: L }) => [
1048
+ v(Q, {
1049
+ name: C.value,
1050
+ mode: "out-in"
1051
+ }, {
1052
+ default: l(() => [
1053
+ (n(), S(ue, {
1054
+ include: o(y),
1055
+ max: o(s)
1056
+ }, [
1057
+ (n(), S(N(k), {
1058
+ key: L.path
1059
+ }))
1060
+ ], 1032, ["include", "max"]))
1061
+ ]),
1062
+ _: 2
1063
+ }, 1032, ["name"])
1064
+ ]),
1065
+ _: 1
1066
+ })
1067
+ ])
1068
+ ]),
1069
+ _: 1
1070
+ }),
1071
+ c.value ? _(R.$slots, "footer", { key: 0 }) : x("", !0)
1072
+ ]),
1073
+ _: 3
1074
+ }),
1075
+ o(h).currentSecondMenus.value.length > 0 ? (n(), r("div", {
1076
+ key: 0,
1077
+ class: A(["sidebar-toggle", [
1078
+ o(p) ? "dark-theme" : "light-theme",
1079
+ { active: !w.value }
1080
+ ]]),
1081
+ onClick: M
1082
+ }, [
1083
+ e("span", {
1084
+ class: A([
1085
+ "collapse-arrow",
1086
+ "toggle-icon",
1087
+ w.value ? "collapsed" : "expanded"
1088
+ ])
1089
+ }, [...H[2] || (H[2] = [
1090
+ e("span", { class: "arrow-line" }, null, -1),
1091
+ e("span", { class: "arrow-line" }, null, -1)
1092
+ ])], 2)
1093
+ ], 2)) : x("", !0),
1094
+ o(h).currentSecondMenus.value.length > 0 ? (n(), r("div", {
1095
+ key: 1,
1096
+ class: A(["right-sidebar-wrapper", { collapsed: w.value }])
1097
+ }, [
1098
+ e("div", {
1099
+ class: A(["right-sidebar", [o(p) ? "dark-theme" : "light-theme"]])
1100
+ }, [
1101
+ e("div", {
1102
+ class: A(["sidebar-header", [o(p) ? "dark-theme" : "light-theme"]])
1103
+ }, [
1104
+ e("div", so, [
1105
+ o(h).activeFirstMenuItem.value?.meta?.icon ? (n(), S(N(o(T)), {
1106
+ key: 0,
1107
+ name: o(h).activeFirstMenuItem.value.meta.icon,
1108
+ size: 20
1109
+ }, null, 8, ["name"])) : x("", !0)
1110
+ ]),
1111
+ e("span", no, $(o(h).activeFirstMenuItem.value?.meta?.title || "菜单"), 1)
1112
+ ], 2),
1113
+ e("div", ao, [
1114
+ (n(!0), r(E, null, W(o(h).currentSecondMenus.value, (k) => (n(), r(E, {
1115
+ key: k.path
1116
+ }, [
1117
+ k.children && k.children.length > 0 ? (n(), r("div", io, [
1118
+ e("div", lo, [
1119
+ k.meta?.icon ? (n(), S(N(o(T)), {
1120
+ key: 0,
1121
+ name: k.meta.icon,
1122
+ size: 16
1123
+ }, null, 8, ["name"])) : x("", !0),
1124
+ e("span", null, $(k.meta?.title), 1)
1125
+ ]),
1126
+ (n(!0), r(E, null, W(k.children, (L) => (n(), r("div", {
1127
+ key: L.path,
1128
+ class: A(["menu-item sub-item", {
1129
+ active: o(h).isMenuItemActive(L.path)
1130
+ }]),
1131
+ onClick: (j) => o(h).handleSecondMenuClick(L)
1132
+ }, [
1133
+ L.meta?.icon ? (n(), S(N(o(T)), {
1134
+ key: 0,
1135
+ name: L.meta.icon,
1136
+ size: 16
1137
+ }, null, 8, ["name"])) : x("", !0),
1138
+ e("span", uo, $(L.meta?.title), 1)
1139
+ ], 10, ro))), 128))
1140
+ ])) : (n(), r("div", {
1141
+ key: 1,
1142
+ class: A(["menu-item", {
1143
+ active: o(h).isMenuItemActive(k.path)
1144
+ }]),
1145
+ onClick: (L) => o(h).handleSecondMenuClick(k)
1146
+ }, [
1147
+ k.meta?.icon ? (n(), S(N(o(T)), {
1148
+ key: 0,
1149
+ name: k.meta.icon,
1150
+ size: 18
1151
+ }, null, 8, ["name"])) : x("", !0),
1152
+ e("span", mo, $(k.meta?.title), 1)
1153
+ ], 10, co))
1154
+ ], 64))), 128))
1155
+ ])
1156
+ ], 2)
1157
+ ], 2)) : x("", !0)
1158
+ ])
1159
+ ]);
1160
+ };
1161
+ }
1162
+ }), ho = { class: "card-layout-container" }, po = { class: "navbar-left" }, go = { class: "logo-container" }, fo = ["src", "width", "height"], _o = ["src", "width", "height"], yo = { class: "brand-name" }, wo = { class: "brand-title" }, bo = { class: "brand-subtitle" }, ko = { class: "drawer-content" }, $o = { class: "menu-grid" }, Co = ["onClick"], xo = {
1163
+ key: 0,
1164
+ class: "category-items"
1165
+ }, So = ["onClick"], To = { class: "item-title" }, Mo = {
1166
+ key: 0,
1167
+ class: "submenu-items"
1168
+ }, Io = { class: "submenu-title" }, zo = ["onClick"], Vo = { class: "item-title" }, Ho = { class: "main-content-area" }, Ro = { class: "page-content" }, Ao = /* @__PURE__ */ O({
1169
+ name: "CardLayout",
1170
+ __name: "index",
1171
+ setup(f) {
1172
+ const i = X(), { cachedViews: y, maxCacheCount: s } = me(), p = ge(), m = i.isDark, a = z(() => i.menus.value), u = z(() => i.showTagsView.value), c = z(() => i.tagsViewHeight.value), C = z(() => i.showFooter.value), g = z(() => i.transitionName.value), h = { ...ae, ...i.brand }, w = V(!1), M = V(null), T = () => {
1173
+ M.value && clearTimeout(M.value), M.value = setTimeout(() => {
1174
+ w.value = !1;
1175
+ }, 300);
1176
+ }, R = () => {
1177
+ M.value && (clearTimeout(M.value), M.value = null), w.value = !0;
1178
+ }, H = (k) => {
1179
+ k.path && (p.push(k.path), w.value = !1);
1180
+ }, b = i.iconComponent ?? O({
1181
+ name: "LayoutIcon",
1182
+ props: { name: String, size: { type: Number, default: 18 } },
1183
+ setup(k) {
1184
+ return () => re("i", {
1185
+ class: k.name,
1186
+ style: {
1187
+ fontSize: `${k.size}px`,
1188
+ display: "inline-flex",
1189
+ alignItems: "center",
1190
+ justifyContent: "center"
1191
+ }
1192
+ });
1193
+ }
1194
+ });
1195
+ return be(() => {
1196
+ M.value && clearTimeout(M.value);
1197
+ }), (k, L) => {
1198
+ const j = de("RouterView");
1199
+ return n(), r("div", ho, [
1200
+ e("div", {
1201
+ class: A(["top-navbar", [o(m) ? "dark-theme" : "light-theme"]])
1202
+ }, [
1203
+ e("div", po, [
1204
+ e("div", {
1205
+ class: "hover-trigger-area",
1206
+ onMouseenter: R,
1207
+ onMouseleave: T
1208
+ }, [
1209
+ _(k.$slots, "menu-trigger", {}, () => [
1210
+ L[0] || (L[0] = e("div", { class: "menu-indicator" }, [
1211
+ e("span", { class: "hamburger-icon" }, [
1212
+ e("span"),
1213
+ e("span"),
1214
+ e("span")
1215
+ ])
1216
+ ], -1))
1217
+ ], !0)
1218
+ ], 32),
1219
+ _(k.$slots, "logo", {}, () => [
1220
+ e("div", go, [
1221
+ L[1] || (L[1] = e("div", { class: "logo-glow" }, null, -1)),
1222
+ h.logoType === "video" ? (n(), r("video", {
1223
+ key: 0,
1224
+ src: h.logoSrc,
1225
+ width: h.logoSize || 36,
1226
+ height: h.logoSize || 36,
1227
+ autoplay: "",
1228
+ loop: "",
1229
+ muted: "",
1230
+ playsinline: "",
1231
+ class: "logo-video"
1232
+ }, " 您的浏览器不支持 video 标签。 ", 8, fo)) : (n(), r("img", {
1233
+ key: 1,
1234
+ src: h.logoSrc,
1235
+ width: h.logoSize || 36,
1236
+ height: h.logoSize || 36,
1237
+ class: "logo-video"
1238
+ }, null, 8, _o))
1239
+ ]),
1240
+ e("div", yo, [
1241
+ e("span", wo, $(h.name), 1),
1242
+ e("span", bo, $(h.subtitle), 1)
1243
+ ]),
1244
+ L[2] || (L[2] = e("div", { class: "navbar-divider" }, null, -1))
1245
+ ], !0)
1246
+ ]),
1247
+ _(k.$slots, "header-extra", {}, void 0, !0)
1248
+ ], 2),
1249
+ u.value ? (n(), r("div", {
1250
+ key: 0,
1251
+ class: "tags-view-container",
1252
+ style: he({ height: `${c.value}px` })
1253
+ }, [
1254
+ _(k.$slots, "tags-view", {}, void 0, !0)
1255
+ ], 4)) : x("", !0),
1256
+ e("div", {
1257
+ class: A(["drawer-menu", [
1258
+ o(m) ? "dark-theme" : "light-theme",
1259
+ { visible: w.value }
1260
+ ]]),
1261
+ onMouseenter: R,
1262
+ onMouseleave: T
1263
+ }, [
1264
+ _(k.$slots, "drawer-menu", {}, () => [
1265
+ L[3] || (L[3] = e("div", { class: "drawer-header" }, [
1266
+ e("div", { class: "drawer-title" }, [
1267
+ e("span", { class: "grid-icon" }, [
1268
+ e("span"),
1269
+ e("span"),
1270
+ e("span"),
1271
+ e("span")
1272
+ ]),
1273
+ e("span", null, "功能导航")
1274
+ ])
1275
+ ], -1)),
1276
+ e("div", ko, [
1277
+ e("div", $o, [
1278
+ (n(!0), r(E, null, W(a.value, (F) => (n(), r("div", {
1279
+ key: F.path,
1280
+ class: "menu-category"
1281
+ }, [
1282
+ e("div", {
1283
+ class: "category-header",
1284
+ onClick: (B) => H(F)
1285
+ }, [
1286
+ F.meta?.icon ? (n(), S(N(o(b)), {
1287
+ key: 0,
1288
+ name: F.meta.icon,
1289
+ size: 18
1290
+ }, null, 8, ["name"])) : x("", !0),
1291
+ e("span", null, $(F.meta?.title), 1)
1292
+ ], 8, Co),
1293
+ F.children && F.children.length > 0 ? (n(), r("div", xo, [
1294
+ (n(!0), r(E, null, W(F.children, (B) => (n(), r("div", {
1295
+ key: B.path,
1296
+ class: "menu-item",
1297
+ onClick: (G) => H(B)
1298
+ }, [
1299
+ B.meta?.icon ? (n(), S(N(o(b)), {
1300
+ key: 0,
1301
+ name: B.meta.icon,
1302
+ size: 16
1303
+ }, null, 8, ["name"])) : x("", !0),
1304
+ e("span", To, $(B.meta?.title), 1)
1305
+ ], 8, So))), 128)),
1306
+ (n(!0), r(E, null, W(F.children, (B) => (n(), r(E, {
1307
+ key: "sub-" + B.path
1308
+ }, [
1309
+ B.children && B.children.length > 0 ? (n(), r("div", Mo, [
1310
+ e("div", Io, $(B.meta?.title), 1),
1311
+ (n(!0), r(E, null, W(B.children, (G) => (n(), r("div", {
1312
+ key: G.path,
1313
+ class: "menu-item submenu-item",
1314
+ onClick: (I) => H(G)
1315
+ }, [
1316
+ G.meta?.icon ? (n(), S(N(o(b)), {
1317
+ key: 0,
1318
+ name: G.meta.icon,
1319
+ size: 14
1320
+ }, null, 8, ["name"])) : x("", !0),
1321
+ e("span", Vo, $(G.meta?.title), 1)
1322
+ ], 8, zo))), 128))
1323
+ ])) : x("", !0)
1324
+ ], 64))), 128))
1325
+ ])) : x("", !0)
1326
+ ]))), 128))
1327
+ ])
1328
+ ])
1329
+ ], !0)
1330
+ ], 34),
1331
+ e("div", Ho, [
1332
+ v(o(ne), { class: "content-layout" }, {
1333
+ default: l(() => [
1334
+ v(o(ce), { class: "main-content p16px app-content" }, {
1335
+ default: l(() => [
1336
+ e("div", Ro, [
1337
+ v(j, null, {
1338
+ default: l(({ Component: F, route: B }) => [
1339
+ v(Q, {
1340
+ name: g.value,
1341
+ mode: "out-in"
1342
+ }, {
1343
+ default: l(() => [
1344
+ (n(), S(ue, {
1345
+ include: o(y),
1346
+ max: o(s)
1347
+ }, [
1348
+ (n(), S(N(F), {
1349
+ key: B.path
1350
+ }))
1351
+ ], 1032, ["include", "max"]))
1352
+ ]),
1353
+ _: 2
1354
+ }, 1032, ["name"])
1355
+ ]),
1356
+ _: 1
1357
+ })
1358
+ ])
1359
+ ]),
1360
+ _: 1
1361
+ }),
1362
+ C.value ? _(k.$slots, "footer", { key: 0 }, void 0, !0) : x("", !0)
1363
+ ]),
1364
+ _: 3
1365
+ })
1366
+ ])
1367
+ ]);
1368
+ };
1369
+ }
1370
+ }), Lo = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-3e4915c5"]]), Do = {
1371
+ key: 6,
1372
+ class: "layout-coming-soon"
1373
+ }, jn = /* @__PURE__ */ O({
1374
+ name: "C_LayoutContainer",
1375
+ __name: "index",
1376
+ setup(f) {
1377
+ const i = ze(), y = X(), s = z(() => i.layoutMode), p = y.isDark, m = V(!1);
1378
+ return He("menuCollapse", {
1379
+ isCollapsed: m,
1380
+ handleCollapsedChange: (a) => {
1381
+ m.value = a;
1382
+ }
1383
+ }), (a, u) => (n(), r("div", {
1384
+ class: A(["layout-container", o(p) ? "dark-mode" : "light-mode"])
1385
+ }, [
1386
+ s.value === "side" ? (n(), S(qe, {
1387
+ key: 0,
1388
+ collapsed: m.value,
1389
+ "onUpdate:collapsed": u[0] || (u[0] = (c) => m.value = c)
1390
+ }, le({
1391
+ menu: l(() => [
1392
+ _(a.$slots, "menu", { collapsed: m.value })
1393
+ ]),
1394
+ header: l(() => [
1395
+ _(a.$slots, "header")
1396
+ ]),
1397
+ footer: l(() => [
1398
+ _(a.$slots, "footer")
1399
+ ]),
1400
+ _: 2
1401
+ }, [
1402
+ a.$slots.logo ? {
1403
+ name: "logo",
1404
+ fn: l(() => [
1405
+ _(a.$slots, "logo")
1406
+ ]),
1407
+ key: "0"
1408
+ } : void 0
1409
+ ]), 1032, ["collapsed"])) : s.value === "top" ? (n(), S(mt, { key: 1 }, le({ _: 2 }, [
1410
+ a.$slots.logo ? {
1411
+ name: "logo",
1412
+ fn: l(() => [
1413
+ _(a.$slots, "logo")
1414
+ ]),
1415
+ key: "0"
1416
+ } : void 0,
1417
+ a.$slots["top-menu"] ? {
1418
+ name: "menu",
1419
+ fn: l(() => [
1420
+ _(a.$slots, "top-menu")
1421
+ ]),
1422
+ key: "1"
1423
+ } : void 0,
1424
+ a.$slots["header-extra"] ? {
1425
+ name: "header-extra",
1426
+ fn: l(() => [
1427
+ _(a.$slots, "header-extra")
1428
+ ]),
1429
+ key: "2"
1430
+ } : void 0,
1431
+ a.$slots["tags-view"] ? {
1432
+ name: "tags-view",
1433
+ fn: l(() => [
1434
+ _(a.$slots, "tags-view")
1435
+ ]),
1436
+ key: "3"
1437
+ } : void 0,
1438
+ a.$slots.footer ? {
1439
+ name: "footer",
1440
+ fn: l(() => [
1441
+ _(a.$slots, "footer")
1442
+ ]),
1443
+ key: "4"
1444
+ } : void 0
1445
+ ]), 1024)) : s.value === "mix" ? (n(), S(Mt, { key: 2 }, le({
1446
+ header: l(() => [
1447
+ _(a.$slots, "header")
1448
+ ]),
1449
+ _: 2
1450
+ }, [
1451
+ a.$slots.logo ? {
1452
+ name: "logo",
1453
+ fn: l(() => [
1454
+ _(a.$slots, "logo")
1455
+ ]),
1456
+ key: "0"
1457
+ } : void 0,
1458
+ a.$slots.footer ? {
1459
+ name: "footer",
1460
+ fn: l(() => [
1461
+ _(a.$slots, "footer")
1462
+ ]),
1463
+ key: "1"
1464
+ } : void 0
1465
+ ]), 1024)) : s.value === "mix-top" ? (n(), S(jt, { key: 3 }, le({ _: 2 }, [
1466
+ a.$slots.logo ? {
1467
+ name: "logo",
1468
+ fn: l(() => [
1469
+ _(a.$slots, "logo")
1470
+ ]),
1471
+ key: "0"
1472
+ } : void 0,
1473
+ a.$slots.brand ? {
1474
+ name: "brand",
1475
+ fn: l(() => [
1476
+ _(a.$slots, "brand")
1477
+ ]),
1478
+ key: "1"
1479
+ } : void 0,
1480
+ a.$slots["top-menu"] ? {
1481
+ name: "top-menu",
1482
+ fn: l(() => [
1483
+ _(a.$slots, "top-menu")
1484
+ ]),
1485
+ key: "2"
1486
+ } : void 0,
1487
+ a.$slots["header-extra"] ? {
1488
+ name: "header-extra",
1489
+ fn: l(() => [
1490
+ _(a.$slots, "header-extra")
1491
+ ]),
1492
+ key: "3"
1493
+ } : void 0,
1494
+ a.$slots["tags-view"] ? {
1495
+ name: "tags-view",
1496
+ fn: l(() => [
1497
+ _(a.$slots, "tags-view")
1498
+ ]),
1499
+ key: "4"
1500
+ } : void 0,
1501
+ a.$slots.footer ? {
1502
+ name: "footer",
1503
+ fn: l(() => [
1504
+ _(a.$slots, "footer")
1505
+ ]),
1506
+ key: "5"
1507
+ } : void 0
1508
+ ]), 1024)) : s.value === "reverse-horizontal-mix" ? (n(), S(vo, { key: 4 }, le({ _: 2 }, [
1509
+ a.$slots.logo ? {
1510
+ name: "logo",
1511
+ fn: l(() => [
1512
+ _(a.$slots, "logo")
1513
+ ]),
1514
+ key: "0"
1515
+ } : void 0,
1516
+ a.$slots["top-menu"] ? {
1517
+ name: "top-menu",
1518
+ fn: l(() => [
1519
+ _(a.$slots, "top-menu")
1520
+ ]),
1521
+ key: "1"
1522
+ } : void 0,
1523
+ a.$slots["header-extra"] ? {
1524
+ name: "header-extra",
1525
+ fn: l(() => [
1526
+ _(a.$slots, "header-extra")
1527
+ ]),
1528
+ key: "2"
1529
+ } : void 0,
1530
+ a.$slots["tags-view"] ? {
1531
+ name: "tags-view",
1532
+ fn: l(() => [
1533
+ _(a.$slots, "tags-view")
1534
+ ]),
1535
+ key: "3"
1536
+ } : void 0,
1537
+ a.$slots.footer ? {
1538
+ name: "footer",
1539
+ fn: l(() => [
1540
+ _(a.$slots, "footer")
1541
+ ]),
1542
+ key: "4"
1543
+ } : void 0
1544
+ ]), 1024)) : s.value === "card-layout" ? (n(), S(Lo, { key: 5 }, le({ _: 2 }, [
1545
+ a.$slots["menu-trigger"] ? {
1546
+ name: "menu-trigger",
1547
+ fn: l(() => [
1548
+ _(a.$slots, "menu-trigger")
1549
+ ]),
1550
+ key: "0"
1551
+ } : void 0,
1552
+ a.$slots.logo ? {
1553
+ name: "logo",
1554
+ fn: l(() => [
1555
+ _(a.$slots, "logo")
1556
+ ]),
1557
+ key: "1"
1558
+ } : void 0,
1559
+ a.$slots["header-extra"] ? {
1560
+ name: "header-extra",
1561
+ fn: l(() => [
1562
+ _(a.$slots, "header-extra")
1563
+ ]),
1564
+ key: "2"
1565
+ } : void 0,
1566
+ a.$slots["tags-view"] ? {
1567
+ name: "tags-view",
1568
+ fn: l(() => [
1569
+ _(a.$slots, "tags-view")
1570
+ ]),
1571
+ key: "3"
1572
+ } : void 0,
1573
+ a.$slots["drawer-menu"] ? {
1574
+ name: "drawer-menu",
1575
+ fn: l(() => [
1576
+ _(a.$slots, "drawer-menu")
1577
+ ]),
1578
+ key: "4"
1579
+ } : void 0,
1580
+ a.$slots.footer ? {
1581
+ name: "footer",
1582
+ fn: l(() => [
1583
+ _(a.$slots, "footer")
1584
+ ]),
1585
+ key: "5"
1586
+ } : void 0
1587
+ ]), 1024)) : (n(), r("div", Do, [...u[1] || (u[1] = [
1588
+ e("div", { class: "coming-soon-content" }, [
1589
+ e("div", { class: "coming-soon-icon" }, "🚧"),
1590
+ e("div", { class: "coming-soon-title" }, "布局开发中")
1591
+ ], -1)
1592
+ ])]))
1593
+ ], 2));
1594
+ }
1595
+ }), No = [
221
1596
  {
222
1597
  label: "左侧菜单(默认)",
223
1598
  value: "side",
@@ -280,199 +1655,199 @@ const Ce = X(), Te = [
280
1655
  <rect x="32" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.4"/>
281
1656
  `
282
1657
  }
283
- ], ke = { class: "settings-section" }, Se = { class: "preset-grid" }, Me = ["onClick"], Re = { class: "preset-icon" }, He = { class: "preset-name" }, Ve = { class: "preset-color" }, Be = { class: "settings-section" }, Ue = { class: "settings-section" }, _e = { class: "color-picker-wrapper" }, Ee = { class: "color-value" }, We = { class: "settings-section" }, Ie = { class: "settings-section" }, Oe = { class: "flex items-center justify-between mb-2" }, Pe = { class: "settings-section" }, Ne = { class: "settings-section" }, Le = { class: "layout-grid" }, De = ["onClick"], Ae = { class: "layout-screenshot" }, Fe = {
1658
+ ], Eo = { class: "settings-section" }, Bo = { class: "preset-grid" }, Fo = ["onClick"], Wo = { class: "preset-icon" }, Oo = { class: "preset-name" }, Uo = { class: "preset-color" }, Po = { class: "settings-section" }, jo = { class: "settings-section" }, Ko = { class: "color-picker-wrapper" }, Yo = { class: "color-value" }, Go = { class: "settings-section" }, Xo = { class: "settings-section" }, Jo = { class: "flex items-center justify-between mb-2" }, Zo = { class: "settings-section" }, qo = { class: "settings-section" }, Qo = { class: "layout-grid" }, es = ["onClick"], ts = { class: "layout-screenshot" }, os = {
284
1659
  class: "layout-svg",
285
1660
  viewBox: "0 0 56 48",
286
1661
  fill: "none",
287
1662
  xmlns: "http://www.w3.org/2000/svg"
288
- }, $e = ["innerHTML"], ze = { class: "layout-label" }, je = {
1663
+ }, ss = ["innerHTML"], ns = { class: "layout-label" }, as = {
289
1664
  key: 0,
290
1665
  class: "badge-soon"
291
- }, Je = { class: "settings-section" }, Ke = { class: "setting-item" }, Ge = { class: "setting-item" }, Ye = { class: "setting-item" }, Ze = { class: "setting-item" }, qe = { class: "settings-section" }, Qe = { class: "slider-item" }, Xe = { class: "slider-label" }, et = { class: "slider-value" }, tt = { class: "slider-item" }, st = { class: "slider-label" }, ot = { class: "slider-value" }, lt = { class: "settings-section" }, it = { class: "settings-section" }, at = { class: "action-buttons-grid" }, nt = { class: "settings-section" }, rt = { class: "action-buttons-grid" }, dt = { class: "settings-section" }, ut = { class: "setting-item" }, ct = { class: "setting-item" }, vt = { class: "settings-section" }, pt = { class: "setting-item" }, mt = {
1666
+ }, is = { class: "settings-section" }, ls = { class: "setting-item" }, rs = { class: "setting-item" }, ds = { class: "setting-item" }, us = { class: "setting-item" }, cs = { class: "settings-section" }, ms = { class: "slider-item" }, vs = { class: "slider-label" }, hs = { class: "slider-value" }, ps = { class: "slider-item" }, gs = { class: "slider-label" }, fs = { class: "slider-value" }, _s = { class: "settings-section" }, ys = { class: "settings-section" }, ws = { class: "action-buttons-grid" }, bs = { class: "settings-section" }, ks = { class: "action-buttons-grid" }, $s = { class: "settings-section" }, Cs = { class: "setting-item" }, xs = { class: "setting-item" }, Ss = { class: "settings-section" }, Ts = { class: "setting-item" }, Ms = {
292
1667
  key: 0,
293
1668
  class: "mt-2"
294
- }, gt = { class: "settings-section" }, ft = { class: "system-info" }, yt = { class: "info-item" }, ht = { class: "info-value" }, bt = { class: "info-item" }, wt = { class: "info-value" }, xt = { class: "info-item" }, Ct = { class: "info-value" }, Tt = { class: "info-item" }, kt = { class: "info-value" }, St = { class: "info-item" }, Mt = { class: "info-value" }, Rt = { class: "info-item" }, Ht = { class: "info-value" }, Vt = /* @__PURE__ */ oe({
1669
+ }, Is = { class: "settings-section" }, zs = { class: "system-info" }, Vs = { class: "info-item" }, Hs = { class: "info-value" }, Rs = { class: "info-item" }, As = { class: "info-value" }, Ls = { class: "info-item" }, Ds = { class: "info-value" }, Ns = { class: "info-item" }, Es = { class: "info-value" }, Bs = { class: "info-item" }, Fs = { class: "info-value" }, Ws = { class: "info-item" }, Os = { class: "info-value" }, Us = /* @__PURE__ */ O({
295
1670
  __name: "index",
296
1671
  props: {
297
1672
  show: { type: Boolean, default: !1 },
298
1673
  showModifiers: {}
299
1674
  },
300
1675
  emits: ["update:show"],
301
- setup(b) {
302
- const u = de(), p = ue(), s = Ce(), w = le(b, "show"), g = d("appearance"), x = d(!1), f = d(!1), y = d(!1), k = d("Robot Admin");
303
- let m = null;
304
- const O = (i) => {
305
- m && (document.body.removeChild(m), m = null);
306
- const e = document.createElement("canvas"), o = e.getContext("2d");
307
- e.width = 200, e.height = 150, o.font = "14px Microsoft JhengHei", o.fillStyle = "rgba(120, 120, 120, 0.15)", o.rotate(-20 * Math.PI / 180), o.fillText(i, 0, 80), m = document.createElement("div"), m.style.cssText = `
1676
+ setup(f) {
1677
+ const i = Be(), y = Fe(), s = ze(), p = Re(f, "show"), m = V("appearance"), a = V(!1), u = V(!1), c = V(!1), C = V("Robot Admin");
1678
+ let g = null;
1679
+ const h = (I) => {
1680
+ g && (document.body.removeChild(g), g = null);
1681
+ const t = document.createElement("canvas"), d = t.getContext("2d");
1682
+ t.width = 200, t.height = 150, d.font = "14px Microsoft JhengHei", d.fillStyle = "rgba(120, 120, 120, 0.15)", d.rotate(-20 * Math.PI / 180), d.fillText(I, 0, 80), g = document.createElement("div"), g.style.cssText = `
308
1683
  position: fixed;
309
1684
  top: 0;
310
1685
  left: 0;
311
1686
  width: 100%;
312
1687
  height: 100%;
313
1688
  pointer-events: none;
314
- background-image: url(${e.toDataURL()});
1689
+ background-image: url(${t.toDataURL()});
315
1690
  background-repeat: repeat;
316
1691
  z-index: 9999;
317
1692
  user-select: none;
318
- `, document.body.appendChild(m);
319
- }, V = () => {
320
- m && (document.body.removeChild(m), m = null);
1693
+ `, document.body.appendChild(g);
1694
+ }, w = () => {
1695
+ g && (document.body.removeChild(g), g = null);
321
1696
  };
322
- $(x, (i) => {
323
- document.documentElement.classList.toggle("gray-mode", i);
324
- }), $(f, (i) => {
325
- document.documentElement.classList.toggle("color-weak-mode", i);
326
- }), $(y, (i) => {
327
- i ? O(k.value) : V();
328
- }), $(k, (i) => {
329
- y.value && O(i);
1697
+ q(a, (I) => {
1698
+ document.documentElement.classList.toggle("gray-mode", I);
1699
+ }), q(u, (I) => {
1700
+ document.documentElement.classList.toggle("color-weak-mode", I);
1701
+ }), q(c, (I) => {
1702
+ I ? h(C.value) : w();
1703
+ }), q(C, (I) => {
1704
+ c.value && h(I);
330
1705
  });
331
- const S = F(() => {
332
- const i = navigator.userAgent;
333
- let e = "Unknown", o = "Unknown";
334
- return i.includes("Chrome") ? e = "Chrome" : i.includes("Firefox") ? e = "Firefox" : i.includes("Safari") ? e = "Safari" : i.includes("Edge") && (e = "Edge"), i.includes("Windows") ? o = "Windows" : i.includes("Mac") ? o = "macOS" : i.includes("Linux") ? o = "Linux" : i.includes("Android") ? o = "Android" : i.includes("iOS") && (o = "iOS"), {
335
- browser: e,
336
- os: o,
1706
+ const M = z(() => {
1707
+ const I = navigator.userAgent;
1708
+ let t = "Unknown", d = "Unknown";
1709
+ return I.includes("Chrome") ? t = "Chrome" : I.includes("Firefox") ? t = "Firefox" : I.includes("Safari") ? t = "Safari" : I.includes("Edge") && (t = "Edge"), I.includes("Windows") ? d = "Windows" : I.includes("Mac") ? d = "macOS" : I.includes("Linux") ? d = "Linux" : I.includes("Android") ? d = "Android" : I.includes("iOS") && (d = "iOS"), {
1710
+ browser: t,
1711
+ os: d,
337
1712
  resolution: `${window.screen.width} × ${window.screen.height}`,
338
1713
  pixelRatio: window.devicePixelRatio + "x",
339
1714
  language: navigator.language,
340
1715
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
341
1716
  };
342
1717
  });
343
- ie(() => {
344
- V();
1718
+ be(() => {
1719
+ w();
345
1720
  });
346
- const P = (i, e) => {
347
- e || (s.layoutMode = i);
348
- }, B = (i) => s.primaryColor === i.primaryColor, N = (i) => {
349
- s.applyPreset(i), u.success(`已应用「${i.name}」主题方案`);
1721
+ const T = (I, t) => {
1722
+ t || (s.layoutMode = I);
1723
+ }, R = (I) => s.primaryColor === I.primaryColor, H = (I) => {
1724
+ s.applyPreset(I), i.success(`已应用「${I.name}」主题方案`);
1725
+ }, b = () => {
1726
+ s.themeMode = P.themeMode, s.primaryColor = P.primaryColor, s.borderRadius = P.borderRadius, s.transitionType = P.transitionType, s.enableTransition = P.enableTransition, i.success("已恢复外观默认设置");
1727
+ }, k = () => {
1728
+ s.layoutMode = P.layoutMode, s.fixedHeader = P.fixedHeader, s.showBreadcrumb = P.showBreadcrumb, s.showBreadcrumbIcon = P.showBreadcrumbIcon, s.showTagsView = P.showTagsView, s.tagsViewHeight = P.tagsViewHeight, s.tagsViewStyle = P.tagsViewStyle, s.showFooter = P.showFooter, s.sidebarWidth = P.sidebarWidth, s.sidebarCollapsedWidth = P.sidebarCollapsedWidth, s.headerHeight = P.headerHeight, i.success("已恢复布局默认设置");
350
1729
  }, L = () => {
351
- s.themeMode = v.themeMode, s.primaryColor = v.primaryColor, s.borderRadius = v.borderRadius, s.transitionType = v.transitionType, s.enableTransition = v.enableTransition, u.success("已恢复外观默认设置");
352
- }, U = () => {
353
- s.layoutMode = v.layoutMode, s.fixedHeader = v.fixedHeader, s.showBreadcrumb = v.showBreadcrumb, s.showBreadcrumbIcon = v.showBreadcrumbIcon, s.showTagsView = v.showTagsView, s.tagsViewHeight = v.tagsViewHeight, s.tagsViewStyle = v.tagsViewStyle, s.showFooter = v.showFooter, s.sidebarWidth = v.sidebarWidth, s.sidebarCollapsedWidth = v.sidebarCollapsedWidth, s.headerHeight = v.headerHeight, u.success("已恢复布局默认设置");
354
- }, _ = () => {
355
- p.warning({
1730
+ y.warning({
356
1731
  title: "确认重置",
357
1732
  content: "确定要恢复默认配置吗?此操作不可撤销。",
358
1733
  positiveText: "确认",
359
1734
  negativeText: "取消",
360
1735
  onPositiveClick: () => {
361
- s.resetSettings(), u.success("已恢复默认配置");
1736
+ s.resetSettings(), i.success("已恢复默认配置");
362
1737
  }
363
1738
  });
364
- }, E = () => {
365
- p.warning({
1739
+ }, j = () => {
1740
+ y.warning({
366
1741
  title: "确认清除",
367
1742
  content: "确定要清除浏览器缓存吗?",
368
1743
  positiveText: "确认",
369
1744
  negativeText: "取消",
370
1745
  onPositiveClick: () => {
371
- const i = ["theme-mode", "robot-admin-settings"];
372
- Object.keys(localStorage).forEach((o) => {
373
- i.includes(o) || localStorage.removeItem(o);
374
- }), sessionStorage.clear(), u.success("缓存已清除");
1746
+ const I = ["theme-mode", "robot-admin-settings"];
1747
+ Object.keys(localStorage).forEach((d) => {
1748
+ I.includes(d) || localStorage.removeItem(d);
1749
+ }), sessionStorage.clear(), i.success("缓存已清除");
375
1750
  }
376
1751
  });
377
- }, D = () => {
1752
+ }, F = () => {
378
1753
  location.reload();
379
- }, z = () => {
380
- const i = {
1754
+ }, B = () => {
1755
+ const I = {
381
1756
  settings: s.settingsState,
382
- gray: x.value,
383
- colorWeak: f.value,
1757
+ gray: a.value,
1758
+ colorWeak: u.value,
384
1759
  watermark: {
385
- enabled: y.value,
386
- text: k.value
1760
+ enabled: c.value,
1761
+ text: C.value
387
1762
  },
388
1763
  exportTime: (/* @__PURE__ */ new Date()).toISOString()
389
- }, e = new Blob([JSON.stringify(i, null, 2)], {
1764
+ }, t = new Blob([JSON.stringify(I, null, 2)], {
390
1765
  type: "application/json"
391
- }), o = URL.createObjectURL(e), C = document.createElement("a");
392
- C.href = o, C.download = `robot-admin-config-${Date.now()}.json`, C.click(), URL.revokeObjectURL(o), u.success("配置已导出");
393
- }, A = () => {
394
- const i = document.createElement("input");
395
- i.type = "file", i.accept = "application/json", i.onchange = async (e) => {
396
- const o = e.target.files?.[0];
397
- if (o)
1766
+ }), d = URL.createObjectURL(t), K = document.createElement("a");
1767
+ K.href = d, K.download = `robot-admin-config-${Date.now()}.json`, K.click(), URL.revokeObjectURL(d), i.success("配置已导出");
1768
+ }, G = () => {
1769
+ const I = document.createElement("input");
1770
+ I.type = "file", I.accept = "application/json", I.onchange = async (t) => {
1771
+ const d = t.target.files?.[0];
1772
+ if (d)
398
1773
  try {
399
- const C = await o.text(), T = JSON.parse(C);
400
- T.settings && s.$patch(T.settings), T.gray !== void 0 && (x.value = T.gray), T.colorWeak !== void 0 && (f.value = T.colorWeak), T.watermark && (y.value = T.watermark.enabled, k.value = T.watermark.text), u.success("配置已导入");
1774
+ const K = await d.text(), Y = JSON.parse(K);
1775
+ Y.settings && s.$patch(Y.settings), Y.gray !== void 0 && (a.value = Y.gray), Y.colorWeak !== void 0 && (u.value = Y.colorWeak), Y.watermark && (c.value = Y.watermark.enabled, C.value = Y.watermark.text), i.success("配置已导入");
401
1776
  } catch {
402
- u.error("配置文件格式错误");
1777
+ i.error("配置文件格式错误");
403
1778
  }
404
- }, i.click();
1779
+ }, I.click();
405
1780
  };
406
- return (i, e) => (R(), ae(l(ce), {
407
- show: w.value,
408
- "onUpdate:show": e[16] || (e[16] = (o) => w.value = o),
1781
+ return (I, t) => (n(), S(o(We), {
1782
+ show: p.value,
1783
+ "onUpdate:show": t[16] || (t[16] = (d) => p.value = d),
409
1784
  width: 380,
410
1785
  placement: "right",
411
1786
  "trap-focus": !1,
412
1787
  "block-scroll": !1
413
1788
  }, {
414
- default: n(() => [
415
- a(l(ve), {
1789
+ default: l(() => [
1790
+ v(o(Oe), {
416
1791
  title: "⚙️ 布局配置",
417
1792
  closable: ""
418
1793
  }, {
419
- default: n(() => [
420
- a(l(pe), {
421
- value: g.value,
422
- "onUpdate:value": e[15] || (e[15] = (o) => g.value = o),
1794
+ default: l(() => [
1795
+ v(o(Ue), {
1796
+ value: m.value,
1797
+ "onUpdate:value": t[15] || (t[15] = (d) => m.value = d),
423
1798
  animated: "",
424
1799
  class: "settings-tabs"
425
1800
  }, {
426
- default: n(() => [
427
- a(l(j), {
1801
+ default: l(() => [
1802
+ v(o(_e), {
428
1803
  name: "appearance",
429
1804
  tab: "🎨 外观"
430
1805
  }, {
431
- default: n(() => [
432
- t("div", ke, [
433
- t("div", Se, [
434
- (R(!0), W(K, null, G(l(he), (o) => (R(), W("div", {
435
- key: o.name,
436
- class: Y(["preset-card", { active: B(o) }]),
437
- onClick: (C) => N(o)
1806
+ default: l(() => [
1807
+ e("div", Eo, [
1808
+ e("div", Bo, [
1809
+ (n(!0), r(E, null, W(o(Ye), (d) => (n(), r("div", {
1810
+ key: d.name,
1811
+ class: A(["preset-card", { active: R(d) }]),
1812
+ onClick: (K) => H(d)
438
1813
  }, [
439
- t("div", Re, h(o.icon), 1),
440
- t("div", He, h(o.name), 1),
441
- t("div", Ve, [
442
- t("span", {
1814
+ e("div", Wo, $(d.icon), 1),
1815
+ e("div", Oo, $(d.name), 1),
1816
+ e("div", Uo, [
1817
+ e("span", {
443
1818
  class: "color-dot",
444
- style: ne({ backgroundColor: o.primaryColor })
1819
+ style: he({ backgroundColor: d.primaryColor })
445
1820
  }, null, 4)
446
1821
  ])
447
- ], 10, Me))), 128))
1822
+ ], 10, Fo))), 128))
448
1823
  ])
449
1824
  ]),
450
- t("div", Be, [
451
- e[20] || (e[20] = t("div", { class: "section-title" }, "主题模式", -1)),
452
- a(l(J), {
453
- value: l(s).themeMode,
454
- "onUpdate:value": e[0] || (e[0] = (o) => l(s).themeMode = o),
1825
+ e("div", Po, [
1826
+ t[20] || (t[20] = e("div", { class: "section-title" }, "主题模式", -1)),
1827
+ v(o(ye), {
1828
+ value: o(s).themeMode,
1829
+ "onUpdate:value": t[0] || (t[0] = (d) => o(s).themeMode = d),
455
1830
  class: "mode-group"
456
1831
  }, {
457
- default: n(() => [
458
- a(l(M), { value: "light" }, {
459
- default: n(() => [...e[17] || (e[17] = [
460
- t("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1),
461
- c(" 浅色 ", -1)
1832
+ default: l(() => [
1833
+ v(o(Z), { value: "light" }, {
1834
+ default: l(() => [...t[17] || (t[17] = [
1835
+ e("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1),
1836
+ U(" 浅色 ", -1)
462
1837
  ])]),
463
1838
  _: 1
464
1839
  }),
465
- a(l(M), { value: "dark" }, {
466
- default: n(() => [...e[18] || (e[18] = [
467
- t("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1),
468
- c(" 深色 ", -1)
1840
+ v(o(Z), { value: "dark" }, {
1841
+ default: l(() => [...t[18] || (t[18] = [
1842
+ e("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1),
1843
+ U(" 深色 ", -1)
469
1844
  ])]),
470
1845
  _: 1
471
1846
  }),
472
- a(l(M), { value: "auto" }, {
473
- default: n(() => [...e[19] || (e[19] = [
474
- t("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1),
475
- c(" 自动 ", -1)
1847
+ v(o(Z), { value: "auto" }, {
1848
+ default: l(() => [...t[19] || (t[19] = [
1849
+ e("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1),
1850
+ U(" 自动 ", -1)
476
1851
  ])]),
477
1852
  _: 1
478
1853
  })
@@ -480,42 +1855,42 @@ const Ce = X(), Te = [
480
1855
  _: 1
481
1856
  }, 8, ["value"])
482
1857
  ]),
483
- t("div", Ue, [
484
- e[21] || (e[21] = t("div", { class: "section-title" }, "主题色", -1)),
485
- t("div", _e, [
486
- a(l(me), {
487
- value: l(s).primaryColor,
488
- "onUpdate:value": e[1] || (e[1] = (o) => l(s).primaryColor = o),
1858
+ e("div", jo, [
1859
+ t[21] || (t[21] = e("div", { class: "section-title" }, "主题色", -1)),
1860
+ e("div", Ko, [
1861
+ v(o(Pe), {
1862
+ value: o(s).primaryColor,
1863
+ "onUpdate:value": t[1] || (t[1] = (d) => o(s).primaryColor = d),
489
1864
  "show-alpha": !1,
490
- swatches: l(xe),
1865
+ swatches: o(Je),
491
1866
  actions: ["confirm"]
492
1867
  }, null, 8, ["value", "swatches"]),
493
- t("span", Ee, h(l(s).primaryColor), 1)
1868
+ e("span", Yo, $(o(s).primaryColor), 1)
494
1869
  ])
495
1870
  ]),
496
- t("div", We, [
497
- e[25] || (e[25] = t("div", { class: "section-title" }, "圆角大小", -1)),
498
- a(l(J), {
499
- value: l(s).borderRadius,
500
- "onUpdate:value": e[2] || (e[2] = (o) => l(s).borderRadius = o),
1871
+ e("div", Go, [
1872
+ t[25] || (t[25] = e("div", { class: "section-title" }, "圆角大小", -1)),
1873
+ v(o(ye), {
1874
+ value: o(s).borderRadius,
1875
+ "onUpdate:value": t[2] || (t[2] = (d) => o(s).borderRadius = d),
501
1876
  class: "radius-group"
502
1877
  }, {
503
- default: n(() => [
504
- a(l(M), { value: "small" }, {
505
- default: n(() => [...e[22] || (e[22] = [
506
- c("小 (4px)", -1)
1878
+ default: l(() => [
1879
+ v(o(Z), { value: "small" }, {
1880
+ default: l(() => [...t[22] || (t[22] = [
1881
+ U("小 (4px)", -1)
507
1882
  ])]),
508
1883
  _: 1
509
1884
  }),
510
- a(l(M), { value: "medium" }, {
511
- default: n(() => [...e[23] || (e[23] = [
512
- c("中 (6px)", -1)
1885
+ v(o(Z), { value: "medium" }, {
1886
+ default: l(() => [...t[23] || (t[23] = [
1887
+ U("中 (6px)", -1)
513
1888
  ])]),
514
1889
  _: 1
515
1890
  }),
516
- a(l(M), { value: "large" }, {
517
- default: n(() => [...e[24] || (e[24] = [
518
- c("大 (8px)", -1)
1891
+ v(o(Z), { value: "large" }, {
1892
+ default: l(() => [...t[24] || (t[24] = [
1893
+ U("大 (8px)", -1)
519
1894
  ])]),
520
1895
  _: 1
521
1896
  })
@@ -523,43 +1898,43 @@ const Ce = X(), Te = [
523
1898
  _: 1
524
1899
  }, 8, ["value"])
525
1900
  ]),
526
- t("div", Ie, [
527
- e[31] || (e[31] = t("div", { class: "section-title" }, "页面动画", -1)),
528
- t("div", Oe, [
529
- e[26] || (e[26] = t("span", { class: "text-sm" }, "启用动画", -1)),
530
- a(l(H), {
531
- value: l(s).enableTransition,
532
- "onUpdate:value": e[3] || (e[3] = (o) => l(s).enableTransition = o)
1901
+ e("div", Xo, [
1902
+ t[31] || (t[31] = e("div", { class: "section-title" }, "页面动画", -1)),
1903
+ e("div", Jo, [
1904
+ t[26] || (t[26] = e("span", { class: "text-sm" }, "启用动画", -1)),
1905
+ v(o(te), {
1906
+ value: o(s).enableTransition,
1907
+ "onUpdate:value": t[3] || (t[3] = (d) => o(s).enableTransition = d)
533
1908
  }, null, 8, ["value"])
534
1909
  ]),
535
- a(l(J), {
536
- value: l(s).transitionType,
537
- "onUpdate:value": e[4] || (e[4] = (o) => l(s).transitionType = o),
538
- disabled: !l(s).enableTransition,
1910
+ v(o(ye), {
1911
+ value: o(s).transitionType,
1912
+ "onUpdate:value": t[4] || (t[4] = (d) => o(s).transitionType = d),
1913
+ disabled: !o(s).enableTransition,
539
1914
  class: "transition-group"
540
1915
  }, {
541
- default: n(() => [
542
- a(l(M), { value: "fade" }, {
543
- default: n(() => [...e[27] || (e[27] = [
544
- c("淡入", -1)
1916
+ default: l(() => [
1917
+ v(o(Z), { value: "fade" }, {
1918
+ default: l(() => [...t[27] || (t[27] = [
1919
+ U("淡入", -1)
545
1920
  ])]),
546
1921
  _: 1
547
1922
  }),
548
- a(l(M), { value: "slide" }, {
549
- default: n(() => [...e[28] || (e[28] = [
550
- c("滑动", -1)
1923
+ v(o(Z), { value: "slide" }, {
1924
+ default: l(() => [...t[28] || (t[28] = [
1925
+ U("滑动", -1)
551
1926
  ])]),
552
1927
  _: 1
553
1928
  }),
554
- a(l(M), { value: "zoom" }, {
555
- default: n(() => [...e[29] || (e[29] = [
556
- c("缩放", -1)
1929
+ v(o(Z), { value: "zoom" }, {
1930
+ default: l(() => [...t[29] || (t[29] = [
1931
+ U("缩放", -1)
557
1932
  ])]),
558
1933
  _: 1
559
1934
  }),
560
- a(l(M), { value: "none" }, {
561
- default: n(() => [...e[30] || (e[30] = [
562
- c("无", -1)
1935
+ v(o(Z), { value: "none" }, {
1936
+ default: l(() => [...t[30] || (t[30] = [
1937
+ U("无", -1)
563
1938
  ])]),
564
1939
  _: 1
565
1940
  })
@@ -567,17 +1942,17 @@ const Ce = X(), Te = [
567
1942
  _: 1
568
1943
  }, 8, ["value", "disabled"])
569
1944
  ]),
570
- t("div", Pe, [
571
- a(l(I), {
1945
+ e("div", Zo, [
1946
+ v(o(oe), {
572
1947
  block: "",
573
1948
  secondary: "",
574
- onClick: L
1949
+ onClick: b
575
1950
  }, {
576
- icon: n(() => [...e[32] || (e[32] = [
577
- t("span", { class: "i-mdi:restore" }, null, -1)
1951
+ icon: l(() => [...t[32] || (t[32] = [
1952
+ e("span", { class: "i-mdi:restore" }, null, -1)
578
1953
  ])]),
579
- default: n(() => [
580
- e[33] || (e[33] = c(" 恢复外观默认设置 ", -1))
1954
+ default: l(() => [
1955
+ t[33] || (t[33] = U(" 恢复外观默认设置 ", -1))
581
1956
  ]),
582
1957
  _: 1
583
1958
  })
@@ -585,92 +1960,92 @@ const Ce = X(), Te = [
585
1960
  ]),
586
1961
  _: 1
587
1962
  }),
588
- a(l(j), {
1963
+ v(o(_e), {
589
1964
  name: "layout",
590
1965
  tab: "📐 布局"
591
1966
  }, {
592
- default: n(() => [
593
- t("div", Ne, [
594
- e[34] || (e[34] = t("div", { class: "section-title" }, "布局模式", -1)),
595
- t("div", Le, [
596
- (R(!0), W(K, null, G(l(Te), (o) => (R(), W("div", {
597
- key: o.value,
598
- class: Y(["layout-item", {
599
- active: l(s).layoutMode === o.value,
600
- disabled: o.disabled
1967
+ default: l(() => [
1968
+ e("div", qo, [
1969
+ t[34] || (t[34] = e("div", { class: "section-title" }, "布局模式", -1)),
1970
+ e("div", Qo, [
1971
+ (n(!0), r(E, null, W(o(No), (d) => (n(), r("div", {
1972
+ key: d.value,
1973
+ class: A(["layout-item", {
1974
+ active: o(s).layoutMode === d.value,
1975
+ disabled: d.disabled
601
1976
  }]),
602
- onClick: re((C) => P(o.value, o.disabled), ["stop"])
1977
+ onClick: Ae((K) => T(d.value, d.disabled), ["stop"])
603
1978
  }, [
604
- t("div", Ae, [
605
- (R(), W("svg", Fe, [
606
- t("g", {
607
- innerHTML: o.svg
608
- }, null, 8, $e)
1979
+ e("div", ts, [
1980
+ (n(), r("svg", os, [
1981
+ e("g", {
1982
+ innerHTML: d.svg
1983
+ }, null, 8, ss)
609
1984
  ]))
610
1985
  ]),
611
- t("div", ze, [
612
- c(h(o.label) + " ", 1),
613
- o.disabled ? (R(), W("span", je, "敬请期待")) : Z("", !0)
1986
+ e("div", ns, [
1987
+ U($(d.label) + " ", 1),
1988
+ d.disabled ? (n(), r("span", as, "敬请期待")) : x("", !0)
614
1989
  ])
615
- ], 10, De))), 128))
1990
+ ], 10, es))), 128))
616
1991
  ])
617
1992
  ]),
618
- t("div", Je, [
619
- e[39] || (e[39] = t("div", { class: "section-title" }, "界面元素", -1)),
620
- t("div", Ke, [
621
- e[35] || (e[35] = t("span", null, "显示面包屑", -1)),
622
- a(l(H), {
623
- value: l(s).showBreadcrumb,
624
- "onUpdate:value": e[5] || (e[5] = (o) => l(s).showBreadcrumb = o)
1993
+ e("div", is, [
1994
+ t[39] || (t[39] = e("div", { class: "section-title" }, "界面元素", -1)),
1995
+ e("div", ls, [
1996
+ t[35] || (t[35] = e("span", null, "显示面包屑", -1)),
1997
+ v(o(te), {
1998
+ value: o(s).showBreadcrumb,
1999
+ "onUpdate:value": t[5] || (t[5] = (d) => o(s).showBreadcrumb = d)
625
2000
  }, null, 8, ["value"])
626
2001
  ]),
627
- t("div", Ge, [
628
- e[36] || (e[36] = t("span", null, "显示面包屑图标", -1)),
629
- a(l(H), {
630
- value: l(s).showBreadcrumbIcon,
631
- "onUpdate:value": e[6] || (e[6] = (o) => l(s).showBreadcrumbIcon = o),
632
- disabled: !l(s).showBreadcrumb
2002
+ e("div", rs, [
2003
+ t[36] || (t[36] = e("span", null, "显示面包屑图标", -1)),
2004
+ v(o(te), {
2005
+ value: o(s).showBreadcrumbIcon,
2006
+ "onUpdate:value": t[6] || (t[6] = (d) => o(s).showBreadcrumbIcon = d),
2007
+ disabled: !o(s).showBreadcrumb
633
2008
  }, null, 8, ["value", "disabled"])
634
2009
  ]),
635
- t("div", Ye, [
636
- e[37] || (e[37] = t("span", null, "显示标签页", -1)),
637
- a(l(H), {
638
- value: l(s).showTagsView,
639
- "onUpdate:value": e[7] || (e[7] = (o) => l(s).showTagsView = o)
2010
+ e("div", ds, [
2011
+ t[37] || (t[37] = e("span", null, "显示标签页", -1)),
2012
+ v(o(te), {
2013
+ value: o(s).showTagsView,
2014
+ "onUpdate:value": t[7] || (t[7] = (d) => o(s).showTagsView = d)
640
2015
  }, null, 8, ["value"])
641
2016
  ]),
642
- t("div", Ze, [
643
- e[38] || (e[38] = t("span", null, "显示页脚", -1)),
644
- a(l(H), {
645
- value: l(s).showFooter,
646
- "onUpdate:value": e[8] || (e[8] = (o) => l(s).showFooter = o)
2017
+ e("div", us, [
2018
+ t[38] || (t[38] = e("span", null, "显示页脚", -1)),
2019
+ v(o(te), {
2020
+ value: o(s).showFooter,
2021
+ "onUpdate:value": t[8] || (t[8] = (d) => o(s).showFooter = d)
647
2022
  }, null, 8, ["value"])
648
2023
  ])
649
2024
  ]),
650
- t("div", qe, [
651
- e[42] || (e[42] = t("div", { class: "section-title" }, "尺寸调整", -1)),
652
- t("div", Qe, [
653
- t("div", Xe, [
654
- e[40] || (e[40] = t("span", null, "侧边栏宽度", -1)),
655
- t("span", et, h(l(s).sidebarWidth) + "px", 1)
2025
+ e("div", cs, [
2026
+ t[42] || (t[42] = e("div", { class: "section-title" }, "尺寸调整", -1)),
2027
+ e("div", ms, [
2028
+ e("div", vs, [
2029
+ t[40] || (t[40] = e("span", null, "侧边栏宽度", -1)),
2030
+ e("span", hs, $(o(s).sidebarWidth) + "px", 1)
656
2031
  ]),
657
- a(l(q), {
658
- value: l(s).sidebarWidth,
659
- "onUpdate:value": e[9] || (e[9] = (o) => l(s).sidebarWidth = o),
2032
+ v(o(Se), {
2033
+ value: o(s).sidebarWidth,
2034
+ "onUpdate:value": t[9] || (t[9] = (d) => o(s).sidebarWidth = d),
660
2035
  min: 180,
661
2036
  max: 280,
662
2037
  step: 10,
663
2038
  marks: { 180: "180", 220: "220", 280: "280" }
664
2039
  }, null, 8, ["value"])
665
2040
  ]),
666
- t("div", tt, [
667
- t("div", st, [
668
- e[41] || (e[41] = t("span", null, "头部高度", -1)),
669
- t("span", ot, h(l(s).headerHeight) + "px", 1)
2041
+ e("div", ps, [
2042
+ e("div", gs, [
2043
+ t[41] || (t[41] = e("span", null, "头部高度", -1)),
2044
+ e("span", fs, $(o(s).headerHeight) + "px", 1)
670
2045
  ]),
671
- a(l(q), {
672
- value: l(s).headerHeight,
673
- "onUpdate:value": e[10] || (e[10] = (o) => l(s).headerHeight = o),
2046
+ v(o(Se), {
2047
+ value: o(s).headerHeight,
2048
+ "onUpdate:value": t[10] || (t[10] = (d) => o(s).headerHeight = d),
674
2049
  min: 48,
675
2050
  max: 64,
676
2051
  step: 4,
@@ -678,17 +2053,17 @@ const Ce = X(), Te = [
678
2053
  }, null, 8, ["value"])
679
2054
  ])
680
2055
  ]),
681
- t("div", lt, [
682
- a(l(I), {
2056
+ e("div", _s, [
2057
+ v(o(oe), {
683
2058
  block: "",
684
2059
  secondary: "",
685
- onClick: U
2060
+ onClick: k
686
2061
  }, {
687
- icon: n(() => [...e[43] || (e[43] = [
688
- t("span", { class: "i-mdi:restore" }, null, -1)
2062
+ icon: l(() => [...t[43] || (t[43] = [
2063
+ e("span", { class: "i-mdi:restore" }, null, -1)
689
2064
  ])]),
690
- default: n(() => [
691
- e[44] || (e[44] = c(" 恢复布局默认设置 ", -1))
2065
+ default: l(() => [
2066
+ t[44] || (t[44] = U(" 恢复布局默认设置 ", -1))
692
2067
  ]),
693
2068
  _: 1
694
2069
  })
@@ -696,151 +2071,151 @@ const Ce = X(), Te = [
696
2071
  ]),
697
2072
  _: 1
698
2073
  }),
699
- a(l(j), {
2074
+ v(o(_e), {
700
2075
  name: "features",
701
2076
  tab: "🔧 功能"
702
2077
  }, {
703
- default: n(() => [
704
- t("div", it, [
705
- e[49] || (e[49] = t("div", { class: "section-title" }, "缓存管理", -1)),
706
- t("div", at, [
707
- a(l(I), {
2078
+ default: l(() => [
2079
+ e("div", ys, [
2080
+ t[49] || (t[49] = e("div", { class: "section-title" }, "缓存管理", -1)),
2081
+ e("div", ws, [
2082
+ v(o(oe), {
708
2083
  secondary: "",
709
- onClick: E
2084
+ onClick: j
710
2085
  }, {
711
- icon: n(() => [...e[45] || (e[45] = [
712
- t("span", { class: "i-mdi:delete-sweep" }, null, -1)
2086
+ icon: l(() => [...t[45] || (t[45] = [
2087
+ e("span", { class: "i-mdi:delete-sweep" }, null, -1)
713
2088
  ])]),
714
- default: n(() => [
715
- e[46] || (e[46] = c(" 清除缓存 ", -1))
2089
+ default: l(() => [
2090
+ t[46] || (t[46] = U(" 清除缓存 ", -1))
716
2091
  ]),
717
2092
  _: 1
718
2093
  }),
719
- a(l(I), {
2094
+ v(o(oe), {
720
2095
  secondary: "",
721
- onClick: D
2096
+ onClick: F
722
2097
  }, {
723
- icon: n(() => [...e[47] || (e[47] = [
724
- t("span", { class: "i-mdi:refresh" }, null, -1)
2098
+ icon: l(() => [...t[47] || (t[47] = [
2099
+ e("span", { class: "i-mdi:refresh" }, null, -1)
725
2100
  ])]),
726
- default: n(() => [
727
- e[48] || (e[48] = c(" 重新加载 ", -1))
2101
+ default: l(() => [
2102
+ t[48] || (t[48] = U(" 重新加载 ", -1))
728
2103
  ]),
729
2104
  _: 1
730
2105
  })
731
2106
  ])
732
2107
  ]),
733
- t("div", nt, [
734
- e[56] || (e[56] = t("div", { class: "section-title" }, "配置管理", -1)),
735
- t("div", rt, [
736
- a(l(I), {
2108
+ e("div", bs, [
2109
+ t[56] || (t[56] = e("div", { class: "section-title" }, "配置管理", -1)),
2110
+ e("div", ks, [
2111
+ v(o(oe), {
737
2112
  secondary: "",
738
- onClick: z
2113
+ onClick: B
739
2114
  }, {
740
- icon: n(() => [...e[50] || (e[50] = [
741
- t("span", { class: "i-mdi:download" }, null, -1)
2115
+ icon: l(() => [...t[50] || (t[50] = [
2116
+ e("span", { class: "i-mdi:download" }, null, -1)
742
2117
  ])]),
743
- default: n(() => [
744
- e[51] || (e[51] = c(" 导出配置 ", -1))
2118
+ default: l(() => [
2119
+ t[51] || (t[51] = U(" 导出配置 ", -1))
745
2120
  ]),
746
2121
  _: 1
747
2122
  }),
748
- a(l(I), {
2123
+ v(o(oe), {
749
2124
  secondary: "",
750
- onClick: A
2125
+ onClick: G
751
2126
  }, {
752
- icon: n(() => [...e[52] || (e[52] = [
753
- t("span", { class: "i-mdi:upload" }, null, -1)
2127
+ icon: l(() => [...t[52] || (t[52] = [
2128
+ e("span", { class: "i-mdi:upload" }, null, -1)
754
2129
  ])]),
755
- default: n(() => [
756
- e[53] || (e[53] = c(" 导入配置 ", -1))
2130
+ default: l(() => [
2131
+ t[53] || (t[53] = U(" 导入配置 ", -1))
757
2132
  ]),
758
2133
  _: 1
759
2134
  })
760
2135
  ]),
761
- a(l(I), {
2136
+ v(o(oe), {
762
2137
  block: "",
763
2138
  type: "error",
764
2139
  secondary: "",
765
2140
  class: "mt-2",
766
- onClick: _
2141
+ onClick: L
767
2142
  }, {
768
- icon: n(() => [...e[54] || (e[54] = [
769
- t("span", { class: "i-mdi:restore" }, null, -1)
2143
+ icon: l(() => [...t[54] || (t[54] = [
2144
+ e("span", { class: "i-mdi:restore" }, null, -1)
770
2145
  ])]),
771
- default: n(() => [
772
- e[55] || (e[55] = c(" 重置所有配置 ", -1))
2146
+ default: l(() => [
2147
+ t[55] || (t[55] = U(" 重置所有配置 ", -1))
773
2148
  ]),
774
2149
  _: 1
775
2150
  })
776
2151
  ]),
777
- t("div", dt, [
778
- e[59] || (e[59] = t("div", { class: "section-title" }, "系统模式", -1)),
779
- t("div", ut, [
780
- e[57] || (e[57] = t("div", { class: "setting-label" }, [
781
- t("span", null, "灰色模式"),
782
- t("span", { class: "setting-desc" }, "用于哀悼日场景")
2152
+ e("div", $s, [
2153
+ t[59] || (t[59] = e("div", { class: "section-title" }, "系统模式", -1)),
2154
+ e("div", Cs, [
2155
+ t[57] || (t[57] = e("div", { class: "setting-label" }, [
2156
+ e("span", null, "灰色模式"),
2157
+ e("span", { class: "setting-desc" }, "用于哀悼日场景")
783
2158
  ], -1)),
784
- a(l(H), {
785
- value: x.value,
786
- "onUpdate:value": e[11] || (e[11] = (o) => x.value = o)
2159
+ v(o(te), {
2160
+ value: a.value,
2161
+ "onUpdate:value": t[11] || (t[11] = (d) => a.value = d)
787
2162
  }, null, 8, ["value"])
788
2163
  ]),
789
- t("div", ct, [
790
- e[58] || (e[58] = t("div", { class: "setting-label" }, [
791
- t("span", null, "色弱模式"),
792
- t("span", { class: "setting-desc" }, "提供无障碍访问支持")
2164
+ e("div", xs, [
2165
+ t[58] || (t[58] = e("div", { class: "setting-label" }, [
2166
+ e("span", null, "色弱模式"),
2167
+ e("span", { class: "setting-desc" }, "提供无障碍访问支持")
793
2168
  ], -1)),
794
- a(l(H), {
795
- value: f.value,
796
- "onUpdate:value": e[12] || (e[12] = (o) => f.value = o)
2169
+ v(o(te), {
2170
+ value: u.value,
2171
+ "onUpdate:value": t[12] || (t[12] = (d) => u.value = d)
797
2172
  }, null, 8, ["value"])
798
2173
  ])
799
2174
  ]),
800
- t("div", vt, [
801
- e[61] || (e[61] = t("div", { class: "section-title" }, "水印设置", -1)),
802
- t("div", pt, [
803
- e[60] || (e[60] = t("span", null, "启用水印", -1)),
804
- a(l(H), {
805
- value: y.value,
806
- "onUpdate:value": e[13] || (e[13] = (o) => y.value = o)
2175
+ e("div", Ss, [
2176
+ t[61] || (t[61] = e("div", { class: "section-title" }, "水印设置", -1)),
2177
+ e("div", Ts, [
2178
+ t[60] || (t[60] = e("span", null, "启用水印", -1)),
2179
+ v(o(te), {
2180
+ value: c.value,
2181
+ "onUpdate:value": t[13] || (t[13] = (d) => c.value = d)
807
2182
  }, null, 8, ["value"])
808
2183
  ]),
809
- y.value ? (R(), W("div", mt, [
810
- a(l(ge), {
811
- value: k.value,
812
- "onUpdate:value": e[14] || (e[14] = (o) => k.value = o),
2184
+ c.value ? (n(), r("div", Ms, [
2185
+ v(o(je), {
2186
+ value: C.value,
2187
+ "onUpdate:value": t[14] || (t[14] = (d) => C.value = d),
813
2188
  placeholder: "请输入水印内容",
814
2189
  size: "small"
815
2190
  }, null, 8, ["value"])
816
- ])) : Z("", !0)
2191
+ ])) : x("", !0)
817
2192
  ]),
818
- t("div", gt, [
819
- e[68] || (e[68] = t("div", { class: "section-title" }, "系统信息", -1)),
820
- t("div", ft, [
821
- t("div", yt, [
822
- e[62] || (e[62] = t("span", { class: "info-label" }, "浏览器", -1)),
823
- t("span", ht, h(S.value.browser), 1)
2193
+ e("div", Is, [
2194
+ t[68] || (t[68] = e("div", { class: "section-title" }, "系统信息", -1)),
2195
+ e("div", zs, [
2196
+ e("div", Vs, [
2197
+ t[62] || (t[62] = e("span", { class: "info-label" }, "浏览器", -1)),
2198
+ e("span", Hs, $(M.value.browser), 1)
824
2199
  ]),
825
- t("div", bt, [
826
- e[63] || (e[63] = t("span", { class: "info-label" }, "操作系统", -1)),
827
- t("span", wt, h(S.value.os), 1)
2200
+ e("div", Rs, [
2201
+ t[63] || (t[63] = e("span", { class: "info-label" }, "操作系统", -1)),
2202
+ e("span", As, $(M.value.os), 1)
828
2203
  ]),
829
- t("div", xt, [
830
- e[64] || (e[64] = t("span", { class: "info-label" }, "屏幕分辨率", -1)),
831
- t("span", Ct, h(S.value.resolution), 1)
2204
+ e("div", Ls, [
2205
+ t[64] || (t[64] = e("span", { class: "info-label" }, "屏幕分辨率", -1)),
2206
+ e("span", Ds, $(M.value.resolution), 1)
832
2207
  ]),
833
- t("div", Tt, [
834
- e[65] || (e[65] = t("span", { class: "info-label" }, "设备像素比", -1)),
835
- t("span", kt, h(S.value.pixelRatio), 1)
2208
+ e("div", Ns, [
2209
+ t[65] || (t[65] = e("span", { class: "info-label" }, "设备像素比", -1)),
2210
+ e("span", Es, $(M.value.pixelRatio), 1)
836
2211
  ]),
837
- t("div", St, [
838
- e[66] || (e[66] = t("span", { class: "info-label" }, "语言", -1)),
839
- t("span", Mt, h(S.value.language), 1)
2212
+ e("div", Bs, [
2213
+ t[66] || (t[66] = e("span", { class: "info-label" }, "语言", -1)),
2214
+ e("span", Fs, $(M.value.language), 1)
840
2215
  ]),
841
- t("div", Rt, [
842
- e[67] || (e[67] = t("span", { class: "info-label" }, "时区", -1)),
843
- t("span", Ht, h(S.value.timezone), 1)
2216
+ e("div", Ws, [
2217
+ t[67] || (t[67] = e("span", { class: "info-label" }, "时区", -1)),
2218
+ e("span", Os, $(M.value.timezone), 1)
844
2219
  ])
845
2220
  ])
846
2221
  ])
@@ -857,28 +2232,420 @@ const Ce = X(), Te = [
857
2232
  _: 1
858
2233
  }, 8, ["show"]));
859
2234
  }
860
- }), Bt = (b, u) => {
861
- const p = b.__vccOpts || b;
862
- for (const [s, w] of u)
863
- p[s] = w;
864
- return p;
865
- }, It = /* @__PURE__ */ Bt(Vt, [["__scopeId", "data-v-f8cba7b1"]]);
866
- function Ot(b, u = {}) {
867
- const p = X(u);
868
- return p().syncCSSVariables(), p;
2235
+ }), Kn = /* @__PURE__ */ ee(Us, [["__scopeId", "data-v-f98d8946"]]), Ps = { class: "brand-logo__icon" }, js = ["src", "width", "height"], Ks = ["src", "width", "height"], Ys = { class: "brand-logo__name" }, Gs = { class: "brand-logo__title" }, Xs = {
2236
+ key: 0,
2237
+ class: "brand-logo__subtitle"
2238
+ }, Js = {
2239
+ key: 0,
2240
+ class: "brand-logo__divider"
2241
+ }, Zs = /* @__PURE__ */ O({
2242
+ name: "BrandLogo",
2243
+ __name: "index",
2244
+ props: {
2245
+ showName: { type: Boolean, default: !1 },
2246
+ showDivider: { type: Boolean, default: !1 },
2247
+ size: { default: 36 },
2248
+ collapsed: { type: Boolean, default: !1 },
2249
+ variant: { default: "horizontal" }
2250
+ },
2251
+ setup(f) {
2252
+ const i = X(), y = { ...ae, ...i.brand };
2253
+ return (s, p) => (n(), r("div", {
2254
+ class: A(["brand-logo", {
2255
+ "brand-logo--collapsed": f.collapsed,
2256
+ "brand-logo--horizontal": f.variant === "horizontal"
2257
+ }])
2258
+ }, [
2259
+ e("div", Ps, [
2260
+ p[0] || (p[0] = e("div", { class: "brand-logo__glow" }, null, -1)),
2261
+ y.logoType === "video" && y.logoSrc ? (n(), r("video", {
2262
+ key: 0,
2263
+ src: y.logoSrc,
2264
+ width: f.size,
2265
+ height: f.size,
2266
+ autoplay: "",
2267
+ loop: "",
2268
+ muted: "",
2269
+ playsinline: "",
2270
+ class: "brand-logo__media"
2271
+ }, null, 8, js)) : y.logoSrc ? (n(), r("img", {
2272
+ key: 1,
2273
+ src: y.logoSrc,
2274
+ width: f.size,
2275
+ height: f.size,
2276
+ class: "brand-logo__media",
2277
+ alt: "Logo"
2278
+ }, null, 8, Ks)) : x("", !0)
2279
+ ]),
2280
+ f.showName && !f.collapsed ? (n(), r(E, { key: 0 }, [
2281
+ e("div", Ys, [
2282
+ e("span", Gs, $(y.name), 1),
2283
+ y.subtitle ? (n(), r("span", Xs, $(y.subtitle), 1)) : x("", !0)
2284
+ ]),
2285
+ f.showDivider ? (n(), r("div", Js)) : x("", !0)
2286
+ ], 64)) : x("", !0)
2287
+ ], 2));
2288
+ }
2289
+ }), Yn = /* @__PURE__ */ ee(Zs, [["__scopeId", "data-v-fd1c2eec"]]), qs = { class: "icon-menu" }, Qs = ["onClick"], en = { class: "icon-menu__icon" }, tn = {
2290
+ key: 1,
2291
+ class: "icon-menu__fallback"
2292
+ }, on = { class: "icon-menu__label" }, sn = /* @__PURE__ */ O({
2293
+ name: "IconMenu",
2294
+ __name: "index",
2295
+ props: {
2296
+ menus: {},
2297
+ active: {}
2298
+ },
2299
+ emits: ["click"],
2300
+ setup(f, { emit: i }) {
2301
+ const y = i, s = X();
2302
+ return (p, m) => (n(), r("div", qs, [
2303
+ (n(!0), r(E, null, W(f.menus, (a) => (n(), r("div", {
2304
+ key: a.path,
2305
+ class: A(["icon-menu__item", { "icon-menu__item--active": f.active === a.path }]),
2306
+ onClick: (u) => y("click", a)
2307
+ }, [
2308
+ e("div", en, [
2309
+ o(s).iconComponent && a.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2310
+ key: 0,
2311
+ name: a.meta.icon,
2312
+ size: 20
2313
+ }, null, 8, ["name"])) : (n(), r("span", tn, $(a.meta?.title?.charAt(0) || "?"), 1))
2314
+ ]),
2315
+ e("div", on, $(a.meta?.title), 1)
2316
+ ], 10, Qs))), 128))
2317
+ ]));
2318
+ }
2319
+ }), Gn = /* @__PURE__ */ ee(sn, [["__scopeId", "data-v-f985d475"]]), nn = { class: "floating-menu__header" }, an = { class: "floating-menu__brand" }, ln = { class: "floating-menu__brand-title" }, rn = { class: "floating-menu__brand-subtitle" }, dn = { class: "floating-menu__list" }, un = {
2320
+ key: 0,
2321
+ class: "floating-menu__group"
2322
+ }, cn = { class: "floating-menu__group-title" }, mn = ["onClick"], vn = { class: "floating-menu__item-text" }, hn = ["onClick"], pn = { class: "floating-menu__item-text" }, gn = /* @__PURE__ */ O({
2323
+ name: "FloatingMenu",
2324
+ __name: "index",
2325
+ props: {
2326
+ show: { type: Boolean },
2327
+ menuItem: {},
2328
+ isActive: { type: Function }
2329
+ },
2330
+ emits: ["click"],
2331
+ setup(f, { emit: i }) {
2332
+ const y = i, s = X(), p = { ...ae, ...s.brand };
2333
+ return (m, a) => (n(), S(Q, { name: "slide-fade" }, {
2334
+ default: l(() => [
2335
+ f.show && f.menuItem ? (n(), r("div", {
2336
+ key: 0,
2337
+ class: A(["floating-menu", [o(s).isDark.value ? "dark-theme" : "light-theme"]])
2338
+ }, [
2339
+ e("div", nn, [
2340
+ e("div", an, [
2341
+ e("span", ln, $(p.name), 1),
2342
+ e("span", rn, $(p.subtitle), 1)
2343
+ ])
2344
+ ]),
2345
+ e("div", dn, [
2346
+ (n(!0), r(E, null, W(f.menuItem.children, (u) => (n(), r(E, {
2347
+ key: u.path
2348
+ }, [
2349
+ u.children && u.children.length > 0 ? (n(), r("div", un, [
2350
+ e("div", cn, [
2351
+ o(s).iconComponent && u.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2352
+ key: 0,
2353
+ name: u.meta.icon,
2354
+ size: 16
2355
+ }, null, 8, ["name"])) : x("", !0),
2356
+ e("span", null, $(u.meta?.title), 1)
2357
+ ]),
2358
+ (n(!0), r(E, null, W(u.children, (c) => (n(), r("div", {
2359
+ key: c.path,
2360
+ class: A(["floating-menu__item floating-menu__item--sub", { active: f.isActive?.(c.path) }]),
2361
+ onClick: (C) => y("click", c)
2362
+ }, [
2363
+ o(s).iconComponent && c.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2364
+ key: 0,
2365
+ name: c.meta.icon,
2366
+ size: 16
2367
+ }, null, 8, ["name"])) : x("", !0),
2368
+ e("span", vn, $(c.meta?.title), 1)
2369
+ ], 10, mn))), 128))
2370
+ ])) : (n(), r("div", {
2371
+ key: 1,
2372
+ class: A(["floating-menu__item", { active: f.isActive?.(u.path) }]),
2373
+ onClick: (c) => y("click", u)
2374
+ }, [
2375
+ o(s).iconComponent && u.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2376
+ key: 0,
2377
+ name: u.meta.icon,
2378
+ size: 18
2379
+ }, null, 8, ["name"])) : x("", !0),
2380
+ e("span", pn, $(u.meta?.title), 1)
2381
+ ], 10, hn))
2382
+ ], 64))), 128))
2383
+ ])
2384
+ ], 2)) : x("", !0)
2385
+ ]),
2386
+ _: 1
2387
+ }));
2388
+ }
2389
+ }), Xn = /* @__PURE__ */ ee(gn, [["__scopeId", "data-v-0588c318"]]), fn = { class: "side-menu__header" }, _n = { class: "side-menu__header-icon" }, yn = { class: "side-menu__header-title" }, wn = { class: "side-menu__list" }, bn = {
2390
+ key: 0,
2391
+ class: "side-menu__group"
2392
+ }, kn = { class: "side-menu__group-label" }, $n = ["onClick"], Cn = { class: "side-menu__item-text" }, xn = ["onClick"], Sn = { class: "side-menu__item-text" }, Tn = /* @__PURE__ */ O({
2393
+ name: "SideMenu",
2394
+ __name: "index",
2395
+ props: {
2396
+ menus: {},
2397
+ activeItem: {},
2398
+ isActive: { type: Function }
2399
+ },
2400
+ emits: ["click"],
2401
+ setup(f, { emit: i }) {
2402
+ const y = i, s = X(), p = V(!1);
2403
+ return (m, a) => f.menus.length > 0 ? (n(), r(E, { key: 0 }, [
2404
+ e("div", {
2405
+ class: A(["side-menu-toggle", [
2406
+ o(s).isDark.value ? "dark-theme" : "light-theme",
2407
+ { active: !p.value }
2408
+ ]]),
2409
+ onClick: a[0] || (a[0] = (u) => p.value = !p.value)
2410
+ }, [
2411
+ e("i", {
2412
+ class: A([
2413
+ "toggle-icon",
2414
+ p.value ? "i-ri:side-bar-line" : "i-ri:arrow-right-s-line"
2415
+ ])
2416
+ }, null, 2)
2417
+ ], 2),
2418
+ v(Q, { name: "glass-slide" }, {
2419
+ default: l(() => [
2420
+ p.value ? x("", !0) : (n(), r("div", {
2421
+ key: 0,
2422
+ class: A(["side-menu", [o(s).isDark.value ? "dark-theme" : "light-theme"]])
2423
+ }, [
2424
+ e("div", fn, [
2425
+ e("div", _n, [
2426
+ o(s).iconComponent && f.activeItem?.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2427
+ key: 0,
2428
+ name: f.activeItem.meta.icon,
2429
+ size: 17
2430
+ }, null, 8, ["name"])) : x("", !0)
2431
+ ]),
2432
+ e("span", yn, $(f.activeItem?.meta?.title || "菜单"), 1)
2433
+ ]),
2434
+ e("div", wn, [
2435
+ (n(!0), r(E, null, W(f.menus, (u) => (n(), r(E, {
2436
+ key: u.path
2437
+ }, [
2438
+ u.children && u.children.length > 0 ? (n(), r("div", bn, [
2439
+ e("div", kn, [
2440
+ o(s).iconComponent && u.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2441
+ key: 0,
2442
+ name: u.meta.icon,
2443
+ size: 14
2444
+ }, null, 8, ["name"])) : x("", !0),
2445
+ e("span", null, $(u.meta?.title), 1)
2446
+ ]),
2447
+ (n(!0), r(E, null, W(u.children, (c) => (n(), r("div", {
2448
+ key: c.path,
2449
+ class: A(["side-menu__item", { active: f.isActive?.(c.path) }]),
2450
+ onClick: (C) => y("click", c)
2451
+ }, [
2452
+ o(s).iconComponent && c.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2453
+ key: 0,
2454
+ name: c.meta.icon,
2455
+ size: 15
2456
+ }, null, 8, ["name"])) : x("", !0),
2457
+ e("span", Cn, $(c.meta?.title), 1)
2458
+ ], 10, $n))), 128))
2459
+ ])) : (n(), r("div", {
2460
+ key: 1,
2461
+ class: A(["side-menu__item", { active: f.isActive?.(u.path) }]),
2462
+ onClick: (c) => y("click", u)
2463
+ }, [
2464
+ o(s).iconComponent && u.meta?.icon ? (n(), S(N(o(s).iconComponent), {
2465
+ key: 0,
2466
+ name: u.meta.icon,
2467
+ size: 16
2468
+ }, null, 8, ["name"])) : x("", !0),
2469
+ e("span", Sn, $(u.meta?.title), 1)
2470
+ ], 10, xn))
2471
+ ], 64))), 128))
2472
+ ])
2473
+ ], 2))
2474
+ ]),
2475
+ _: 1
2476
+ })
2477
+ ], 64)) : x("", !0);
2478
+ }
2479
+ }), Jn = /* @__PURE__ */ ee(Tn, [["__scopeId", "data-v-1909f229"]]), Mn = { class: "drawer-menu__content" }, In = { class: "drawer-menu__grid" }, zn = ["onClick"], Vn = {
2480
+ key: 0,
2481
+ class: "drawer-menu__items"
2482
+ }, Hn = ["onClick"], Rn = { class: "drawer-menu__item-text" }, An = {
2483
+ key: 0,
2484
+ class: "drawer-menu__sub-items"
2485
+ }, Ln = { class: "drawer-menu__sub-title" }, Dn = ["onClick"], Nn = { class: "drawer-menu__item-text" }, En = /* @__PURE__ */ O({
2486
+ name: "DrawerMenu",
2487
+ __name: "index",
2488
+ props: {
2489
+ menus: {},
2490
+ show: { type: Boolean }
2491
+ },
2492
+ setup(f) {
2493
+ const i = X(), y = ge(), s = we(Ve, {
2494
+ show: () => {
2495
+ },
2496
+ startHide: () => {
2497
+ },
2498
+ hide: () => {
2499
+ }
2500
+ }), p = (m) => {
2501
+ m.path && (y.push(m.path), s.hide());
2502
+ };
2503
+ return (m, a) => (n(), r("div", {
2504
+ class: A(["drawer-menu", [
2505
+ o(i).isDark.value ? "dark-theme" : "light-theme",
2506
+ { visible: f.show }
2507
+ ]]),
2508
+ onMouseenter: a[0] || (a[0] = (u) => o(s).show()),
2509
+ onMouseleave: a[1] || (a[1] = (u) => o(s).startHide())
2510
+ }, [
2511
+ a[2] || (a[2] = e("div", { class: "drawer-menu__header" }, [
2512
+ e("div", { class: "drawer-menu__title" }, [
2513
+ e("span", { class: "grid-icon" }, [
2514
+ e("span"),
2515
+ e("span"),
2516
+ e("span"),
2517
+ e("span")
2518
+ ]),
2519
+ e("span", null, "功能导航")
2520
+ ])
2521
+ ], -1)),
2522
+ e("div", Mn, [
2523
+ e("div", In, [
2524
+ (n(!0), r(E, null, W(f.menus, (u) => (n(), r("div", {
2525
+ key: u.path,
2526
+ class: "drawer-menu__category"
2527
+ }, [
2528
+ e("div", {
2529
+ class: "drawer-menu__category-header",
2530
+ onClick: (c) => p(u)
2531
+ }, [
2532
+ o(i).iconComponent && u.meta?.icon ? (n(), S(N(o(i).iconComponent), {
2533
+ key: 0,
2534
+ name: u.meta.icon,
2535
+ size: 18
2536
+ }, null, 8, ["name"])) : x("", !0),
2537
+ e("span", null, $(u.meta?.title), 1)
2538
+ ], 8, zn),
2539
+ u.children && u.children.length > 0 ? (n(), r("div", Vn, [
2540
+ (n(!0), r(E, null, W(u.children, (c) => (n(), r("div", {
2541
+ key: c.path,
2542
+ class: "drawer-menu__item",
2543
+ onClick: (C) => p(c)
2544
+ }, [
2545
+ o(i).iconComponent && c.meta?.icon ? (n(), S(N(o(i).iconComponent), {
2546
+ key: 0,
2547
+ name: c.meta.icon,
2548
+ size: 16
2549
+ }, null, 8, ["name"])) : x("", !0),
2550
+ e("span", Rn, $(c.meta?.title), 1)
2551
+ ], 8, Hn))), 128)),
2552
+ (n(!0), r(E, null, W(u.children, (c) => (n(), r(E, {
2553
+ key: c.path
2554
+ }, [
2555
+ c.children && c.children.length > 0 ? (n(), r("div", An, [
2556
+ e("div", Ln, $(c.meta?.title), 1),
2557
+ (n(!0), r(E, null, W(c.children, (C) => (n(), r("div", {
2558
+ key: C.path,
2559
+ class: "drawer-menu__item drawer-menu__item--sub",
2560
+ onClick: (g) => p(C)
2561
+ }, [
2562
+ o(i).iconComponent && C.meta?.icon ? (n(), S(N(o(i).iconComponent), {
2563
+ key: 0,
2564
+ name: C.meta.icon,
2565
+ size: 14
2566
+ }, null, 8, ["name"])) : x("", !0),
2567
+ e("span", Nn, $(C.meta?.title), 1)
2568
+ ], 8, Dn))), 128))
2569
+ ])) : x("", !0)
2570
+ ], 64))), 128))
2571
+ ])) : x("", !0)
2572
+ ]))), 128))
2573
+ ])
2574
+ ])
2575
+ ], 34));
2576
+ }
2577
+ }), Zn = /* @__PURE__ */ ee(En, [["__scopeId", "data-v-b0d3e73b"]]), Bn = /* @__PURE__ */ O({
2578
+ name: "MenuTrigger",
2579
+ __name: "index",
2580
+ props: {
2581
+ show: { type: Boolean }
2582
+ },
2583
+ setup(f) {
2584
+ const i = we(Ve, {
2585
+ show: () => {
2586
+ },
2587
+ startHide: () => {
2588
+ },
2589
+ hide: () => {
2590
+ }
2591
+ });
2592
+ return (y, s) => (n(), r("div", {
2593
+ class: "menu-trigger",
2594
+ onMouseenter: s[0] || (s[0] = (p) => o(i).show()),
2595
+ onMouseleave: s[1] || (s[1] = (p) => o(i).startHide())
2596
+ }, [...s[2] || (s[2] = [
2597
+ e("div", { class: "menu-trigger__indicator" }, [
2598
+ e("span", { class: "hamburger-icon" }, [
2599
+ e("span"),
2600
+ e("span"),
2601
+ e("span")
2602
+ ])
2603
+ ], -1)
2604
+ ])], 32));
2605
+ }
2606
+ }), qn = /* @__PURE__ */ ee(Bn, [["__scopeId", "data-v-2c20af78"]]);
2607
+ function Qn(f, i = {}) {
2608
+ const y = Ie(i);
2609
+ return y().syncCSSVariables(), y;
869
2610
  }
870
2611
  export {
871
- be as BORDER_RADIUS_MAP,
872
- xe as COLOR_SWATCHES,
873
- v as DEFAULT_SETTINGS,
874
- Wt as LAYOUT_MODES,
875
- ye as PRESET_COLORS,
876
- It as SettingsDrawer,
877
- he as THEME_PRESETS,
878
- we as TRANSITION_MAP,
879
- Q as adjustColor,
880
- X as createSettingsStore,
881
- Ot as setupLayout,
882
- Ce as useSettingsStore
2612
+ Ge as BORDER_RADIUS_MAP,
2613
+ Yn as BrandLogo,
2614
+ Je as COLOR_SWATCHES,
2615
+ Lo as C_CardLayout,
2616
+ jn as C_LayoutContainer,
2617
+ Mt as C_MixLayout,
2618
+ jt as C_MixTopLayout,
2619
+ vo as C_ReverseHorizontalMixLayout,
2620
+ qe as C_SideLayout,
2621
+ mt as C_TopLayout,
2622
+ Lo as CardLayout,
2623
+ ae as DEFAULT_BRAND_CONFIG,
2624
+ P as DEFAULT_SETTINGS,
2625
+ Ve as DRAWER_HANDLER_KEY,
2626
+ Zn as DrawerMenu,
2627
+ Xn as FloatingMenu,
2628
+ Gn as IconMenu,
2629
+ Ze as LAYOUT_CONTEXT_KEY,
2630
+ Pn as LAYOUT_MODES,
2631
+ qn as MenuTrigger,
2632
+ Mt as MixLayout,
2633
+ jt as MixTopLayout,
2634
+ Ke as PRESET_COLORS,
2635
+ $e as ResponsiveMenu,
2636
+ vo as ReverseHorizontalMixLayout,
2637
+ Kn as SettingsDrawer,
2638
+ qe as SideLayout,
2639
+ Jn as SideMenu,
2640
+ Ye as THEME_PRESETS,
2641
+ Xe as TRANSITION_MAP,
2642
+ mt as TopLayout,
2643
+ Te as adjustColor,
2644
+ Ie as createSettingsStore,
2645
+ Qn as setupLayout,
2646
+ me as useLayoutCache,
2647
+ X as useLayoutContext,
2648
+ Ce as useMenuSplit,
2649
+ ze as useSettingsStore
883
2650
  };
884
2651
  //# sourceMappingURL=index.js.map