@robot-admin/layout 0.1.1 → 2.0.2
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 +16 -47
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +34 -13
- package/dist/index.js +293 -297
- package/dist/index.js.map +1 -1
- package/package.json +71 -66
- package/src/styles/settings.scss +17 -12
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as d, computed as
|
|
2
|
-
import { useMessage as
|
|
3
|
-
import { defineStore as
|
|
4
|
-
const
|
|
1
|
+
import { ref as d, computed as F, watch as $, defineComponent as oe, useModel as le, onUnmounted as ie, openBlock as R, createBlock as ae, unref as l, withCtx as n, createVNode as a, createElementVNode as t, createElementBlock as W, Fragment as K, renderList as G, normalizeClass as Y, toDisplayString as h, normalizeStyle as ne, createTextVNode as c, withModifiers as re, createCommentVNode as Z } from "vue";
|
|
2
|
+
import { useMessage as de, useDialog as ue, NDrawer as ce, NDrawerContent as ve, NTabs as pe, NTabPane as j, NRadioGroup as J, NRadioButton as M, NColorPicker as me, NSwitch as H, NButton as I, NSlider as q, NInput as ge } from "naive-ui";
|
|
3
|
+
import { defineStore as fe } from "pinia";
|
|
4
|
+
const ye = [
|
|
5
5
|
{ name: "拂晓蓝", value: "#409eff" },
|
|
6
6
|
{ name: "薄暮红", value: "#f5222d" },
|
|
7
7
|
{ name: "火山橙", value: "#fa541c" },
|
|
@@ -10,7 +10,7 @@ const ge = [
|
|
|
10
10
|
{ name: "明青", value: "#13c2c2" },
|
|
11
11
|
{ name: "极客蓝", value: "#2f54eb" },
|
|
12
12
|
{ name: "酱紫", value: "#722ed1" }
|
|
13
|
-
],
|
|
13
|
+
], he = [
|
|
14
14
|
{
|
|
15
15
|
name: "科技蓝",
|
|
16
16
|
icon: "💙",
|
|
@@ -41,7 +41,7 @@ const ge = [
|
|
|
41
41
|
icon: "❤️",
|
|
42
42
|
primaryColor: "#f5222d"
|
|
43
43
|
}
|
|
44
|
-
],
|
|
44
|
+
], Wt = [
|
|
45
45
|
{
|
|
46
46
|
mode: "side",
|
|
47
47
|
label: "左侧菜单",
|
|
@@ -78,16 +78,16 @@ const ge = [
|
|
|
78
78
|
description: "卡片式布局风格",
|
|
79
79
|
icon: "i-mdi:card-outline"
|
|
80
80
|
}
|
|
81
|
-
],
|
|
81
|
+
], be = {
|
|
82
82
|
small: "4px",
|
|
83
83
|
medium: "6px",
|
|
84
84
|
large: "8px"
|
|
85
|
-
},
|
|
85
|
+
}, we = {
|
|
86
86
|
fade: "fade-transform",
|
|
87
87
|
slide: "fade-slide",
|
|
88
88
|
zoom: "fade-zoom",
|
|
89
89
|
none: ""
|
|
90
|
-
},
|
|
90
|
+
}, v = {
|
|
91
91
|
// 外观
|
|
92
92
|
themeMode: "light",
|
|
93
93
|
primaryColor: "#409eff",
|
|
@@ -96,6 +96,7 @@ const ge = [
|
|
|
96
96
|
enableTransition: !0,
|
|
97
97
|
// 布局
|
|
98
98
|
layoutMode: "side",
|
|
99
|
+
collapsed: !1,
|
|
99
100
|
fixedHeader: !0,
|
|
100
101
|
showBreadcrumb: !0,
|
|
101
102
|
showBreadcrumbIcon: !0,
|
|
@@ -108,119 +109,115 @@ const ge = [
|
|
|
108
109
|
headerHeight: 56,
|
|
109
110
|
// 高级
|
|
110
111
|
enableHotkeys: !0,
|
|
111
|
-
version: "
|
|
112
|
-
},
|
|
112
|
+
version: "2.0.2"
|
|
113
|
+
}, xe = ye.map((b) => b.value);
|
|
113
114
|
function Q(b, u) {
|
|
114
|
-
const
|
|
115
|
-
return `#${(s << 16 | w << 8 |
|
|
115
|
+
const p = parseInt(b.replace("#", ""), 16), s = Math.min(255, Math.max(0, (p >> 16) + u)), w = Math.min(255, Math.max(0, (p >> 8 & 255) + u)), g = Math.min(255, Math.max(0, (p & 255) + u));
|
|
116
|
+
return `#${(s << 16 | w << 8 | g).toString(16).padStart(6, "0")}`;
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
const { defaults: u = {}, onThemeModeChange:
|
|
119
|
-
...
|
|
118
|
+
function X(b = {}) {
|
|
119
|
+
const { defaults: u = {}, onThemeModeChange: p } = b, s = {
|
|
120
|
+
...v,
|
|
120
121
|
...u
|
|
121
122
|
};
|
|
122
|
-
return
|
|
123
|
-
const w = d(s.themeMode),
|
|
123
|
+
return fe("settings", () => {
|
|
124
|
+
const w = d(s.themeMode), g = d(s.primaryColor), x = d(s.borderRadius), f = d(s.transitionType), y = d(s.enableTransition), k = d(s.layoutMode), m = d(s.collapsed), O = d(s.fixedHeader), V = d(s.showBreadcrumb), S = d(s.showBreadcrumbIcon), P = d(s.showTagsView), B = d(s.tagsViewHeight), N = d(s.tagsViewStyle), L = d(s.showFooter), U = d(s.sidebarWidth), _ = d(
|
|
124
125
|
s.sidebarCollapsedWidth
|
|
125
|
-
),
|
|
126
|
-
() =>
|
|
127
|
-
),
|
|
126
|
+
), E = d(s.headerHeight), D = d(s.enableHotkeys), z = d(s.version), A = F(
|
|
127
|
+
() => be[x.value]
|
|
128
|
+
), i = F(() => we[f.value]), e = F(
|
|
128
129
|
() => y.value && f.value !== "none"
|
|
129
|
-
),
|
|
130
|
+
), o = F(() => ({
|
|
130
131
|
themeMode: w.value,
|
|
131
|
-
primaryColor:
|
|
132
|
+
primaryColor: g.value,
|
|
132
133
|
borderRadius: x.value,
|
|
133
134
|
transitionType: f.value,
|
|
134
135
|
enableTransition: y.value,
|
|
135
|
-
layoutMode:
|
|
136
|
-
|
|
136
|
+
layoutMode: k.value,
|
|
137
|
+
collapsed: m.value,
|
|
138
|
+
fixedHeader: O.value,
|
|
137
139
|
showBreadcrumb: V.value,
|
|
138
|
-
showBreadcrumbIcon:
|
|
139
|
-
showTagsView:
|
|
140
|
-
tagsViewHeight:
|
|
141
|
-
tagsViewStyle:
|
|
142
|
-
showFooter:
|
|
143
|
-
sidebarWidth:
|
|
144
|
-
sidebarCollapsedWidth:
|
|
145
|
-
headerHeight:
|
|
146
|
-
enableHotkeys:
|
|
147
|
-
version:
|
|
148
|
-
})),
|
|
140
|
+
showBreadcrumbIcon: S.value,
|
|
141
|
+
showTagsView: P.value,
|
|
142
|
+
tagsViewHeight: B.value,
|
|
143
|
+
tagsViewStyle: N.value,
|
|
144
|
+
showFooter: L.value,
|
|
145
|
+
sidebarWidth: U.value,
|
|
146
|
+
sidebarCollapsedWidth: _.value,
|
|
147
|
+
headerHeight: E.value,
|
|
148
|
+
enableHotkeys: D.value,
|
|
149
|
+
version: z.value
|
|
150
|
+
})), C = () => {
|
|
149
151
|
if (typeof document > "u") return;
|
|
150
152
|
const r = document.documentElement;
|
|
151
|
-
r.style.setProperty("--primary-color",
|
|
153
|
+
r.style.setProperty("--primary-color", g.value), r.style.setProperty(
|
|
152
154
|
"--primary-color-hover",
|
|
153
|
-
Q(
|
|
155
|
+
Q(g.value, 10)
|
|
154
156
|
), r.style.setProperty(
|
|
155
157
|
"--primary-color-pressed",
|
|
156
|
-
Q(
|
|
157
|
-
), r.style.setProperty("--border-radius", A.value), r.style.setProperty("--sidebar-width", `${
|
|
158
|
+
Q(g.value, -10)
|
|
159
|
+
), r.style.setProperty("--border-radius", A.value), r.style.setProperty("--sidebar-width", `${U.value}px`), r.style.setProperty(
|
|
158
160
|
"--sidebar-collapsed-width",
|
|
159
|
-
`${
|
|
160
|
-
), r.style.setProperty("--header-height", `${
|
|
161
|
+
`${_.value}px`
|
|
162
|
+
), r.style.setProperty("--header-height", `${E.value}px`), r.style.setProperty("--tags-view-height", `${B.value}px`);
|
|
161
163
|
}, T = async (r) => {
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
w.value = s.themeMode,
|
|
165
|
-
},
|
|
166
|
-
w.value = r,
|
|
164
|
+
g.value = r.primaryColor, r.settings && (r.settings.borderRadius && (x.value = r.settings.borderRadius), r.settings.transitionType && (f.value = r.settings.transitionType), r.settings.showBreadcrumb !== void 0 && (V.value = r.settings.showBreadcrumb), r.settings.showTagsView !== void 0 && (P.value = r.settings.showTagsView), r.settings.tagsViewStyle && (N.value = r.settings.tagsViewStyle));
|
|
165
|
+
}, ee = () => {
|
|
166
|
+
w.value = s.themeMode, g.value = s.primaryColor, x.value = s.borderRadius, f.value = s.transitionType, y.value = s.enableTransition, k.value = s.layoutMode, m.value = s.collapsed, O.value = s.fixedHeader, V.value = s.showBreadcrumb, S.value = s.showBreadcrumbIcon, P.value = s.showTagsView, B.value = s.tagsViewHeight, N.value = s.tagsViewStyle, L.value = s.showFooter, U.value = s.sidebarWidth, _.value = s.sidebarCollapsedWidth, E.value = s.headerHeight, D.value = s.enableHotkeys;
|
|
167
|
+
}, te = async (r) => {
|
|
168
|
+
w.value = r, p && await p(r);
|
|
169
|
+
}, se = () => {
|
|
170
|
+
m.value = !m.value;
|
|
167
171
|
};
|
|
168
|
-
return
|
|
172
|
+
return $(
|
|
169
173
|
[
|
|
170
|
-
|
|
174
|
+
g,
|
|
171
175
|
A,
|
|
172
|
-
_,
|
|
173
|
-
B,
|
|
174
176
|
U,
|
|
175
|
-
|
|
177
|
+
_,
|
|
178
|
+
E,
|
|
179
|
+
B
|
|
176
180
|
],
|
|
177
181
|
() => {
|
|
178
|
-
|
|
182
|
+
C();
|
|
179
183
|
},
|
|
180
184
|
{ immediate: !0 }
|
|
181
185
|
), {
|
|
182
186
|
// 状态
|
|
183
187
|
themeMode: w,
|
|
184
|
-
primaryColor:
|
|
188
|
+
primaryColor: g,
|
|
185
189
|
borderRadius: x,
|
|
186
190
|
transitionType: f,
|
|
187
191
|
enableTransition: y,
|
|
188
|
-
layoutMode:
|
|
189
|
-
|
|
192
|
+
layoutMode: k,
|
|
193
|
+
collapsed: m,
|
|
194
|
+
fixedHeader: O,
|
|
190
195
|
showBreadcrumb: V,
|
|
191
|
-
showBreadcrumbIcon:
|
|
192
|
-
showTagsView:
|
|
193
|
-
tagsViewHeight:
|
|
194
|
-
tagsViewStyle:
|
|
195
|
-
showFooter:
|
|
196
|
-
sidebarWidth:
|
|
197
|
-
sidebarCollapsedWidth:
|
|
198
|
-
headerHeight:
|
|
199
|
-
enableHotkeys:
|
|
200
|
-
version:
|
|
196
|
+
showBreadcrumbIcon: S,
|
|
197
|
+
showTagsView: P,
|
|
198
|
+
tagsViewHeight: B,
|
|
199
|
+
tagsViewStyle: N,
|
|
200
|
+
showFooter: L,
|
|
201
|
+
sidebarWidth: U,
|
|
202
|
+
sidebarCollapsedWidth: _,
|
|
203
|
+
headerHeight: E,
|
|
204
|
+
enableHotkeys: D,
|
|
205
|
+
version: z,
|
|
201
206
|
// 计算属性
|
|
202
207
|
borderRadiusValue: A,
|
|
203
|
-
transitionName:
|
|
204
|
-
shouldEnableTransition:
|
|
205
|
-
settingsState:
|
|
208
|
+
transitionName: i,
|
|
209
|
+
shouldEnableTransition: e,
|
|
210
|
+
settingsState: o,
|
|
206
211
|
// 方法
|
|
207
|
-
syncCSSVariables:
|
|
212
|
+
syncCSSVariables: C,
|
|
208
213
|
applyPreset: T,
|
|
209
|
-
resetSettings:
|
|
210
|
-
updateThemeMode:
|
|
214
|
+
resetSettings: ee,
|
|
215
|
+
updateThemeMode: te,
|
|
216
|
+
toggleCollapse: se
|
|
211
217
|
};
|
|
212
218
|
});
|
|
213
219
|
}
|
|
214
|
-
const
|
|
215
|
-
"#409eff",
|
|
216
|
-
"#f5222d",
|
|
217
|
-
"#fa541c",
|
|
218
|
-
"#faad14",
|
|
219
|
-
"#52c41a",
|
|
220
|
-
"#13c2c2",
|
|
221
|
-
"#2f54eb",
|
|
222
|
-
"#722ed1"
|
|
223
|
-
], xe = [
|
|
220
|
+
const Ce = X(), Te = [
|
|
224
221
|
{
|
|
225
222
|
label: "左侧菜单(默认)",
|
|
226
223
|
value: "side",
|
|
@@ -283,33 +280,31 @@ const be = Z(), we = [
|
|
|
283
280
|
<rect x="32" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.4"/>
|
|
284
281
|
`
|
|
285
282
|
}
|
|
286
|
-
],
|
|
283
|
+
], ke = { class: "settings-section" }, Se = { class: "preset-grid" }, Me = ["onClick"], Re = { class: "preset-icon" }, He = { class: "preset-name" }, Ve = { class: "preset-color" }, Be = { class: "settings-section" }, Ue = { class: "settings-section" }, _e = { class: "color-picker-wrapper" }, Ee = { class: "color-value" }, We = { class: "settings-section" }, Ie = { class: "settings-section" }, Oe = { class: "flex items-center justify-between mb-2" }, Pe = { class: "settings-section" }, Ne = { class: "settings-section" }, Le = { class: "layout-grid" }, De = ["onClick"], Ae = { class: "layout-screenshot" }, Fe = {
|
|
287
284
|
class: "layout-svg",
|
|
288
285
|
viewBox: "0 0 56 48",
|
|
289
286
|
fill: "none",
|
|
290
287
|
xmlns: "http://www.w3.org/2000/svg"
|
|
291
|
-
},
|
|
288
|
+
}, $e = ["innerHTML"], ze = { class: "layout-label" }, je = {
|
|
292
289
|
key: 0,
|
|
293
290
|
class: "badge-soon"
|
|
294
|
-
},
|
|
291
|
+
}, Je = { class: "settings-section" }, Ke = { class: "setting-item" }, Ge = { class: "setting-item" }, Ye = { class: "setting-item" }, Ze = { class: "setting-item" }, qe = { class: "settings-section" }, Qe = { class: "slider-item" }, Xe = { class: "slider-label" }, et = { class: "slider-value" }, tt = { class: "slider-item" }, st = { class: "slider-label" }, ot = { class: "slider-value" }, lt = { class: "settings-section" }, it = { class: "settings-section" }, at = { class: "action-buttons-grid" }, nt = { class: "settings-section" }, rt = { class: "action-buttons-grid" }, dt = { class: "settings-section" }, ut = { class: "setting-item" }, ct = { class: "setting-item" }, vt = { class: "settings-section" }, pt = { class: "setting-item" }, mt = {
|
|
295
292
|
key: 0,
|
|
296
293
|
class: "mt-2"
|
|
297
|
-
},
|
|
294
|
+
}, gt = { class: "settings-section" }, ft = { class: "system-info" }, yt = { class: "info-item" }, ht = { class: "info-value" }, bt = { class: "info-item" }, wt = { class: "info-value" }, xt = { class: "info-item" }, Ct = { class: "info-value" }, Tt = { class: "info-item" }, kt = { class: "info-value" }, St = { class: "info-item" }, Mt = { class: "info-value" }, Rt = { class: "info-item" }, Ht = { class: "info-value" }, Vt = /* @__PURE__ */ oe({
|
|
298
295
|
__name: "index",
|
|
299
|
-
props:
|
|
300
|
-
storageKey: {}
|
|
301
|
-
}, {
|
|
296
|
+
props: {
|
|
302
297
|
show: { type: Boolean, default: !1 },
|
|
303
298
|
showModifiers: {}
|
|
304
|
-
}
|
|
299
|
+
},
|
|
305
300
|
emits: ["update:show"],
|
|
306
301
|
setup(b) {
|
|
307
|
-
const u =
|
|
308
|
-
let
|
|
309
|
-
const
|
|
310
|
-
|
|
302
|
+
const u = de(), p = ue(), s = Ce(), w = le(b, "show"), g = d("appearance"), x = d(!1), f = d(!1), y = d(!1), k = d("Robot Admin");
|
|
303
|
+
let m = null;
|
|
304
|
+
const O = (i) => {
|
|
305
|
+
m && (document.body.removeChild(m), m = null);
|
|
311
306
|
const e = document.createElement("canvas"), o = e.getContext("2d");
|
|
312
|
-
e.width = 200, e.height = 150, o.font = "14px Microsoft JhengHei", o.fillStyle = "rgba(120, 120, 120, 0.15)", o.rotate(-20 * Math.PI / 180), o.fillText(
|
|
307
|
+
e.width = 200, e.height = 150, o.font = "14px Microsoft JhengHei", o.fillStyle = "rgba(120, 120, 120, 0.15)", o.rotate(-20 * Math.PI / 180), o.fillText(i, 0, 80), m = document.createElement("div"), m.style.cssText = `
|
|
313
308
|
position: fixed;
|
|
314
309
|
top: 0;
|
|
315
310
|
left: 0;
|
|
@@ -320,44 +315,44 @@ const be = Z(), we = [
|
|
|
320
315
|
background-repeat: repeat;
|
|
321
316
|
z-index: 9999;
|
|
322
317
|
user-select: none;
|
|
323
|
-
`, document.body.appendChild(
|
|
324
|
-
},
|
|
325
|
-
|
|
318
|
+
`, document.body.appendChild(m);
|
|
319
|
+
}, V = () => {
|
|
320
|
+
m && (document.body.removeChild(m), m = null);
|
|
326
321
|
};
|
|
327
|
-
|
|
328
|
-
document.documentElement.classList.toggle("gray-mode",
|
|
329
|
-
}),
|
|
330
|
-
document.documentElement.classList.toggle("color-weak-mode",
|
|
331
|
-
}),
|
|
332
|
-
|
|
333
|
-
}),
|
|
334
|
-
y.value &&
|
|
322
|
+
$(x, (i) => {
|
|
323
|
+
document.documentElement.classList.toggle("gray-mode", i);
|
|
324
|
+
}), $(f, (i) => {
|
|
325
|
+
document.documentElement.classList.toggle("color-weak-mode", i);
|
|
326
|
+
}), $(y, (i) => {
|
|
327
|
+
i ? O(k.value) : V();
|
|
328
|
+
}), $(k, (i) => {
|
|
329
|
+
y.value && O(i);
|
|
335
330
|
});
|
|
336
|
-
const
|
|
337
|
-
const
|
|
331
|
+
const S = F(() => {
|
|
332
|
+
const i = navigator.userAgent;
|
|
338
333
|
let e = "Unknown", o = "Unknown";
|
|
339
|
-
return
|
|
334
|
+
return i.includes("Chrome") ? e = "Chrome" : i.includes("Firefox") ? e = "Firefox" : i.includes("Safari") ? e = "Safari" : i.includes("Edge") && (e = "Edge"), i.includes("Windows") ? o = "Windows" : i.includes("Mac") ? o = "macOS" : i.includes("Linux") ? o = "Linux" : i.includes("Android") ? o = "Android" : i.includes("iOS") && (o = "iOS"), {
|
|
340
335
|
browser: e,
|
|
341
336
|
os: o,
|
|
342
337
|
resolution: `${window.screen.width} × ${window.screen.height}`,
|
|
343
338
|
pixelRatio: window.devicePixelRatio + "x",
|
|
344
339
|
language: navigator.language,
|
|
345
|
-
timezone:
|
|
340
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
346
341
|
};
|
|
347
342
|
});
|
|
348
|
-
|
|
349
|
-
|
|
343
|
+
ie(() => {
|
|
344
|
+
V();
|
|
350
345
|
});
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
},
|
|
354
|
-
s.applyPreset(
|
|
355
|
-
},
|
|
356
|
-
s.themeMode =
|
|
357
|
-
}, B = () => {
|
|
358
|
-
s.layoutMode = m.layoutMode, s.showBreadcrumb = m.showBreadcrumb, s.showBreadcrumbIcon = m.showBreadcrumbIcon, s.showTagsView = m.showTagsView, s.showFooter = m.showFooter, s.sidebarWidth = m.sidebarWidth, s.sidebarCollapsedWidth = m.sidebarCollapsedWidth, s.headerHeight = m.headerHeight, s.tagsViewHeight = m.tagsViewHeight, u.success("已恢复布局默认设置");
|
|
346
|
+
const P = (i, e) => {
|
|
347
|
+
e || (s.layoutMode = i);
|
|
348
|
+
}, B = (i) => s.primaryColor === i.primaryColor, N = (i) => {
|
|
349
|
+
s.applyPreset(i), u.success(`已应用「${i.name}」主题方案`);
|
|
350
|
+
}, L = () => {
|
|
351
|
+
s.themeMode = v.themeMode, s.primaryColor = v.primaryColor, s.borderRadius = v.borderRadius, s.transitionType = v.transitionType, s.enableTransition = v.enableTransition, u.success("已恢复外观默认设置");
|
|
359
352
|
}, U = () => {
|
|
360
|
-
v.
|
|
353
|
+
s.layoutMode = v.layoutMode, s.fixedHeader = v.fixedHeader, s.showBreadcrumb = v.showBreadcrumb, s.showBreadcrumbIcon = v.showBreadcrumbIcon, s.showTagsView = v.showTagsView, s.tagsViewHeight = v.tagsViewHeight, s.tagsViewStyle = v.tagsViewStyle, s.showFooter = v.showFooter, s.sidebarWidth = v.sidebarWidth, s.sidebarCollapsedWidth = v.sidebarCollapsedWidth, s.headerHeight = v.headerHeight, u.success("已恢复布局默认设置");
|
|
354
|
+
}, _ = () => {
|
|
355
|
+
p.warning({
|
|
361
356
|
title: "确认重置",
|
|
362
357
|
content: "确定要恢复默认配置吗?此操作不可撤销。",
|
|
363
358
|
positiveText: "确认",
|
|
@@ -366,49 +361,49 @@ const be = Z(), we = [
|
|
|
366
361
|
s.resetSettings(), u.success("已恢复默认配置");
|
|
367
362
|
}
|
|
368
363
|
});
|
|
369
|
-
},
|
|
370
|
-
|
|
364
|
+
}, E = () => {
|
|
365
|
+
p.warning({
|
|
371
366
|
title: "确认清除",
|
|
372
367
|
content: "确定要清除浏览器缓存吗?",
|
|
373
368
|
positiveText: "确认",
|
|
374
369
|
negativeText: "取消",
|
|
375
370
|
onPositiveClick: () => {
|
|
376
|
-
const
|
|
371
|
+
const i = ["theme-mode", "robot-admin-settings"];
|
|
377
372
|
Object.keys(localStorage).forEach((o) => {
|
|
378
|
-
|
|
373
|
+
i.includes(o) || localStorage.removeItem(o);
|
|
379
374
|
}), sessionStorage.clear(), u.success("缓存已清除");
|
|
380
375
|
}
|
|
381
376
|
});
|
|
382
|
-
},
|
|
377
|
+
}, D = () => {
|
|
383
378
|
location.reload();
|
|
384
|
-
},
|
|
385
|
-
const
|
|
379
|
+
}, z = () => {
|
|
380
|
+
const i = {
|
|
386
381
|
settings: s.settingsState,
|
|
387
382
|
gray: x.value,
|
|
388
383
|
colorWeak: f.value,
|
|
389
384
|
watermark: {
|
|
390
385
|
enabled: y.value,
|
|
391
|
-
text:
|
|
386
|
+
text: k.value
|
|
392
387
|
},
|
|
393
388
|
exportTime: (/* @__PURE__ */ new Date()).toISOString()
|
|
394
|
-
}, e = new Blob([JSON.stringify(
|
|
389
|
+
}, e = new Blob([JSON.stringify(i, null, 2)], {
|
|
395
390
|
type: "application/json"
|
|
396
|
-
}), o = URL.createObjectURL(e),
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
const
|
|
400
|
-
|
|
391
|
+
}), o = URL.createObjectURL(e), C = document.createElement("a");
|
|
392
|
+
C.href = o, C.download = `robot-admin-config-${Date.now()}.json`, C.click(), URL.revokeObjectURL(o), u.success("配置已导出");
|
|
393
|
+
}, A = () => {
|
|
394
|
+
const i = document.createElement("input");
|
|
395
|
+
i.type = "file", i.accept = "application/json", i.onchange = async (e) => {
|
|
401
396
|
const o = e.target.files?.[0];
|
|
402
397
|
if (o)
|
|
403
398
|
try {
|
|
404
|
-
const
|
|
405
|
-
|
|
399
|
+
const C = await o.text(), T = JSON.parse(C);
|
|
400
|
+
T.settings && s.$patch(T.settings), T.gray !== void 0 && (x.value = T.gray), T.colorWeak !== void 0 && (f.value = T.colorWeak), T.watermark && (y.value = T.watermark.enabled, k.value = T.watermark.text), u.success("配置已导入");
|
|
406
401
|
} catch {
|
|
407
402
|
u.error("配置文件格式错误");
|
|
408
403
|
}
|
|
409
|
-
},
|
|
404
|
+
}, i.click();
|
|
410
405
|
};
|
|
411
|
-
return (
|
|
406
|
+
return (i, e) => (R(), ae(l(ce), {
|
|
412
407
|
show: w.value,
|
|
413
408
|
"onUpdate:show": e[16] || (e[16] = (o) => w.value = o),
|
|
414
409
|
width: 380,
|
|
@@ -417,64 +412,64 @@ const be = Z(), we = [
|
|
|
417
412
|
"block-scroll": !1
|
|
418
413
|
}, {
|
|
419
414
|
default: n(() => [
|
|
420
|
-
a(
|
|
415
|
+
a(l(ve), {
|
|
421
416
|
title: "⚙️ 布局配置",
|
|
422
417
|
closable: ""
|
|
423
418
|
}, {
|
|
424
419
|
default: n(() => [
|
|
425
|
-
a(
|
|
426
|
-
value:
|
|
427
|
-
"onUpdate:value": e[15] || (e[15] = (o) =>
|
|
420
|
+
a(l(pe), {
|
|
421
|
+
value: g.value,
|
|
422
|
+
"onUpdate:value": e[15] || (e[15] = (o) => g.value = o),
|
|
428
423
|
animated: "",
|
|
429
424
|
class: "settings-tabs"
|
|
430
425
|
}, {
|
|
431
426
|
default: n(() => [
|
|
432
|
-
a(
|
|
427
|
+
a(l(j), {
|
|
433
428
|
name: "appearance",
|
|
434
429
|
tab: "🎨 外观"
|
|
435
430
|
}, {
|
|
436
431
|
default: n(() => [
|
|
437
|
-
t("div",
|
|
438
|
-
t("div",
|
|
439
|
-
(R(!0), W(
|
|
432
|
+
t("div", ke, [
|
|
433
|
+
t("div", Se, [
|
|
434
|
+
(R(!0), W(K, null, G(l(he), (o) => (R(), W("div", {
|
|
440
435
|
key: o.name,
|
|
441
|
-
class:
|
|
442
|
-
onClick: (
|
|
436
|
+
class: Y(["preset-card", { active: B(o) }]),
|
|
437
|
+
onClick: (C) => N(o)
|
|
443
438
|
}, [
|
|
444
|
-
t("div",
|
|
445
|
-
t("div",
|
|
446
|
-
t("div",
|
|
439
|
+
t("div", Re, h(o.icon), 1),
|
|
440
|
+
t("div", He, h(o.name), 1),
|
|
441
|
+
t("div", Ve, [
|
|
447
442
|
t("span", {
|
|
448
443
|
class: "color-dot",
|
|
449
|
-
style:
|
|
444
|
+
style: ne({ backgroundColor: o.primaryColor })
|
|
450
445
|
}, null, 4)
|
|
451
446
|
])
|
|
452
|
-
], 10,
|
|
447
|
+
], 10, Me))), 128))
|
|
453
448
|
])
|
|
454
449
|
]),
|
|
455
|
-
t("div",
|
|
450
|
+
t("div", Be, [
|
|
456
451
|
e[20] || (e[20] = t("div", { class: "section-title" }, "主题模式", -1)),
|
|
457
|
-
a(
|
|
458
|
-
value:
|
|
459
|
-
"onUpdate:value": e[0] || (e[0] = (o) =>
|
|
452
|
+
a(l(J), {
|
|
453
|
+
value: l(s).themeMode,
|
|
454
|
+
"onUpdate:value": e[0] || (e[0] = (o) => l(s).themeMode = o),
|
|
460
455
|
class: "mode-group"
|
|
461
456
|
}, {
|
|
462
457
|
default: n(() => [
|
|
463
|
-
a(
|
|
458
|
+
a(l(M), { value: "light" }, {
|
|
464
459
|
default: n(() => [...e[17] || (e[17] = [
|
|
465
460
|
t("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1),
|
|
466
461
|
c(" 浅色 ", -1)
|
|
467
462
|
])]),
|
|
468
463
|
_: 1
|
|
469
464
|
}),
|
|
470
|
-
a(
|
|
465
|
+
a(l(M), { value: "dark" }, {
|
|
471
466
|
default: n(() => [...e[18] || (e[18] = [
|
|
472
467
|
t("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1),
|
|
473
468
|
c(" 深色 ", -1)
|
|
474
469
|
])]),
|
|
475
470
|
_: 1
|
|
476
471
|
}),
|
|
477
|
-
a(
|
|
472
|
+
a(l(M), { value: "auto" }, {
|
|
478
473
|
default: n(() => [...e[19] || (e[19] = [
|
|
479
474
|
t("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1),
|
|
480
475
|
c(" 自动 ", -1)
|
|
@@ -485,40 +480,40 @@ const be = Z(), we = [
|
|
|
485
480
|
_: 1
|
|
486
481
|
}, 8, ["value"])
|
|
487
482
|
]),
|
|
488
|
-
t("div",
|
|
483
|
+
t("div", Ue, [
|
|
489
484
|
e[21] || (e[21] = t("div", { class: "section-title" }, "主题色", -1)),
|
|
490
|
-
t("div",
|
|
491
|
-
a(
|
|
492
|
-
value:
|
|
493
|
-
"onUpdate:value": e[1] || (e[1] = (o) =>
|
|
485
|
+
t("div", _e, [
|
|
486
|
+
a(l(me), {
|
|
487
|
+
value: l(s).primaryColor,
|
|
488
|
+
"onUpdate:value": e[1] || (e[1] = (o) => l(s).primaryColor = o),
|
|
494
489
|
"show-alpha": !1,
|
|
495
|
-
swatches:
|
|
490
|
+
swatches: l(xe),
|
|
496
491
|
actions: ["confirm"]
|
|
497
492
|
}, null, 8, ["value", "swatches"]),
|
|
498
|
-
t("span",
|
|
493
|
+
t("span", Ee, h(l(s).primaryColor), 1)
|
|
499
494
|
])
|
|
500
495
|
]),
|
|
501
|
-
t("div",
|
|
496
|
+
t("div", We, [
|
|
502
497
|
e[25] || (e[25] = t("div", { class: "section-title" }, "圆角大小", -1)),
|
|
503
|
-
a(
|
|
504
|
-
value:
|
|
505
|
-
"onUpdate:value": e[2] || (e[2] = (o) =>
|
|
498
|
+
a(l(J), {
|
|
499
|
+
value: l(s).borderRadius,
|
|
500
|
+
"onUpdate:value": e[2] || (e[2] = (o) => l(s).borderRadius = o),
|
|
506
501
|
class: "radius-group"
|
|
507
502
|
}, {
|
|
508
503
|
default: n(() => [
|
|
509
|
-
a(
|
|
504
|
+
a(l(M), { value: "small" }, {
|
|
510
505
|
default: n(() => [...e[22] || (e[22] = [
|
|
511
506
|
c("小 (4px)", -1)
|
|
512
507
|
])]),
|
|
513
508
|
_: 1
|
|
514
509
|
}),
|
|
515
|
-
a(
|
|
510
|
+
a(l(M), { value: "medium" }, {
|
|
516
511
|
default: n(() => [...e[23] || (e[23] = [
|
|
517
512
|
c("中 (6px)", -1)
|
|
518
513
|
])]),
|
|
519
514
|
_: 1
|
|
520
515
|
}),
|
|
521
|
-
a(
|
|
516
|
+
a(l(M), { value: "large" }, {
|
|
522
517
|
default: n(() => [...e[24] || (e[24] = [
|
|
523
518
|
c("大 (8px)", -1)
|
|
524
519
|
])]),
|
|
@@ -528,41 +523,41 @@ const be = Z(), we = [
|
|
|
528
523
|
_: 1
|
|
529
524
|
}, 8, ["value"])
|
|
530
525
|
]),
|
|
531
|
-
t("div",
|
|
526
|
+
t("div", Ie, [
|
|
532
527
|
e[31] || (e[31] = t("div", { class: "section-title" }, "页面动画", -1)),
|
|
533
|
-
t("div",
|
|
528
|
+
t("div", Oe, [
|
|
534
529
|
e[26] || (e[26] = t("span", { class: "text-sm" }, "启用动画", -1)),
|
|
535
|
-
a(
|
|
536
|
-
value:
|
|
537
|
-
"onUpdate:value": e[3] || (e[3] = (o) =>
|
|
530
|
+
a(l(H), {
|
|
531
|
+
value: l(s).enableTransition,
|
|
532
|
+
"onUpdate:value": e[3] || (e[3] = (o) => l(s).enableTransition = o)
|
|
538
533
|
}, null, 8, ["value"])
|
|
539
534
|
]),
|
|
540
|
-
a(
|
|
541
|
-
value:
|
|
542
|
-
"onUpdate:value": e[4] || (e[4] = (o) =>
|
|
543
|
-
disabled: !
|
|
535
|
+
a(l(J), {
|
|
536
|
+
value: l(s).transitionType,
|
|
537
|
+
"onUpdate:value": e[4] || (e[4] = (o) => l(s).transitionType = o),
|
|
538
|
+
disabled: !l(s).enableTransition,
|
|
544
539
|
class: "transition-group"
|
|
545
540
|
}, {
|
|
546
541
|
default: n(() => [
|
|
547
|
-
a(
|
|
542
|
+
a(l(M), { value: "fade" }, {
|
|
548
543
|
default: n(() => [...e[27] || (e[27] = [
|
|
549
544
|
c("淡入", -1)
|
|
550
545
|
])]),
|
|
551
546
|
_: 1
|
|
552
547
|
}),
|
|
553
|
-
a(
|
|
548
|
+
a(l(M), { value: "slide" }, {
|
|
554
549
|
default: n(() => [...e[28] || (e[28] = [
|
|
555
550
|
c("滑动", -1)
|
|
556
551
|
])]),
|
|
557
552
|
_: 1
|
|
558
553
|
}),
|
|
559
|
-
a(
|
|
554
|
+
a(l(M), { value: "zoom" }, {
|
|
560
555
|
default: n(() => [...e[29] || (e[29] = [
|
|
561
556
|
c("缩放", -1)
|
|
562
557
|
])]),
|
|
563
558
|
_: 1
|
|
564
559
|
}),
|
|
565
|
-
a(
|
|
560
|
+
a(l(M), { value: "none" }, {
|
|
566
561
|
default: n(() => [...e[30] || (e[30] = [
|
|
567
562
|
c("无", -1)
|
|
568
563
|
])]),
|
|
@@ -572,11 +567,11 @@ const be = Z(), we = [
|
|
|
572
567
|
_: 1
|
|
573
568
|
}, 8, ["value", "disabled"])
|
|
574
569
|
]),
|
|
575
|
-
t("div",
|
|
576
|
-
a(
|
|
570
|
+
t("div", Pe, [
|
|
571
|
+
a(l(I), {
|
|
577
572
|
block: "",
|
|
578
573
|
secondary: "",
|
|
579
|
-
onClick:
|
|
574
|
+
onClick: L
|
|
580
575
|
}, {
|
|
581
576
|
icon: n(() => [...e[32] || (e[32] = [
|
|
582
577
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -590,92 +585,92 @@ const be = Z(), we = [
|
|
|
590
585
|
]),
|
|
591
586
|
_: 1
|
|
592
587
|
}),
|
|
593
|
-
a(
|
|
588
|
+
a(l(j), {
|
|
594
589
|
name: "layout",
|
|
595
590
|
tab: "📐 布局"
|
|
596
591
|
}, {
|
|
597
592
|
default: n(() => [
|
|
598
|
-
t("div",
|
|
593
|
+
t("div", Ne, [
|
|
599
594
|
e[34] || (e[34] = t("div", { class: "section-title" }, "布局模式", -1)),
|
|
600
|
-
t("div",
|
|
601
|
-
(R(!0), W(
|
|
595
|
+
t("div", Le, [
|
|
596
|
+
(R(!0), W(K, null, G(l(Te), (o) => (R(), W("div", {
|
|
602
597
|
key: o.value,
|
|
603
|
-
class:
|
|
604
|
-
active:
|
|
598
|
+
class: Y(["layout-item", {
|
|
599
|
+
active: l(s).layoutMode === o.value,
|
|
605
600
|
disabled: o.disabled
|
|
606
601
|
}]),
|
|
607
|
-
onClick: (
|
|
602
|
+
onClick: re((C) => P(o.value, o.disabled), ["stop"])
|
|
608
603
|
}, [
|
|
609
|
-
t("div",
|
|
610
|
-
(R(), W("svg",
|
|
604
|
+
t("div", Ae, [
|
|
605
|
+
(R(), W("svg", Fe, [
|
|
611
606
|
t("g", {
|
|
612
607
|
innerHTML: o.svg
|
|
613
|
-
}, null, 8,
|
|
608
|
+
}, null, 8, $e)
|
|
614
609
|
]))
|
|
615
610
|
]),
|
|
616
|
-
t("div",
|
|
611
|
+
t("div", ze, [
|
|
617
612
|
c(h(o.label) + " ", 1),
|
|
618
|
-
o.disabled ? (R(), W("span",
|
|
613
|
+
o.disabled ? (R(), W("span", je, "敬请期待")) : Z("", !0)
|
|
619
614
|
])
|
|
620
|
-
], 10,
|
|
615
|
+
], 10, De))), 128))
|
|
621
616
|
])
|
|
622
617
|
]),
|
|
623
|
-
t("div",
|
|
618
|
+
t("div", Je, [
|
|
624
619
|
e[39] || (e[39] = t("div", { class: "section-title" }, "界面元素", -1)),
|
|
625
|
-
t("div",
|
|
620
|
+
t("div", Ke, [
|
|
626
621
|
e[35] || (e[35] = t("span", null, "显示面包屑", -1)),
|
|
627
|
-
a(
|
|
628
|
-
value:
|
|
629
|
-
"onUpdate:value": e[5] || (e[5] = (o) =>
|
|
622
|
+
a(l(H), {
|
|
623
|
+
value: l(s).showBreadcrumb,
|
|
624
|
+
"onUpdate:value": e[5] || (e[5] = (o) => l(s).showBreadcrumb = o)
|
|
630
625
|
}, null, 8, ["value"])
|
|
631
626
|
]),
|
|
632
|
-
t("div",
|
|
627
|
+
t("div", Ge, [
|
|
633
628
|
e[36] || (e[36] = t("span", null, "显示面包屑图标", -1)),
|
|
634
|
-
a(
|
|
635
|
-
value:
|
|
636
|
-
"onUpdate:value": e[6] || (e[6] = (o) =>
|
|
637
|
-
disabled: !
|
|
629
|
+
a(l(H), {
|
|
630
|
+
value: l(s).showBreadcrumbIcon,
|
|
631
|
+
"onUpdate:value": e[6] || (e[6] = (o) => l(s).showBreadcrumbIcon = o),
|
|
632
|
+
disabled: !l(s).showBreadcrumb
|
|
638
633
|
}, null, 8, ["value", "disabled"])
|
|
639
634
|
]),
|
|
640
|
-
t("div",
|
|
635
|
+
t("div", Ye, [
|
|
641
636
|
e[37] || (e[37] = t("span", null, "显示标签页", -1)),
|
|
642
|
-
a(
|
|
643
|
-
value:
|
|
644
|
-
"onUpdate:value": e[7] || (e[7] = (o) =>
|
|
637
|
+
a(l(H), {
|
|
638
|
+
value: l(s).showTagsView,
|
|
639
|
+
"onUpdate:value": e[7] || (e[7] = (o) => l(s).showTagsView = o)
|
|
645
640
|
}, null, 8, ["value"])
|
|
646
641
|
]),
|
|
647
|
-
t("div",
|
|
642
|
+
t("div", Ze, [
|
|
648
643
|
e[38] || (e[38] = t("span", null, "显示页脚", -1)),
|
|
649
|
-
a(
|
|
650
|
-
value:
|
|
651
|
-
"onUpdate:value": e[8] || (e[8] = (o) =>
|
|
644
|
+
a(l(H), {
|
|
645
|
+
value: l(s).showFooter,
|
|
646
|
+
"onUpdate:value": e[8] || (e[8] = (o) => l(s).showFooter = o)
|
|
652
647
|
}, null, 8, ["value"])
|
|
653
648
|
])
|
|
654
649
|
]),
|
|
655
|
-
t("div",
|
|
650
|
+
t("div", qe, [
|
|
656
651
|
e[42] || (e[42] = t("div", { class: "section-title" }, "尺寸调整", -1)),
|
|
657
|
-
t("div",
|
|
658
|
-
t("div",
|
|
652
|
+
t("div", Qe, [
|
|
653
|
+
t("div", Xe, [
|
|
659
654
|
e[40] || (e[40] = t("span", null, "侧边栏宽度", -1)),
|
|
660
|
-
t("span",
|
|
655
|
+
t("span", et, h(l(s).sidebarWidth) + "px", 1)
|
|
661
656
|
]),
|
|
662
|
-
a(
|
|
663
|
-
value:
|
|
664
|
-
"onUpdate:value": e[9] || (e[9] = (o) =>
|
|
657
|
+
a(l(q), {
|
|
658
|
+
value: l(s).sidebarWidth,
|
|
659
|
+
"onUpdate:value": e[9] || (e[9] = (o) => l(s).sidebarWidth = o),
|
|
665
660
|
min: 180,
|
|
666
661
|
max: 280,
|
|
667
662
|
step: 10,
|
|
668
663
|
marks: { 180: "180", 220: "220", 280: "280" }
|
|
669
664
|
}, null, 8, ["value"])
|
|
670
665
|
]),
|
|
671
|
-
t("div",
|
|
672
|
-
t("div",
|
|
666
|
+
t("div", tt, [
|
|
667
|
+
t("div", st, [
|
|
673
668
|
e[41] || (e[41] = t("span", null, "头部高度", -1)),
|
|
674
|
-
t("span",
|
|
669
|
+
t("span", ot, h(l(s).headerHeight) + "px", 1)
|
|
675
670
|
]),
|
|
676
|
-
a(
|
|
677
|
-
value:
|
|
678
|
-
"onUpdate:value": e[10] || (e[10] = (o) =>
|
|
671
|
+
a(l(q), {
|
|
672
|
+
value: l(s).headerHeight,
|
|
673
|
+
"onUpdate:value": e[10] || (e[10] = (o) => l(s).headerHeight = o),
|
|
679
674
|
min: 48,
|
|
680
675
|
max: 64,
|
|
681
676
|
step: 4,
|
|
@@ -683,11 +678,11 @@ const be = Z(), we = [
|
|
|
683
678
|
}, null, 8, ["value"])
|
|
684
679
|
])
|
|
685
680
|
]),
|
|
686
|
-
t("div",
|
|
687
|
-
a(
|
|
681
|
+
t("div", lt, [
|
|
682
|
+
a(l(I), {
|
|
688
683
|
block: "",
|
|
689
684
|
secondary: "",
|
|
690
|
-
onClick:
|
|
685
|
+
onClick: U
|
|
691
686
|
}, {
|
|
692
687
|
icon: n(() => [...e[43] || (e[43] = [
|
|
693
688
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -701,17 +696,17 @@ const be = Z(), we = [
|
|
|
701
696
|
]),
|
|
702
697
|
_: 1
|
|
703
698
|
}),
|
|
704
|
-
a(
|
|
699
|
+
a(l(j), {
|
|
705
700
|
name: "features",
|
|
706
701
|
tab: "🔧 功能"
|
|
707
702
|
}, {
|
|
708
703
|
default: n(() => [
|
|
709
|
-
t("div",
|
|
704
|
+
t("div", it, [
|
|
710
705
|
e[49] || (e[49] = t("div", { class: "section-title" }, "缓存管理", -1)),
|
|
711
|
-
t("div",
|
|
712
|
-
a(
|
|
706
|
+
t("div", at, [
|
|
707
|
+
a(l(I), {
|
|
713
708
|
secondary: "",
|
|
714
|
-
onClick:
|
|
709
|
+
onClick: E
|
|
715
710
|
}, {
|
|
716
711
|
icon: n(() => [...e[45] || (e[45] = [
|
|
717
712
|
t("span", { class: "i-mdi:delete-sweep" }, null, -1)
|
|
@@ -721,9 +716,9 @@ const be = Z(), we = [
|
|
|
721
716
|
]),
|
|
722
717
|
_: 1
|
|
723
718
|
}),
|
|
724
|
-
a(
|
|
719
|
+
a(l(I), {
|
|
725
720
|
secondary: "",
|
|
726
|
-
onClick:
|
|
721
|
+
onClick: D
|
|
727
722
|
}, {
|
|
728
723
|
icon: n(() => [...e[47] || (e[47] = [
|
|
729
724
|
t("span", { class: "i-mdi:refresh" }, null, -1)
|
|
@@ -735,12 +730,12 @@ const be = Z(), we = [
|
|
|
735
730
|
})
|
|
736
731
|
])
|
|
737
732
|
]),
|
|
738
|
-
t("div",
|
|
733
|
+
t("div", nt, [
|
|
739
734
|
e[56] || (e[56] = t("div", { class: "section-title" }, "配置管理", -1)),
|
|
740
|
-
t("div",
|
|
741
|
-
a(
|
|
735
|
+
t("div", rt, [
|
|
736
|
+
a(l(I), {
|
|
742
737
|
secondary: "",
|
|
743
|
-
onClick:
|
|
738
|
+
onClick: z
|
|
744
739
|
}, {
|
|
745
740
|
icon: n(() => [...e[50] || (e[50] = [
|
|
746
741
|
t("span", { class: "i-mdi:download" }, null, -1)
|
|
@@ -750,9 +745,9 @@ const be = Z(), we = [
|
|
|
750
745
|
]),
|
|
751
746
|
_: 1
|
|
752
747
|
}),
|
|
753
|
-
a(
|
|
748
|
+
a(l(I), {
|
|
754
749
|
secondary: "",
|
|
755
|
-
onClick:
|
|
750
|
+
onClick: A
|
|
756
751
|
}, {
|
|
757
752
|
icon: n(() => [...e[52] || (e[52] = [
|
|
758
753
|
t("span", { class: "i-mdi:upload" }, null, -1)
|
|
@@ -763,12 +758,12 @@ const be = Z(), we = [
|
|
|
763
758
|
_: 1
|
|
764
759
|
})
|
|
765
760
|
]),
|
|
766
|
-
a(
|
|
761
|
+
a(l(I), {
|
|
767
762
|
block: "",
|
|
768
763
|
type: "error",
|
|
769
764
|
secondary: "",
|
|
770
765
|
class: "mt-2",
|
|
771
|
-
onClick:
|
|
766
|
+
onClick: _
|
|
772
767
|
}, {
|
|
773
768
|
icon: n(() => [...e[54] || (e[54] = [
|
|
774
769
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -779,73 +774,73 @@ const be = Z(), we = [
|
|
|
779
774
|
_: 1
|
|
780
775
|
})
|
|
781
776
|
]),
|
|
782
|
-
t("div",
|
|
777
|
+
t("div", dt, [
|
|
783
778
|
e[59] || (e[59] = t("div", { class: "section-title" }, "系统模式", -1)),
|
|
784
|
-
t("div",
|
|
779
|
+
t("div", ut, [
|
|
785
780
|
e[57] || (e[57] = t("div", { class: "setting-label" }, [
|
|
786
781
|
t("span", null, "灰色模式"),
|
|
787
782
|
t("span", { class: "setting-desc" }, "用于哀悼日场景")
|
|
788
783
|
], -1)),
|
|
789
|
-
a(
|
|
784
|
+
a(l(H), {
|
|
790
785
|
value: x.value,
|
|
791
786
|
"onUpdate:value": e[11] || (e[11] = (o) => x.value = o)
|
|
792
787
|
}, null, 8, ["value"])
|
|
793
788
|
]),
|
|
794
|
-
t("div",
|
|
789
|
+
t("div", ct, [
|
|
795
790
|
e[58] || (e[58] = t("div", { class: "setting-label" }, [
|
|
796
791
|
t("span", null, "色弱模式"),
|
|
797
792
|
t("span", { class: "setting-desc" }, "提供无障碍访问支持")
|
|
798
793
|
], -1)),
|
|
799
|
-
a(
|
|
794
|
+
a(l(H), {
|
|
800
795
|
value: f.value,
|
|
801
796
|
"onUpdate:value": e[12] || (e[12] = (o) => f.value = o)
|
|
802
797
|
}, null, 8, ["value"])
|
|
803
798
|
])
|
|
804
799
|
]),
|
|
805
|
-
t("div",
|
|
800
|
+
t("div", vt, [
|
|
806
801
|
e[61] || (e[61] = t("div", { class: "section-title" }, "水印设置", -1)),
|
|
807
|
-
t("div",
|
|
802
|
+
t("div", pt, [
|
|
808
803
|
e[60] || (e[60] = t("span", null, "启用水印", -1)),
|
|
809
|
-
a(
|
|
804
|
+
a(l(H), {
|
|
810
805
|
value: y.value,
|
|
811
806
|
"onUpdate:value": e[13] || (e[13] = (o) => y.value = o)
|
|
812
807
|
}, null, 8, ["value"])
|
|
813
808
|
]),
|
|
814
|
-
y.value ? (R(), W("div",
|
|
815
|
-
a(
|
|
816
|
-
value:
|
|
817
|
-
"onUpdate:value": e[14] || (e[14] = (o) =>
|
|
809
|
+
y.value ? (R(), W("div", mt, [
|
|
810
|
+
a(l(ge), {
|
|
811
|
+
value: k.value,
|
|
812
|
+
"onUpdate:value": e[14] || (e[14] = (o) => k.value = o),
|
|
818
813
|
placeholder: "请输入水印内容",
|
|
819
814
|
size: "small"
|
|
820
815
|
}, null, 8, ["value"])
|
|
821
|
-
])) :
|
|
816
|
+
])) : Z("", !0)
|
|
822
817
|
]),
|
|
823
|
-
t("div",
|
|
818
|
+
t("div", gt, [
|
|
824
819
|
e[68] || (e[68] = t("div", { class: "section-title" }, "系统信息", -1)),
|
|
825
|
-
t("div",
|
|
826
|
-
t("div",
|
|
820
|
+
t("div", ft, [
|
|
821
|
+
t("div", yt, [
|
|
827
822
|
e[62] || (e[62] = t("span", { class: "info-label" }, "浏览器", -1)),
|
|
828
|
-
t("span",
|
|
823
|
+
t("span", ht, h(S.value.browser), 1)
|
|
829
824
|
]),
|
|
830
|
-
t("div",
|
|
825
|
+
t("div", bt, [
|
|
831
826
|
e[63] || (e[63] = t("span", { class: "info-label" }, "操作系统", -1)),
|
|
832
|
-
t("span",
|
|
827
|
+
t("span", wt, h(S.value.os), 1)
|
|
833
828
|
]),
|
|
834
|
-
t("div",
|
|
829
|
+
t("div", xt, [
|
|
835
830
|
e[64] || (e[64] = t("span", { class: "info-label" }, "屏幕分辨率", -1)),
|
|
836
|
-
t("span",
|
|
831
|
+
t("span", Ct, h(S.value.resolution), 1)
|
|
837
832
|
]),
|
|
838
|
-
t("div",
|
|
833
|
+
t("div", Tt, [
|
|
839
834
|
e[65] || (e[65] = t("span", { class: "info-label" }, "设备像素比", -1)),
|
|
840
|
-
t("span",
|
|
835
|
+
t("span", kt, h(S.value.pixelRatio), 1)
|
|
841
836
|
]),
|
|
842
|
-
t("div",
|
|
837
|
+
t("div", St, [
|
|
843
838
|
e[66] || (e[66] = t("span", { class: "info-label" }, "语言", -1)),
|
|
844
|
-
t("span",
|
|
839
|
+
t("span", Mt, h(S.value.language), 1)
|
|
845
840
|
]),
|
|
846
|
-
t("div",
|
|
841
|
+
t("div", Rt, [
|
|
847
842
|
e[67] || (e[67] = t("span", { class: "info-label" }, "时区", -1)),
|
|
848
|
-
t("span",
|
|
843
|
+
t("span", Ht, h(S.value.timezone), 1)
|
|
849
844
|
])
|
|
850
845
|
])
|
|
851
846
|
])
|
|
@@ -862,27 +857,28 @@ const be = Z(), we = [
|
|
|
862
857
|
_: 1
|
|
863
858
|
}, 8, ["show"]));
|
|
864
859
|
}
|
|
865
|
-
}),
|
|
866
|
-
const
|
|
860
|
+
}), Bt = (b, u) => {
|
|
861
|
+
const p = b.__vccOpts || b;
|
|
867
862
|
for (const [s, w] of u)
|
|
868
|
-
|
|
869
|
-
return
|
|
870
|
-
},
|
|
863
|
+
p[s] = w;
|
|
864
|
+
return p;
|
|
865
|
+
}, It = /* @__PURE__ */ Bt(Vt, [["__scopeId", "data-v-f8cba7b1"]]);
|
|
871
866
|
function Ot(b, u = {}) {
|
|
872
|
-
const
|
|
873
|
-
return
|
|
867
|
+
const p = X(u);
|
|
868
|
+
return p().syncCSSVariables(), p;
|
|
874
869
|
}
|
|
875
870
|
export {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
871
|
+
be as BORDER_RADIUS_MAP,
|
|
872
|
+
xe as COLOR_SWATCHES,
|
|
873
|
+
v as DEFAULT_SETTINGS,
|
|
874
|
+
Wt as LAYOUT_MODES,
|
|
875
|
+
ye as PRESET_COLORS,
|
|
876
|
+
It as SettingsDrawer,
|
|
877
|
+
he as THEME_PRESETS,
|
|
878
|
+
we as TRANSITION_MAP,
|
|
879
|
+
Q as adjustColor,
|
|
880
|
+
X as createSettingsStore,
|
|
885
881
|
Ot as setupLayout,
|
|
886
|
-
|
|
882
|
+
Ce as useSettingsStore
|
|
887
883
|
};
|
|
888
884
|
//# sourceMappingURL=index.js.map
|