@robot-admin/layout 2.0.1 → 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/README.md +344 -635
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +593 -4
- package/dist/index.js +2164 -444
- package/dist/index.js.map +1 -1
- package/package.json +76 -77
- package/src/styles/layouts.scss +662 -0
- package/src/styles/settings.scss +385 -385
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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 he = [
|
|
|
10
11
|
{ name: "明青", value: "#13c2c2" },
|
|
11
12
|
{ name: "极客蓝", value: "#2f54eb" },
|
|
12
13
|
{ name: "酱紫", value: "#722ed1" }
|
|
13
|
-
],
|
|
14
|
+
], Ge = [
|
|
14
15
|
{
|
|
15
16
|
name: "科技蓝",
|
|
16
17
|
icon: "💙",
|
|
@@ -41,7 +42,7 @@ const he = [
|
|
|
41
42
|
icon: "❤️",
|
|
42
43
|
primaryColor: "#f5222d"
|
|
43
44
|
}
|
|
44
|
-
],
|
|
45
|
+
], jn = [
|
|
45
46
|
{
|
|
46
47
|
mode: "side",
|
|
47
48
|
label: "左侧菜单",
|
|
@@ -78,16 +79,16 @@ const he = [
|
|
|
78
79
|
description: "卡片式布局风格",
|
|
79
80
|
icon: "i-mdi:card-outline"
|
|
80
81
|
}
|
|
81
|
-
],
|
|
82
|
+
], Xe = {
|
|
82
83
|
small: "4px",
|
|
83
84
|
medium: "6px",
|
|
84
85
|
large: "8px"
|
|
85
|
-
},
|
|
86
|
+
}, Je = {
|
|
86
87
|
fade: "fade-transform",
|
|
87
88
|
slide: "fade-slide",
|
|
88
89
|
zoom: "fade-zoom",
|
|
89
90
|
none: ""
|
|
90
|
-
},
|
|
91
|
+
}, P = {
|
|
91
92
|
// 外观
|
|
92
93
|
themeMode: "light",
|
|
93
94
|
primaryColor: "#409eff",
|
|
@@ -109,124 +110,1461 @@ const he = [
|
|
|
109
110
|
headerHeight: 56,
|
|
110
111
|
// 高级
|
|
111
112
|
enableHotkeys: !0,
|
|
112
|
-
version: "
|
|
113
|
-
},
|
|
114
|
-
function
|
|
115
|
-
const
|
|
116
|
-
return `#${(s << 16 |
|
|
113
|
+
version: "2.0.2"
|
|
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
|
|
119
|
-
const { defaults:
|
|
120
|
-
...
|
|
121
|
-
...
|
|
119
|
+
function Me(_ = {}) {
|
|
120
|
+
const { defaults: i = {}, onThemeModeChange: w } = _, s = {
|
|
121
|
+
...P,
|
|
122
|
+
...i
|
|
122
123
|
};
|
|
123
|
-
return
|
|
124
|
-
const
|
|
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
|
-
),
|
|
127
|
-
() =>
|
|
128
|
-
),
|
|
129
|
-
() =>
|
|
130
|
-
),
|
|
131
|
-
themeMode:
|
|
132
|
-
primaryColor:
|
|
133
|
-
borderRadius:
|
|
134
|
-
transitionType:
|
|
135
|
-
enableTransition:
|
|
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:
|
|
138
|
-
fixedHeader:
|
|
139
|
-
showBreadcrumb:
|
|
140
|
-
showBreadcrumbIcon:
|
|
141
|
-
showTagsView:
|
|
142
|
-
tagsViewHeight:
|
|
143
|
-
tagsViewStyle:
|
|
144
|
-
showFooter:
|
|
145
|
-
sidebarWidth:
|
|
146
|
-
sidebarCollapsedWidth:
|
|
147
|
-
headerHeight:
|
|
148
|
-
enableHotkeys:
|
|
149
|
-
version:
|
|
150
|
-
})),
|
|
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
|
|
153
|
-
|
|
153
|
+
const L = document.documentElement;
|
|
154
|
+
L.style.setProperty("--primary-color", v.value), L.style.setProperty(
|
|
154
155
|
"--primary-color-hover",
|
|
155
|
-
|
|
156
|
-
),
|
|
156
|
+
xe(v.value, 10)
|
|
157
|
+
), L.style.setProperty(
|
|
157
158
|
"--primary-color-pressed",
|
|
158
|
-
|
|
159
|
-
),
|
|
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
|
-
`${
|
|
162
|
-
),
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
v,
|
|
176
|
+
Y,
|
|
177
|
+
I,
|
|
178
|
+
V,
|
|
179
|
+
X,
|
|
180
|
+
H
|
|
180
181
|
],
|
|
181
182
|
() => {
|
|
182
|
-
|
|
183
|
+
j();
|
|
183
184
|
},
|
|
184
185
|
{ immediate: !0 }
|
|
185
186
|
), {
|
|
186
187
|
// 状态
|
|
187
|
-
themeMode:
|
|
188
|
-
primaryColor:
|
|
189
|
-
borderRadius:
|
|
190
|
-
transitionType:
|
|
191
|
-
enableTransition:
|
|
188
|
+
themeMode: f,
|
|
189
|
+
primaryColor: v,
|
|
190
|
+
borderRadius: a,
|
|
191
|
+
transitionType: u,
|
|
192
|
+
enableTransition: c,
|
|
192
193
|
layoutMode: k,
|
|
193
|
-
collapsed:
|
|
194
|
-
fixedHeader:
|
|
195
|
-
showBreadcrumb:
|
|
196
|
-
showBreadcrumbIcon:
|
|
197
|
-
showTagsView:
|
|
198
|
-
tagsViewHeight:
|
|
199
|
-
tagsViewStyle:
|
|
200
|
-
showFooter:
|
|
201
|
-
sidebarWidth:
|
|
202
|
-
sidebarCollapsedWidth:
|
|
203
|
-
headerHeight:
|
|
204
|
-
enableHotkeys:
|
|
205
|
-
version:
|
|
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:
|
|
208
|
-
transitionName:
|
|
209
|
-
shouldEnableTransition:
|
|
210
|
-
settingsState:
|
|
208
|
+
borderRadiusValue: Y,
|
|
209
|
+
transitionName: S,
|
|
210
|
+
shouldEnableTransition: t,
|
|
211
|
+
settingsState: d,
|
|
211
212
|
// 方法
|
|
212
|
-
syncCSSVariables:
|
|
213
|
-
applyPreset:
|
|
214
|
-
resetSettings:
|
|
215
|
-
updateThemeMode:
|
|
216
|
-
toggleCollapse:
|
|
213
|
+
syncCSSVariables: j,
|
|
214
|
+
applyPreset: K,
|
|
215
|
+
resetSettings: ue,
|
|
216
|
+
updateThemeMode: ce,
|
|
217
|
+
toggleCollapse: ve
|
|
217
218
|
};
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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 = [
|
|
230
1568
|
{
|
|
231
1569
|
label: "左侧菜单(默认)",
|
|
232
1570
|
value: "side",
|
|
@@ -289,201 +1627,199 @@ const Ce = Z(), Te = [
|
|
|
289
1627
|
<rect x="32" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.4"/>
|
|
290
1628
|
`
|
|
291
1629
|
}
|
|
292
|
-
],
|
|
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 = {
|
|
293
1631
|
class: "layout-svg",
|
|
294
1632
|
viewBox: "0 0 56 48",
|
|
295
1633
|
fill: "none",
|
|
296
1634
|
xmlns: "http://www.w3.org/2000/svg"
|
|
297
|
-
},
|
|
1635
|
+
}, ns = ["innerHTML"], as = { class: "layout-label" }, is = {
|
|
298
1636
|
key: 0,
|
|
299
1637
|
class: "badge-soon"
|
|
300
|
-
},
|
|
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 = {
|
|
301
1639
|
key: 0,
|
|
302
1640
|
class: "mt-2"
|
|
303
|
-
},
|
|
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({
|
|
304
1642
|
__name: "index",
|
|
305
|
-
props:
|
|
306
|
-
storageKey: {}
|
|
307
|
-
}, {
|
|
1643
|
+
props: {
|
|
308
1644
|
show: { type: Boolean, default: !1 },
|
|
309
1645
|
showModifiers: {}
|
|
310
|
-
}
|
|
1646
|
+
},
|
|
311
1647
|
emits: ["update:show"],
|
|
312
|
-
setup(
|
|
313
|
-
const
|
|
314
|
-
let
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
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 = `
|
|
319
1655
|
position: fixed;
|
|
320
1656
|
top: 0;
|
|
321
1657
|
left: 0;
|
|
322
1658
|
width: 100%;
|
|
323
1659
|
height: 100%;
|
|
324
1660
|
pointer-events: none;
|
|
325
|
-
background-image: url(${
|
|
1661
|
+
background-image: url(${t.toDataURL()});
|
|
326
1662
|
background-repeat: repeat;
|
|
327
1663
|
z-index: 9999;
|
|
328
1664
|
user-select: none;
|
|
329
|
-
`, document.body.appendChild(
|
|
330
|
-
},
|
|
331
|
-
|
|
1665
|
+
`, document.body.appendChild(g);
|
|
1666
|
+
}, b = () => {
|
|
1667
|
+
g && (document.body.removeChild(g), g = null);
|
|
332
1668
|
};
|
|
333
|
-
|
|
334
|
-
document.documentElement.classList.toggle("gray-mode",
|
|
335
|
-
}),
|
|
336
|
-
document.documentElement.classList.toggle("color-weak-mode",
|
|
337
|
-
}),
|
|
338
|
-
|
|
339
|
-
}),
|
|
340
|
-
|
|
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);
|
|
341
1677
|
});
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
let
|
|
345
|
-
return
|
|
346
|
-
browser:
|
|
347
|
-
os:
|
|
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,
|
|
348
1684
|
resolution: `${window.screen.width} × ${window.screen.height}`,
|
|
349
1685
|
pixelRatio: window.devicePixelRatio + "x",
|
|
350
1686
|
language: navigator.language,
|
|
351
|
-
timezone:
|
|
1687
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
352
1688
|
};
|
|
353
1689
|
});
|
|
354
|
-
|
|
355
|
-
|
|
1690
|
+
we(() => {
|
|
1691
|
+
b();
|
|
356
1692
|
});
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
},
|
|
360
|
-
s.applyPreset(
|
|
361
|
-
},
|
|
362
|
-
s.themeMode =
|
|
363
|
-
},
|
|
364
|
-
s.layoutMode =
|
|
365
|
-
},
|
|
366
|
-
|
|
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({
|
|
367
1703
|
title: "确认重置",
|
|
368
1704
|
content: "确定要恢复默认配置吗?此操作不可撤销。",
|
|
369
1705
|
positiveText: "确认",
|
|
370
1706
|
negativeText: "取消",
|
|
371
1707
|
onPositiveClick: () => {
|
|
372
|
-
s.resetSettings(),
|
|
1708
|
+
s.resetSettings(), i.success("已恢复默认配置");
|
|
373
1709
|
}
|
|
374
1710
|
});
|
|
375
|
-
},
|
|
376
|
-
|
|
1711
|
+
}, X = () => {
|
|
1712
|
+
w.warning({
|
|
377
1713
|
title: "确认清除",
|
|
378
1714
|
content: "确定要清除浏览器缓存吗?",
|
|
379
1715
|
positiveText: "确认",
|
|
380
1716
|
negativeText: "取消",
|
|
381
1717
|
onPositiveClick: () => {
|
|
382
|
-
const
|
|
383
|
-
Object.keys(localStorage).forEach((
|
|
384
|
-
|
|
385
|
-
}), sessionStorage.clear(),
|
|
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("缓存已清除");
|
|
386
1722
|
}
|
|
387
1723
|
});
|
|
388
|
-
},
|
|
1724
|
+
}, F = () => {
|
|
389
1725
|
location.reload();
|
|
390
|
-
},
|
|
391
|
-
const
|
|
1726
|
+
}, B = () => {
|
|
1727
|
+
const S = {
|
|
392
1728
|
settings: s.settingsState,
|
|
393
|
-
gray:
|
|
394
|
-
colorWeak:
|
|
1729
|
+
gray: a.value,
|
|
1730
|
+
colorWeak: u.value,
|
|
395
1731
|
watermark: {
|
|
396
|
-
enabled:
|
|
1732
|
+
enabled: c.value,
|
|
397
1733
|
text: k.value
|
|
398
1734
|
},
|
|
399
1735
|
exportTime: (/* @__PURE__ */ new Date()).toISOString()
|
|
400
|
-
},
|
|
1736
|
+
}, t = new Blob([JSON.stringify(S, null, 2)], {
|
|
401
1737
|
type: "application/json"
|
|
402
|
-
}),
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
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)
|
|
409
1745
|
try {
|
|
410
|
-
const
|
|
411
|
-
|
|
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("配置已导入");
|
|
412
1748
|
} catch {
|
|
413
|
-
|
|
1749
|
+
i.error("配置文件格式错误");
|
|
414
1750
|
}
|
|
415
|
-
},
|
|
1751
|
+
}, S.click();
|
|
416
1752
|
};
|
|
417
|
-
return (
|
|
418
|
-
show:
|
|
419
|
-
"onUpdate:show":
|
|
1753
|
+
return (S, t) => (n(), T(o(Oe), {
|
|
1754
|
+
show: f.value,
|
|
1755
|
+
"onUpdate:show": t[16] || (t[16] = (d) => f.value = d),
|
|
420
1756
|
width: 380,
|
|
421
1757
|
placement: "right",
|
|
422
1758
|
"trap-focus": !1,
|
|
423
1759
|
"block-scroll": !1
|
|
424
1760
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
1761
|
+
default: l(() => [
|
|
1762
|
+
m(o(Ue), {
|
|
427
1763
|
title: "⚙️ 布局配置",
|
|
428
1764
|
closable: ""
|
|
429
1765
|
}, {
|
|
430
|
-
default:
|
|
431
|
-
|
|
432
|
-
value:
|
|
433
|
-
"onUpdate:value":
|
|
1766
|
+
default: l(() => [
|
|
1767
|
+
m(o(Pe), {
|
|
1768
|
+
value: v.value,
|
|
1769
|
+
"onUpdate:value": t[15] || (t[15] = (d) => v.value = d),
|
|
434
1770
|
animated: "",
|
|
435
1771
|
class: "settings-tabs"
|
|
436
1772
|
}, {
|
|
437
|
-
default:
|
|
438
|
-
|
|
1773
|
+
default: l(() => [
|
|
1774
|
+
m(o(fe), {
|
|
439
1775
|
name: "appearance",
|
|
440
1776
|
tab: "🎨 外观"
|
|
441
1777
|
}, {
|
|
442
|
-
default:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
(
|
|
446
|
-
key:
|
|
447
|
-
class:
|
|
448
|
-
onClick: (
|
|
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)
|
|
449
1785
|
}, [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
1786
|
+
e("div", Oo, $(d.icon), 1),
|
|
1787
|
+
e("div", Uo, $(d.name), 1),
|
|
1788
|
+
e("div", Po, [
|
|
1789
|
+
e("span", {
|
|
454
1790
|
class: "color-dot",
|
|
455
|
-
style:
|
|
1791
|
+
style: me({ backgroundColor: d.primaryColor })
|
|
456
1792
|
}, null, 4)
|
|
457
1793
|
])
|
|
458
|
-
], 10,
|
|
1794
|
+
], 10, Wo))), 128))
|
|
459
1795
|
])
|
|
460
1796
|
]),
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
value:
|
|
465
|
-
"onUpdate:value":
|
|
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),
|
|
466
1802
|
class: "mode-group"
|
|
467
1803
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
|
|
470
|
-
default:
|
|
471
|
-
|
|
472
|
-
|
|
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)
|
|
473
1809
|
])]),
|
|
474
1810
|
_: 1
|
|
475
1811
|
}),
|
|
476
|
-
|
|
477
|
-
default:
|
|
478
|
-
|
|
479
|
-
|
|
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)
|
|
480
1816
|
])]),
|
|
481
1817
|
_: 1
|
|
482
1818
|
}),
|
|
483
|
-
|
|
484
|
-
default:
|
|
485
|
-
|
|
486
|
-
|
|
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)
|
|
487
1823
|
])]),
|
|
488
1824
|
_: 1
|
|
489
1825
|
})
|
|
@@ -491,42 +1827,42 @@ const Ce = Z(), Te = [
|
|
|
491
1827
|
_: 1
|
|
492
1828
|
}, 8, ["value"])
|
|
493
1829
|
]),
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
value:
|
|
499
|
-
"onUpdate:value":
|
|
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),
|
|
500
1836
|
"show-alpha": !1,
|
|
501
|
-
swatches:
|
|
1837
|
+
swatches: o(Ze),
|
|
502
1838
|
actions: ["confirm"]
|
|
503
1839
|
}, null, 8, ["value", "swatches"]),
|
|
504
|
-
|
|
1840
|
+
e("span", Go, $(o(s).primaryColor), 1)
|
|
505
1841
|
])
|
|
506
1842
|
]),
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
value:
|
|
511
|
-
"onUpdate:value":
|
|
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),
|
|
512
1848
|
class: "radius-group"
|
|
513
1849
|
}, {
|
|
514
|
-
default:
|
|
515
|
-
|
|
516
|
-
default:
|
|
517
|
-
|
|
1850
|
+
default: l(() => [
|
|
1851
|
+
m(o(J), { value: "small" }, {
|
|
1852
|
+
default: l(() => [...t[22] || (t[22] = [
|
|
1853
|
+
U("小 (4px)", -1)
|
|
518
1854
|
])]),
|
|
519
1855
|
_: 1
|
|
520
1856
|
}),
|
|
521
|
-
|
|
522
|
-
default:
|
|
523
|
-
|
|
1857
|
+
m(o(J), { value: "medium" }, {
|
|
1858
|
+
default: l(() => [...t[23] || (t[23] = [
|
|
1859
|
+
U("中 (6px)", -1)
|
|
524
1860
|
])]),
|
|
525
1861
|
_: 1
|
|
526
1862
|
}),
|
|
527
|
-
|
|
528
|
-
default:
|
|
529
|
-
|
|
1863
|
+
m(o(J), { value: "large" }, {
|
|
1864
|
+
default: l(() => [...t[24] || (t[24] = [
|
|
1865
|
+
U("大 (8px)", -1)
|
|
530
1866
|
])]),
|
|
531
1867
|
_: 1
|
|
532
1868
|
})
|
|
@@ -534,43 +1870,43 @@ const Ce = Z(), Te = [
|
|
|
534
1870
|
_: 1
|
|
535
1871
|
}, 8, ["value"])
|
|
536
1872
|
]),
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
value:
|
|
543
|
-
"onUpdate:value":
|
|
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)
|
|
544
1880
|
}, null, 8, ["value"])
|
|
545
1881
|
]),
|
|
546
|
-
|
|
547
|
-
value:
|
|
548
|
-
"onUpdate:value":
|
|
549
|
-
disabled: !
|
|
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,
|
|
550
1886
|
class: "transition-group"
|
|
551
1887
|
}, {
|
|
552
|
-
default:
|
|
553
|
-
|
|
554
|
-
default:
|
|
555
|
-
|
|
1888
|
+
default: l(() => [
|
|
1889
|
+
m(o(J), { value: "fade" }, {
|
|
1890
|
+
default: l(() => [...t[27] || (t[27] = [
|
|
1891
|
+
U("淡入", -1)
|
|
556
1892
|
])]),
|
|
557
1893
|
_: 1
|
|
558
1894
|
}),
|
|
559
|
-
|
|
560
|
-
default:
|
|
561
|
-
|
|
1895
|
+
m(o(J), { value: "slide" }, {
|
|
1896
|
+
default: l(() => [...t[28] || (t[28] = [
|
|
1897
|
+
U("滑动", -1)
|
|
562
1898
|
])]),
|
|
563
1899
|
_: 1
|
|
564
1900
|
}),
|
|
565
|
-
|
|
566
|
-
default:
|
|
567
|
-
|
|
1901
|
+
m(o(J), { value: "zoom" }, {
|
|
1902
|
+
default: l(() => [...t[29] || (t[29] = [
|
|
1903
|
+
U("缩放", -1)
|
|
568
1904
|
])]),
|
|
569
1905
|
_: 1
|
|
570
1906
|
}),
|
|
571
|
-
|
|
572
|
-
default:
|
|
573
|
-
|
|
1907
|
+
m(o(J), { value: "none" }, {
|
|
1908
|
+
default: l(() => [...t[30] || (t[30] = [
|
|
1909
|
+
U("无", -1)
|
|
574
1910
|
])]),
|
|
575
1911
|
_: 1
|
|
576
1912
|
})
|
|
@@ -578,17 +1914,17 @@ const Ce = Z(), Te = [
|
|
|
578
1914
|
_: 1
|
|
579
1915
|
}, 8, ["value", "disabled"])
|
|
580
1916
|
]),
|
|
581
|
-
|
|
582
|
-
|
|
1917
|
+
e("div", qo, [
|
|
1918
|
+
m(o(ee), {
|
|
583
1919
|
block: "",
|
|
584
1920
|
secondary: "",
|
|
585
|
-
onClick:
|
|
1921
|
+
onClick: D
|
|
586
1922
|
}, {
|
|
587
|
-
icon:
|
|
588
|
-
|
|
1923
|
+
icon: l(() => [...t[32] || (t[32] = [
|
|
1924
|
+
e("span", { class: "i-mdi:restore" }, null, -1)
|
|
589
1925
|
])]),
|
|
590
|
-
default:
|
|
591
|
-
|
|
1926
|
+
default: l(() => [
|
|
1927
|
+
t[33] || (t[33] = U(" 恢复外观默认设置 ", -1))
|
|
592
1928
|
]),
|
|
593
1929
|
_: 1
|
|
594
1930
|
})
|
|
@@ -596,92 +1932,92 @@ const Ce = Z(), Te = [
|
|
|
596
1932
|
]),
|
|
597
1933
|
_: 1
|
|
598
1934
|
}),
|
|
599
|
-
|
|
1935
|
+
m(o(fe), {
|
|
600
1936
|
name: "layout",
|
|
601
1937
|
tab: "📐 布局"
|
|
602
1938
|
}, {
|
|
603
|
-
default:
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
(
|
|
608
|
-
key:
|
|
609
|
-
class:
|
|
610
|
-
active:
|
|
611
|
-
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
|
|
612
1948
|
}]),
|
|
613
|
-
onClick:
|
|
1949
|
+
onClick: Le((j) => C(d.value, d.disabled), ["stop"])
|
|
614
1950
|
}, [
|
|
615
|
-
|
|
616
|
-
(
|
|
617
|
-
|
|
618
|
-
innerHTML:
|
|
619
|
-
}, null, 8,
|
|
1951
|
+
e("div", os, [
|
|
1952
|
+
(n(), r("svg", ss, [
|
|
1953
|
+
e("g", {
|
|
1954
|
+
innerHTML: d.svg
|
|
1955
|
+
}, null, 8, ns)
|
|
620
1956
|
]))
|
|
621
1957
|
]),
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
1958
|
+
e("div", as, [
|
|
1959
|
+
U($(d.label) + " ", 1),
|
|
1960
|
+
d.disabled ? (n(), r("span", is, "敬请期待")) : x("", !0)
|
|
625
1961
|
])
|
|
626
|
-
], 10,
|
|
1962
|
+
], 10, ts))), 128))
|
|
627
1963
|
])
|
|
628
1964
|
]),
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
value:
|
|
635
|
-
"onUpdate:value":
|
|
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)
|
|
636
1972
|
}, null, 8, ["value"])
|
|
637
1973
|
]),
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
value:
|
|
642
|
-
"onUpdate:value":
|
|
643
|
-
disabled: !
|
|
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
|
|
644
1980
|
}, null, 8, ["value", "disabled"])
|
|
645
1981
|
]),
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
value:
|
|
650
|
-
"onUpdate:value":
|
|
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)
|
|
651
1987
|
}, null, 8, ["value"])
|
|
652
1988
|
]),
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
value:
|
|
657
|
-
"onUpdate:value":
|
|
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)
|
|
658
1994
|
}, null, 8, ["value"])
|
|
659
1995
|
])
|
|
660
1996
|
]),
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
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)
|
|
667
2003
|
]),
|
|
668
|
-
|
|
669
|
-
value:
|
|
670
|
-
"onUpdate:value":
|
|
2004
|
+
m(o(Ce), {
|
|
2005
|
+
value: o(s).sidebarWidth,
|
|
2006
|
+
"onUpdate:value": t[9] || (t[9] = (d) => o(s).sidebarWidth = d),
|
|
671
2007
|
min: 180,
|
|
672
2008
|
max: 280,
|
|
673
2009
|
step: 10,
|
|
674
2010
|
marks: { 180: "180", 220: "220", 280: "280" }
|
|
675
2011
|
}, null, 8, ["value"])
|
|
676
2012
|
]),
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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)
|
|
681
2017
|
]),
|
|
682
|
-
|
|
683
|
-
value:
|
|
684
|
-
"onUpdate:value":
|
|
2018
|
+
m(o(Ce), {
|
|
2019
|
+
value: o(s).headerHeight,
|
|
2020
|
+
"onUpdate:value": t[10] || (t[10] = (d) => o(s).headerHeight = d),
|
|
685
2021
|
min: 48,
|
|
686
2022
|
max: 64,
|
|
687
2023
|
step: 4,
|
|
@@ -689,17 +2025,17 @@ const Ce = Z(), Te = [
|
|
|
689
2025
|
}, null, 8, ["value"])
|
|
690
2026
|
])
|
|
691
2027
|
]),
|
|
692
|
-
|
|
693
|
-
|
|
2028
|
+
e("div", ys, [
|
|
2029
|
+
m(o(ee), {
|
|
694
2030
|
block: "",
|
|
695
2031
|
secondary: "",
|
|
696
|
-
onClick:
|
|
2032
|
+
onClick: I
|
|
697
2033
|
}, {
|
|
698
|
-
icon:
|
|
699
|
-
|
|
2034
|
+
icon: l(() => [...t[43] || (t[43] = [
|
|
2035
|
+
e("span", { class: "i-mdi:restore" }, null, -1)
|
|
700
2036
|
])]),
|
|
701
|
-
default:
|
|
702
|
-
|
|
2037
|
+
default: l(() => [
|
|
2038
|
+
t[44] || (t[44] = U(" 恢复布局默认设置 ", -1))
|
|
703
2039
|
]),
|
|
704
2040
|
_: 1
|
|
705
2041
|
})
|
|
@@ -707,151 +2043,151 @@ const Ce = Z(), Te = [
|
|
|
707
2043
|
]),
|
|
708
2044
|
_: 1
|
|
709
2045
|
}),
|
|
710
|
-
|
|
2046
|
+
m(o(fe), {
|
|
711
2047
|
name: "features",
|
|
712
2048
|
tab: "🔧 功能"
|
|
713
2049
|
}, {
|
|
714
|
-
default:
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
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), {
|
|
719
2055
|
secondary: "",
|
|
720
|
-
onClick:
|
|
2056
|
+
onClick: X
|
|
721
2057
|
}, {
|
|
722
|
-
icon:
|
|
723
|
-
|
|
2058
|
+
icon: l(() => [...t[45] || (t[45] = [
|
|
2059
|
+
e("span", { class: "i-mdi:delete-sweep" }, null, -1)
|
|
724
2060
|
])]),
|
|
725
|
-
default:
|
|
726
|
-
|
|
2061
|
+
default: l(() => [
|
|
2062
|
+
t[46] || (t[46] = U(" 清除缓存 ", -1))
|
|
727
2063
|
]),
|
|
728
2064
|
_: 1
|
|
729
2065
|
}),
|
|
730
|
-
|
|
2066
|
+
m(o(ee), {
|
|
731
2067
|
secondary: "",
|
|
732
|
-
onClick:
|
|
2068
|
+
onClick: F
|
|
733
2069
|
}, {
|
|
734
|
-
icon:
|
|
735
|
-
|
|
2070
|
+
icon: l(() => [...t[47] || (t[47] = [
|
|
2071
|
+
e("span", { class: "i-mdi:refresh" }, null, -1)
|
|
736
2072
|
])]),
|
|
737
|
-
default:
|
|
738
|
-
|
|
2073
|
+
default: l(() => [
|
|
2074
|
+
t[48] || (t[48] = U(" 重新加载 ", -1))
|
|
739
2075
|
]),
|
|
740
2076
|
_: 1
|
|
741
2077
|
})
|
|
742
2078
|
])
|
|
743
2079
|
]),
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
2080
|
+
e("div", $s, [
|
|
2081
|
+
t[56] || (t[56] = e("div", { class: "section-title" }, "配置管理", -1)),
|
|
2082
|
+
e("div", ks, [
|
|
2083
|
+
m(o(ee), {
|
|
748
2084
|
secondary: "",
|
|
749
|
-
onClick:
|
|
2085
|
+
onClick: B
|
|
750
2086
|
}, {
|
|
751
|
-
icon:
|
|
752
|
-
|
|
2087
|
+
icon: l(() => [...t[50] || (t[50] = [
|
|
2088
|
+
e("span", { class: "i-mdi:download" }, null, -1)
|
|
753
2089
|
])]),
|
|
754
|
-
default:
|
|
755
|
-
|
|
2090
|
+
default: l(() => [
|
|
2091
|
+
t[51] || (t[51] = U(" 导出配置 ", -1))
|
|
756
2092
|
]),
|
|
757
2093
|
_: 1
|
|
758
2094
|
}),
|
|
759
|
-
|
|
2095
|
+
m(o(ee), {
|
|
760
2096
|
secondary: "",
|
|
761
|
-
onClick:
|
|
2097
|
+
onClick: Y
|
|
762
2098
|
}, {
|
|
763
|
-
icon:
|
|
764
|
-
|
|
2099
|
+
icon: l(() => [...t[52] || (t[52] = [
|
|
2100
|
+
e("span", { class: "i-mdi:upload" }, null, -1)
|
|
765
2101
|
])]),
|
|
766
|
-
default:
|
|
767
|
-
|
|
2102
|
+
default: l(() => [
|
|
2103
|
+
t[53] || (t[53] = U(" 导入配置 ", -1))
|
|
768
2104
|
]),
|
|
769
2105
|
_: 1
|
|
770
2106
|
})
|
|
771
2107
|
]),
|
|
772
|
-
|
|
2108
|
+
m(o(ee), {
|
|
773
2109
|
block: "",
|
|
774
2110
|
type: "error",
|
|
775
2111
|
secondary: "",
|
|
776
2112
|
class: "mt-2",
|
|
777
|
-
onClick:
|
|
2113
|
+
onClick: V
|
|
778
2114
|
}, {
|
|
779
|
-
icon:
|
|
780
|
-
|
|
2115
|
+
icon: l(() => [...t[54] || (t[54] = [
|
|
2116
|
+
e("span", { class: "i-mdi:restore" }, null, -1)
|
|
781
2117
|
])]),
|
|
782
|
-
default:
|
|
783
|
-
|
|
2118
|
+
default: l(() => [
|
|
2119
|
+
t[55] || (t[55] = U(" 重置所有配置 ", -1))
|
|
784
2120
|
]),
|
|
785
2121
|
_: 1
|
|
786
2122
|
})
|
|
787
2123
|
]),
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
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" }, "用于哀悼日场景")
|
|
794
2130
|
], -1)),
|
|
795
|
-
|
|
796
|
-
value:
|
|
797
|
-
"onUpdate:value":
|
|
2131
|
+
m(o(Q), {
|
|
2132
|
+
value: a.value,
|
|
2133
|
+
"onUpdate:value": t[11] || (t[11] = (d) => a.value = d)
|
|
798
2134
|
}, null, 8, ["value"])
|
|
799
2135
|
]),
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
2136
|
+
e("div", Ts, [
|
|
2137
|
+
t[58] || (t[58] = e("div", { class: "setting-label" }, [
|
|
2138
|
+
e("span", null, "色弱模式"),
|
|
2139
|
+
e("span", { class: "setting-desc" }, "提供无障碍访问支持")
|
|
804
2140
|
], -1)),
|
|
805
|
-
|
|
806
|
-
value:
|
|
807
|
-
"onUpdate:value":
|
|
2141
|
+
m(o(Q), {
|
|
2142
|
+
value: u.value,
|
|
2143
|
+
"onUpdate:value": t[12] || (t[12] = (d) => u.value = d)
|
|
808
2144
|
}, null, 8, ["value"])
|
|
809
2145
|
])
|
|
810
2146
|
]),
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
value:
|
|
817
|
-
"onUpdate:value":
|
|
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)
|
|
818
2154
|
}, null, 8, ["value"])
|
|
819
2155
|
]),
|
|
820
|
-
|
|
821
|
-
|
|
2156
|
+
c.value ? (n(), r("div", Is, [
|
|
2157
|
+
m(o(Ke), {
|
|
822
2158
|
value: k.value,
|
|
823
|
-
"onUpdate:value":
|
|
2159
|
+
"onUpdate:value": t[14] || (t[14] = (d) => k.value = d),
|
|
824
2160
|
placeholder: "请输入水印内容",
|
|
825
2161
|
size: "small"
|
|
826
2162
|
}, null, 8, ["value"])
|
|
827
|
-
])) :
|
|
2163
|
+
])) : x("", !0)
|
|
828
2164
|
]),
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
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)
|
|
835
2171
|
]),
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
2172
|
+
e("div", As, [
|
|
2173
|
+
t[63] || (t[63] = e("span", { class: "info-label" }, "操作系统", -1)),
|
|
2174
|
+
e("span", Ls, $(M.value.os), 1)
|
|
839
2175
|
]),
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
2176
|
+
e("div", Ds, [
|
|
2177
|
+
t[64] || (t[64] = e("span", { class: "info-label" }, "屏幕分辨率", -1)),
|
|
2178
|
+
e("span", Ns, $(M.value.resolution), 1)
|
|
843
2179
|
]),
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
2180
|
+
e("div", Es, [
|
|
2181
|
+
t[65] || (t[65] = e("span", { class: "info-label" }, "设备像素比", -1)),
|
|
2182
|
+
e("span", Bs, $(M.value.pixelRatio), 1)
|
|
847
2183
|
]),
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
2184
|
+
e("div", Fs, [
|
|
2185
|
+
t[66] || (t[66] = e("span", { class: "info-label" }, "语言", -1)),
|
|
2186
|
+
e("span", Ws, $(M.value.language), 1)
|
|
851
2187
|
]),
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
2188
|
+
e("div", Os, [
|
|
2189
|
+
t[67] || (t[67] = e("span", { class: "info-label" }, "时区", -1)),
|
|
2190
|
+
e("span", Us, $(M.value.timezone), 1)
|
|
855
2191
|
])
|
|
856
2192
|
])
|
|
857
2193
|
])
|
|
@@ -868,27 +2204,411 @@ const Ce = Z(), Te = [
|
|
|
868
2204
|
_: 1
|
|
869
2205
|
}, 8, ["show"]));
|
|
870
2206
|
}
|
|
871
|
-
}),
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
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;
|
|
880
2573
|
}
|
|
881
2574
|
export {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
It as
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
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
|
|
893
2613
|
};
|
|
894
2614
|
//# sourceMappingURL=index.js.map
|