@robot-admin/layout 2.0.2 → 2.1.0

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