@robot-admin/layout 2.0.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 +8 -7
- package/dist/index.js +201 -211
- package/dist/index.js.map +1 -1
- package/package.json +2 -7
- package/src/styles/settings.scss +7 -7
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 he = [
|
|
|
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 he = [
|
|
|
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 he = [
|
|
|
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",
|
|
@@ -109,74 +109,74 @@ const he = [
|
|
|
109
109
|
headerHeight: 56,
|
|
110
110
|
// 高级
|
|
111
111
|
enableHotkeys: !0,
|
|
112
|
-
version: "
|
|
113
|
-
},
|
|
112
|
+
version: "2.0.2"
|
|
113
|
+
}, xe = ye.map((b) => b.value);
|
|
114
114
|
function Q(b, u) {
|
|
115
|
-
const
|
|
116
|
-
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")}`;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const { defaults: u = {}, onThemeModeChange:
|
|
120
|
-
...
|
|
118
|
+
function X(b = {}) {
|
|
119
|
+
const { defaults: u = {}, onThemeModeChange: p } = b, s = {
|
|
120
|
+
...v,
|
|
121
121
|
...u
|
|
122
122
|
};
|
|
123
|
-
return
|
|
124
|
-
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(
|
|
125
125
|
s.sidebarCollapsedWidth
|
|
126
|
-
),
|
|
127
|
-
() =>
|
|
128
|
-
), i =
|
|
129
|
-
() => y.value &&
|
|
130
|
-
), o =
|
|
126
|
+
), E = d(s.headerHeight), D = d(s.enableHotkeys), z = d(s.version), A = F(
|
|
127
|
+
() => be[x.value]
|
|
128
|
+
), i = F(() => we[f.value]), e = F(
|
|
129
|
+
() => y.value && f.value !== "none"
|
|
130
|
+
), o = F(() => ({
|
|
131
131
|
themeMode: w.value,
|
|
132
|
-
primaryColor:
|
|
132
|
+
primaryColor: g.value,
|
|
133
133
|
borderRadius: x.value,
|
|
134
|
-
transitionType:
|
|
134
|
+
transitionType: f.value,
|
|
135
135
|
enableTransition: y.value,
|
|
136
136
|
layoutMode: k.value,
|
|
137
|
-
collapsed:
|
|
138
|
-
fixedHeader:
|
|
137
|
+
collapsed: m.value,
|
|
138
|
+
fixedHeader: O.value,
|
|
139
139
|
showBreadcrumb: V.value,
|
|
140
140
|
showBreadcrumbIcon: S.value,
|
|
141
|
-
showTagsView:
|
|
142
|
-
tagsViewHeight:
|
|
143
|
-
tagsViewStyle:
|
|
144
|
-
showFooter:
|
|
145
|
-
sidebarWidth:
|
|
146
|
-
sidebarCollapsedWidth:
|
|
147
|
-
headerHeight:
|
|
148
|
-
enableHotkeys:
|
|
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
149
|
version: z.value
|
|
150
150
|
})), C = () => {
|
|
151
151
|
if (typeof document > "u") return;
|
|
152
152
|
const r = document.documentElement;
|
|
153
|
-
r.style.setProperty("--primary-color",
|
|
153
|
+
r.style.setProperty("--primary-color", g.value), r.style.setProperty(
|
|
154
154
|
"--primary-color-hover",
|
|
155
|
-
Q(
|
|
155
|
+
Q(g.value, 10)
|
|
156
156
|
), r.style.setProperty(
|
|
157
157
|
"--primary-color-pressed",
|
|
158
|
-
Q(
|
|
159
|
-
), r.style.setProperty("--border-radius",
|
|
158
|
+
Q(g.value, -10)
|
|
159
|
+
), r.style.setProperty("--border-radius", A.value), r.style.setProperty("--sidebar-width", `${U.value}px`), r.style.setProperty(
|
|
160
160
|
"--sidebar-collapsed-width",
|
|
161
|
-
`${
|
|
162
|
-
), 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`);
|
|
163
163
|
}, T = async (r) => {
|
|
164
|
-
|
|
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
165
|
}, ee = () => {
|
|
166
|
-
w.value = s.themeMode,
|
|
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
167
|
}, te = async (r) => {
|
|
168
|
-
w.value = r,
|
|
168
|
+
w.value = r, p && await p(r);
|
|
169
169
|
}, se = () => {
|
|
170
|
-
|
|
170
|
+
m.value = !m.value;
|
|
171
171
|
};
|
|
172
|
-
return
|
|
172
|
+
return $(
|
|
173
173
|
[
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
_,
|
|
177
|
-
B,
|
|
174
|
+
g,
|
|
175
|
+
A,
|
|
178
176
|
U,
|
|
179
|
-
|
|
177
|
+
_,
|
|
178
|
+
E,
|
|
179
|
+
B
|
|
180
180
|
],
|
|
181
181
|
() => {
|
|
182
182
|
C();
|
|
@@ -185,26 +185,26 @@ function Z(b = {}) {
|
|
|
185
185
|
), {
|
|
186
186
|
// 状态
|
|
187
187
|
themeMode: w,
|
|
188
|
-
primaryColor:
|
|
188
|
+
primaryColor: g,
|
|
189
189
|
borderRadius: x,
|
|
190
|
-
transitionType:
|
|
190
|
+
transitionType: f,
|
|
191
191
|
enableTransition: y,
|
|
192
192
|
layoutMode: k,
|
|
193
|
-
collapsed:
|
|
194
|
-
fixedHeader:
|
|
193
|
+
collapsed: m,
|
|
194
|
+
fixedHeader: O,
|
|
195
195
|
showBreadcrumb: V,
|
|
196
196
|
showBreadcrumbIcon: S,
|
|
197
|
-
showTagsView:
|
|
198
|
-
tagsViewHeight:
|
|
199
|
-
tagsViewStyle:
|
|
200
|
-
showFooter:
|
|
201
|
-
sidebarWidth:
|
|
202
|
-
sidebarCollapsedWidth:
|
|
203
|
-
headerHeight:
|
|
204
|
-
enableHotkeys:
|
|
197
|
+
showTagsView: P,
|
|
198
|
+
tagsViewHeight: B,
|
|
199
|
+
tagsViewStyle: N,
|
|
200
|
+
showFooter: L,
|
|
201
|
+
sidebarWidth: U,
|
|
202
|
+
sidebarCollapsedWidth: _,
|
|
203
|
+
headerHeight: E,
|
|
204
|
+
enableHotkeys: D,
|
|
205
205
|
version: z,
|
|
206
206
|
// 计算属性
|
|
207
|
-
borderRadiusValue:
|
|
207
|
+
borderRadiusValue: A,
|
|
208
208
|
transitionName: i,
|
|
209
209
|
shouldEnableTransition: e,
|
|
210
210
|
settingsState: o,
|
|
@@ -217,16 +217,7 @@ function Z(b = {}) {
|
|
|
217
217
|
};
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
const Ce =
|
|
221
|
-
"#409eff",
|
|
222
|
-
"#f5222d",
|
|
223
|
-
"#fa541c",
|
|
224
|
-
"#faad14",
|
|
225
|
-
"#52c41a",
|
|
226
|
-
"#13c2c2",
|
|
227
|
-
"#2f54eb",
|
|
228
|
-
"#722ed1"
|
|
229
|
-
], ke = [
|
|
220
|
+
const Ce = X(), Te = [
|
|
230
221
|
{
|
|
231
222
|
label: "左侧菜单(默认)",
|
|
232
223
|
value: "side",
|
|
@@ -289,33 +280,31 @@ const Ce = Z(), Te = [
|
|
|
289
280
|
<rect x="32" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.4"/>
|
|
290
281
|
`
|
|
291
282
|
}
|
|
292
|
-
],
|
|
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 = {
|
|
293
284
|
class: "layout-svg",
|
|
294
285
|
viewBox: "0 0 56 48",
|
|
295
286
|
fill: "none",
|
|
296
287
|
xmlns: "http://www.w3.org/2000/svg"
|
|
297
|
-
},
|
|
288
|
+
}, $e = ["innerHTML"], ze = { class: "layout-label" }, je = {
|
|
298
289
|
key: 0,
|
|
299
290
|
class: "badge-soon"
|
|
300
|
-
}, Je = { class: "settings-section" },
|
|
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 = {
|
|
301
292
|
key: 0,
|
|
302
293
|
class: "mt-2"
|
|
303
|
-
}, gt = { class: "settings-section" },
|
|
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({
|
|
304
295
|
__name: "index",
|
|
305
|
-
props:
|
|
306
|
-
storageKey: {}
|
|
307
|
-
}, {
|
|
296
|
+
props: {
|
|
308
297
|
show: { type: Boolean, default: !1 },
|
|
309
298
|
showModifiers: {}
|
|
310
|
-
}
|
|
299
|
+
},
|
|
311
300
|
emits: ["update:show"],
|
|
312
301
|
setup(b) {
|
|
313
|
-
const u =
|
|
314
|
-
let
|
|
315
|
-
const
|
|
316
|
-
|
|
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);
|
|
317
306
|
const e = document.createElement("canvas"), o = e.getContext("2d");
|
|
318
|
-
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),
|
|
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 = `
|
|
319
308
|
position: fixed;
|
|
320
309
|
top: 0;
|
|
321
310
|
left: 0;
|
|
@@ -326,20 +315,20 @@ const Ce = Z(), Te = [
|
|
|
326
315
|
background-repeat: repeat;
|
|
327
316
|
z-index: 9999;
|
|
328
317
|
user-select: none;
|
|
329
|
-
`, document.body.appendChild(
|
|
318
|
+
`, document.body.appendChild(m);
|
|
330
319
|
}, V = () => {
|
|
331
|
-
|
|
320
|
+
m && (document.body.removeChild(m), m = null);
|
|
332
321
|
};
|
|
333
|
-
|
|
322
|
+
$(x, (i) => {
|
|
334
323
|
document.documentElement.classList.toggle("gray-mode", i);
|
|
335
|
-
}),
|
|
324
|
+
}), $(f, (i) => {
|
|
336
325
|
document.documentElement.classList.toggle("color-weak-mode", i);
|
|
337
|
-
}),
|
|
338
|
-
i ?
|
|
339
|
-
}),
|
|
340
|
-
y.value &&
|
|
326
|
+
}), $(y, (i) => {
|
|
327
|
+
i ? O(k.value) : V();
|
|
328
|
+
}), $(k, (i) => {
|
|
329
|
+
y.value && O(i);
|
|
341
330
|
});
|
|
342
|
-
const S =
|
|
331
|
+
const S = F(() => {
|
|
343
332
|
const i = navigator.userAgent;
|
|
344
333
|
let e = "Unknown", o = "Unknown";
|
|
345
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"), {
|
|
@@ -348,22 +337,22 @@ const Ce = Z(), Te = [
|
|
|
348
337
|
resolution: `${window.screen.width} × ${window.screen.height}`,
|
|
349
338
|
pixelRatio: window.devicePixelRatio + "x",
|
|
350
339
|
language: navigator.language,
|
|
351
|
-
timezone:
|
|
340
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
352
341
|
};
|
|
353
342
|
});
|
|
354
343
|
ie(() => {
|
|
355
344
|
V();
|
|
356
345
|
});
|
|
357
|
-
const
|
|
346
|
+
const P = (i, e) => {
|
|
358
347
|
e || (s.layoutMode = i);
|
|
359
|
-
},
|
|
348
|
+
}, B = (i) => s.primaryColor === i.primaryColor, N = (i) => {
|
|
360
349
|
s.applyPreset(i), u.success(`已应用「${i.name}」主题方案`);
|
|
361
|
-
},
|
|
362
|
-
s.themeMode =
|
|
350
|
+
}, L = () => {
|
|
351
|
+
s.themeMode = v.themeMode, s.primaryColor = v.primaryColor, s.borderRadius = v.borderRadius, s.transitionType = v.transitionType, s.enableTransition = v.enableTransition, u.success("已恢复外观默认设置");
|
|
352
|
+
}, U = () => {
|
|
353
|
+
s.layoutMode = v.layoutMode, s.fixedHeader = v.fixedHeader, s.showBreadcrumb = v.showBreadcrumb, s.showBreadcrumbIcon = v.showBreadcrumbIcon, s.showTagsView = v.showTagsView, s.tagsViewHeight = v.tagsViewHeight, s.tagsViewStyle = v.tagsViewStyle, s.showFooter = v.showFooter, s.sidebarWidth = v.sidebarWidth, s.sidebarCollapsedWidth = v.sidebarCollapsedWidth, s.headerHeight = v.headerHeight, u.success("已恢复布局默认设置");
|
|
363
354
|
}, _ = () => {
|
|
364
|
-
|
|
365
|
-
}, B = () => {
|
|
366
|
-
v.warning({
|
|
355
|
+
p.warning({
|
|
367
356
|
title: "确认重置",
|
|
368
357
|
content: "确定要恢复默认配置吗?此操作不可撤销。",
|
|
369
358
|
positiveText: "确认",
|
|
@@ -372,8 +361,8 @@ const Ce = Z(), Te = [
|
|
|
372
361
|
s.resetSettings(), u.success("已恢复默认配置");
|
|
373
362
|
}
|
|
374
363
|
});
|
|
375
|
-
},
|
|
376
|
-
|
|
364
|
+
}, E = () => {
|
|
365
|
+
p.warning({
|
|
377
366
|
title: "确认清除",
|
|
378
367
|
content: "确定要清除浏览器缓存吗?",
|
|
379
368
|
positiveText: "确认",
|
|
@@ -385,13 +374,13 @@ const Ce = Z(), Te = [
|
|
|
385
374
|
}), sessionStorage.clear(), u.success("缓存已清除");
|
|
386
375
|
}
|
|
387
376
|
});
|
|
388
|
-
},
|
|
377
|
+
}, D = () => {
|
|
389
378
|
location.reload();
|
|
390
379
|
}, z = () => {
|
|
391
380
|
const i = {
|
|
392
381
|
settings: s.settingsState,
|
|
393
382
|
gray: x.value,
|
|
394
|
-
colorWeak:
|
|
383
|
+
colorWeak: f.value,
|
|
395
384
|
watermark: {
|
|
396
385
|
enabled: y.value,
|
|
397
386
|
text: k.value
|
|
@@ -401,20 +390,20 @@ const Ce = Z(), Te = [
|
|
|
401
390
|
type: "application/json"
|
|
402
391
|
}), o = URL.createObjectURL(e), C = document.createElement("a");
|
|
403
392
|
C.href = o, C.download = `robot-admin-config-${Date.now()}.json`, C.click(), URL.revokeObjectURL(o), u.success("配置已导出");
|
|
404
|
-
},
|
|
393
|
+
}, A = () => {
|
|
405
394
|
const i = document.createElement("input");
|
|
406
395
|
i.type = "file", i.accept = "application/json", i.onchange = async (e) => {
|
|
407
396
|
const o = e.target.files?.[0];
|
|
408
397
|
if (o)
|
|
409
398
|
try {
|
|
410
399
|
const C = await o.text(), T = JSON.parse(C);
|
|
411
|
-
T.settings &&
|
|
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("配置已导入");
|
|
412
401
|
} catch {
|
|
413
402
|
u.error("配置文件格式错误");
|
|
414
403
|
}
|
|
415
404
|
}, i.click();
|
|
416
405
|
};
|
|
417
|
-
return (i, e) => (R(), ae(l(
|
|
406
|
+
return (i, e) => (R(), ae(l(ce), {
|
|
418
407
|
show: w.value,
|
|
419
408
|
"onUpdate:show": e[16] || (e[16] = (o) => w.value = o),
|
|
420
409
|
width: 380,
|
|
@@ -423,14 +412,14 @@ const Ce = Z(), Te = [
|
|
|
423
412
|
"block-scroll": !1
|
|
424
413
|
}, {
|
|
425
414
|
default: n(() => [
|
|
426
|
-
a(l(
|
|
415
|
+
a(l(ve), {
|
|
427
416
|
title: "⚙️ 布局配置",
|
|
428
417
|
closable: ""
|
|
429
418
|
}, {
|
|
430
419
|
default: n(() => [
|
|
431
|
-
a(l(
|
|
432
|
-
value:
|
|
433
|
-
"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),
|
|
434
423
|
animated: "",
|
|
435
424
|
class: "settings-tabs"
|
|
436
425
|
}, {
|
|
@@ -440,27 +429,27 @@ const Ce = Z(), Te = [
|
|
|
440
429
|
tab: "🎨 外观"
|
|
441
430
|
}, {
|
|
442
431
|
default: n(() => [
|
|
443
|
-
t("div",
|
|
444
|
-
t("div",
|
|
445
|
-
(R(!0), W(
|
|
432
|
+
t("div", ke, [
|
|
433
|
+
t("div", Se, [
|
|
434
|
+
(R(!0), W(K, null, G(l(he), (o) => (R(), W("div", {
|
|
446
435
|
key: o.name,
|
|
447
|
-
class:
|
|
448
|
-
onClick: (C) =>
|
|
436
|
+
class: Y(["preset-card", { active: B(o) }]),
|
|
437
|
+
onClick: (C) => N(o)
|
|
449
438
|
}, [
|
|
450
|
-
t("div",
|
|
451
|
-
t("div",
|
|
452
|
-
t("div",
|
|
439
|
+
t("div", Re, h(o.icon), 1),
|
|
440
|
+
t("div", He, h(o.name), 1),
|
|
441
|
+
t("div", Ve, [
|
|
453
442
|
t("span", {
|
|
454
443
|
class: "color-dot",
|
|
455
444
|
style: ne({ backgroundColor: o.primaryColor })
|
|
456
445
|
}, null, 4)
|
|
457
446
|
])
|
|
458
|
-
], 10,
|
|
447
|
+
], 10, Me))), 128))
|
|
459
448
|
])
|
|
460
449
|
]),
|
|
461
|
-
t("div",
|
|
450
|
+
t("div", Be, [
|
|
462
451
|
e[20] || (e[20] = t("div", { class: "section-title" }, "主题模式", -1)),
|
|
463
|
-
a(l(
|
|
452
|
+
a(l(J), {
|
|
464
453
|
value: l(s).themeMode,
|
|
465
454
|
"onUpdate:value": e[0] || (e[0] = (o) => l(s).themeMode = o),
|
|
466
455
|
class: "mode-group"
|
|
@@ -491,22 +480,22 @@ const Ce = Z(), Te = [
|
|
|
491
480
|
_: 1
|
|
492
481
|
}, 8, ["value"])
|
|
493
482
|
]),
|
|
494
|
-
t("div",
|
|
483
|
+
t("div", Ue, [
|
|
495
484
|
e[21] || (e[21] = t("div", { class: "section-title" }, "主题色", -1)),
|
|
496
|
-
t("div",
|
|
497
|
-
a(l(
|
|
485
|
+
t("div", _e, [
|
|
486
|
+
a(l(me), {
|
|
498
487
|
value: l(s).primaryColor,
|
|
499
488
|
"onUpdate:value": e[1] || (e[1] = (o) => l(s).primaryColor = o),
|
|
500
489
|
"show-alpha": !1,
|
|
501
|
-
swatches: l(
|
|
490
|
+
swatches: l(xe),
|
|
502
491
|
actions: ["confirm"]
|
|
503
492
|
}, null, 8, ["value", "swatches"]),
|
|
504
|
-
t("span",
|
|
493
|
+
t("span", Ee, h(l(s).primaryColor), 1)
|
|
505
494
|
])
|
|
506
495
|
]),
|
|
507
|
-
t("div",
|
|
496
|
+
t("div", We, [
|
|
508
497
|
e[25] || (e[25] = t("div", { class: "section-title" }, "圆角大小", -1)),
|
|
509
|
-
a(l(
|
|
498
|
+
a(l(J), {
|
|
510
499
|
value: l(s).borderRadius,
|
|
511
500
|
"onUpdate:value": e[2] || (e[2] = (o) => l(s).borderRadius = o),
|
|
512
501
|
class: "radius-group"
|
|
@@ -534,16 +523,16 @@ const Ce = Z(), Te = [
|
|
|
534
523
|
_: 1
|
|
535
524
|
}, 8, ["value"])
|
|
536
525
|
]),
|
|
537
|
-
t("div",
|
|
526
|
+
t("div", Ie, [
|
|
538
527
|
e[31] || (e[31] = t("div", { class: "section-title" }, "页面动画", -1)),
|
|
539
|
-
t("div",
|
|
528
|
+
t("div", Oe, [
|
|
540
529
|
e[26] || (e[26] = t("span", { class: "text-sm" }, "启用动画", -1)),
|
|
541
530
|
a(l(H), {
|
|
542
531
|
value: l(s).enableTransition,
|
|
543
532
|
"onUpdate:value": e[3] || (e[3] = (o) => l(s).enableTransition = o)
|
|
544
533
|
}, null, 8, ["value"])
|
|
545
534
|
]),
|
|
546
|
-
a(l(
|
|
535
|
+
a(l(J), {
|
|
547
536
|
value: l(s).transitionType,
|
|
548
537
|
"onUpdate:value": e[4] || (e[4] = (o) => l(s).transitionType = o),
|
|
549
538
|
disabled: !l(s).enableTransition,
|
|
@@ -579,10 +568,10 @@ const Ce = Z(), Te = [
|
|
|
579
568
|
}, 8, ["value", "disabled"])
|
|
580
569
|
]),
|
|
581
570
|
t("div", Pe, [
|
|
582
|
-
a(l(
|
|
571
|
+
a(l(I), {
|
|
583
572
|
block: "",
|
|
584
573
|
secondary: "",
|
|
585
|
-
onClick:
|
|
574
|
+
onClick: L
|
|
586
575
|
}, {
|
|
587
576
|
icon: n(() => [...e[32] || (e[32] = [
|
|
588
577
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -603,32 +592,32 @@ const Ce = Z(), Te = [
|
|
|
603
592
|
default: n(() => [
|
|
604
593
|
t("div", Ne, [
|
|
605
594
|
e[34] || (e[34] = t("div", { class: "section-title" }, "布局模式", -1)),
|
|
606
|
-
t("div",
|
|
607
|
-
(R(!0), W(
|
|
595
|
+
t("div", Le, [
|
|
596
|
+
(R(!0), W(K, null, G(l(Te), (o) => (R(), W("div", {
|
|
608
597
|
key: o.value,
|
|
609
|
-
class:
|
|
598
|
+
class: Y(["layout-item", {
|
|
610
599
|
active: l(s).layoutMode === o.value,
|
|
611
600
|
disabled: o.disabled
|
|
612
601
|
}]),
|
|
613
|
-
onClick: re((C) =>
|
|
602
|
+
onClick: re((C) => P(o.value, o.disabled), ["stop"])
|
|
614
603
|
}, [
|
|
615
|
-
t("div",
|
|
604
|
+
t("div", Ae, [
|
|
616
605
|
(R(), W("svg", Fe, [
|
|
617
606
|
t("g", {
|
|
618
607
|
innerHTML: o.svg
|
|
619
|
-
}, null, 8,
|
|
608
|
+
}, null, 8, $e)
|
|
620
609
|
]))
|
|
621
610
|
]),
|
|
622
|
-
t("div",
|
|
611
|
+
t("div", ze, [
|
|
623
612
|
c(h(o.label) + " ", 1),
|
|
624
|
-
o.disabled ? (R(), W("span",
|
|
613
|
+
o.disabled ? (R(), W("span", je, "敬请期待")) : Z("", !0)
|
|
625
614
|
])
|
|
626
615
|
], 10, De))), 128))
|
|
627
616
|
])
|
|
628
617
|
]),
|
|
629
618
|
t("div", Je, [
|
|
630
619
|
e[39] || (e[39] = t("div", { class: "section-title" }, "界面元素", -1)),
|
|
631
|
-
t("div",
|
|
620
|
+
t("div", Ke, [
|
|
632
621
|
e[35] || (e[35] = t("span", null, "显示面包屑", -1)),
|
|
633
622
|
a(l(H), {
|
|
634
623
|
value: l(s).showBreadcrumb,
|
|
@@ -643,14 +632,14 @@ const Ce = Z(), Te = [
|
|
|
643
632
|
disabled: !l(s).showBreadcrumb
|
|
644
633
|
}, null, 8, ["value", "disabled"])
|
|
645
634
|
]),
|
|
646
|
-
t("div",
|
|
635
|
+
t("div", Ye, [
|
|
647
636
|
e[37] || (e[37] = t("span", null, "显示标签页", -1)),
|
|
648
637
|
a(l(H), {
|
|
649
638
|
value: l(s).showTagsView,
|
|
650
639
|
"onUpdate:value": e[7] || (e[7] = (o) => l(s).showTagsView = o)
|
|
651
640
|
}, null, 8, ["value"])
|
|
652
641
|
]),
|
|
653
|
-
t("div",
|
|
642
|
+
t("div", Ze, [
|
|
654
643
|
e[38] || (e[38] = t("span", null, "显示页脚", -1)),
|
|
655
644
|
a(l(H), {
|
|
656
645
|
value: l(s).showFooter,
|
|
@@ -658,12 +647,12 @@ const Ce = Z(), Te = [
|
|
|
658
647
|
}, null, 8, ["value"])
|
|
659
648
|
])
|
|
660
649
|
]),
|
|
661
|
-
t("div",
|
|
650
|
+
t("div", qe, [
|
|
662
651
|
e[42] || (e[42] = t("div", { class: "section-title" }, "尺寸调整", -1)),
|
|
663
|
-
t("div",
|
|
664
|
-
t("div",
|
|
652
|
+
t("div", Qe, [
|
|
653
|
+
t("div", Xe, [
|
|
665
654
|
e[40] || (e[40] = t("span", null, "侧边栏宽度", -1)),
|
|
666
|
-
t("span",
|
|
655
|
+
t("span", et, h(l(s).sidebarWidth) + "px", 1)
|
|
667
656
|
]),
|
|
668
657
|
a(l(q), {
|
|
669
658
|
value: l(s).sidebarWidth,
|
|
@@ -674,10 +663,10 @@ const Ce = Z(), Te = [
|
|
|
674
663
|
marks: { 180: "180", 220: "220", 280: "280" }
|
|
675
664
|
}, null, 8, ["value"])
|
|
676
665
|
]),
|
|
677
|
-
t("div",
|
|
678
|
-
t("div",
|
|
666
|
+
t("div", tt, [
|
|
667
|
+
t("div", st, [
|
|
679
668
|
e[41] || (e[41] = t("span", null, "头部高度", -1)),
|
|
680
|
-
t("span",
|
|
669
|
+
t("span", ot, h(l(s).headerHeight) + "px", 1)
|
|
681
670
|
]),
|
|
682
671
|
a(l(q), {
|
|
683
672
|
value: l(s).headerHeight,
|
|
@@ -689,11 +678,11 @@ const Ce = Z(), Te = [
|
|
|
689
678
|
}, null, 8, ["value"])
|
|
690
679
|
])
|
|
691
680
|
]),
|
|
692
|
-
t("div",
|
|
693
|
-
a(l(
|
|
681
|
+
t("div", lt, [
|
|
682
|
+
a(l(I), {
|
|
694
683
|
block: "",
|
|
695
684
|
secondary: "",
|
|
696
|
-
onClick:
|
|
685
|
+
onClick: U
|
|
697
686
|
}, {
|
|
698
687
|
icon: n(() => [...e[43] || (e[43] = [
|
|
699
688
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -712,12 +701,12 @@ const Ce = Z(), Te = [
|
|
|
712
701
|
tab: "🔧 功能"
|
|
713
702
|
}, {
|
|
714
703
|
default: n(() => [
|
|
715
|
-
t("div",
|
|
704
|
+
t("div", it, [
|
|
716
705
|
e[49] || (e[49] = t("div", { class: "section-title" }, "缓存管理", -1)),
|
|
717
|
-
t("div",
|
|
718
|
-
a(l(
|
|
706
|
+
t("div", at, [
|
|
707
|
+
a(l(I), {
|
|
719
708
|
secondary: "",
|
|
720
|
-
onClick:
|
|
709
|
+
onClick: E
|
|
721
710
|
}, {
|
|
722
711
|
icon: n(() => [...e[45] || (e[45] = [
|
|
723
712
|
t("span", { class: "i-mdi:delete-sweep" }, null, -1)
|
|
@@ -727,9 +716,9 @@ const Ce = Z(), Te = [
|
|
|
727
716
|
]),
|
|
728
717
|
_: 1
|
|
729
718
|
}),
|
|
730
|
-
a(l(
|
|
719
|
+
a(l(I), {
|
|
731
720
|
secondary: "",
|
|
732
|
-
onClick:
|
|
721
|
+
onClick: D
|
|
733
722
|
}, {
|
|
734
723
|
icon: n(() => [...e[47] || (e[47] = [
|
|
735
724
|
t("span", { class: "i-mdi:refresh" }, null, -1)
|
|
@@ -741,10 +730,10 @@ const Ce = Z(), Te = [
|
|
|
741
730
|
})
|
|
742
731
|
])
|
|
743
732
|
]),
|
|
744
|
-
t("div",
|
|
733
|
+
t("div", nt, [
|
|
745
734
|
e[56] || (e[56] = t("div", { class: "section-title" }, "配置管理", -1)),
|
|
746
|
-
t("div",
|
|
747
|
-
a(l(
|
|
735
|
+
t("div", rt, [
|
|
736
|
+
a(l(I), {
|
|
748
737
|
secondary: "",
|
|
749
738
|
onClick: z
|
|
750
739
|
}, {
|
|
@@ -756,9 +745,9 @@ const Ce = Z(), Te = [
|
|
|
756
745
|
]),
|
|
757
746
|
_: 1
|
|
758
747
|
}),
|
|
759
|
-
a(l(
|
|
748
|
+
a(l(I), {
|
|
760
749
|
secondary: "",
|
|
761
|
-
onClick:
|
|
750
|
+
onClick: A
|
|
762
751
|
}, {
|
|
763
752
|
icon: n(() => [...e[52] || (e[52] = [
|
|
764
753
|
t("span", { class: "i-mdi:upload" }, null, -1)
|
|
@@ -769,12 +758,12 @@ const Ce = Z(), Te = [
|
|
|
769
758
|
_: 1
|
|
770
759
|
})
|
|
771
760
|
]),
|
|
772
|
-
a(l(
|
|
761
|
+
a(l(I), {
|
|
773
762
|
block: "",
|
|
774
763
|
type: "error",
|
|
775
764
|
secondary: "",
|
|
776
765
|
class: "mt-2",
|
|
777
|
-
onClick:
|
|
766
|
+
onClick: _
|
|
778
767
|
}, {
|
|
779
768
|
icon: n(() => [...e[54] || (e[54] = [
|
|
780
769
|
t("span", { class: "i-mdi:restore" }, null, -1)
|
|
@@ -785,9 +774,9 @@ const Ce = Z(), Te = [
|
|
|
785
774
|
_: 1
|
|
786
775
|
})
|
|
787
776
|
]),
|
|
788
|
-
t("div",
|
|
777
|
+
t("div", dt, [
|
|
789
778
|
e[59] || (e[59] = t("div", { class: "section-title" }, "系统模式", -1)),
|
|
790
|
-
t("div",
|
|
779
|
+
t("div", ut, [
|
|
791
780
|
e[57] || (e[57] = t("div", { class: "setting-label" }, [
|
|
792
781
|
t("span", null, "灰色模式"),
|
|
793
782
|
t("span", { class: "setting-desc" }, "用于哀悼日场景")
|
|
@@ -797,61 +786,61 @@ const Ce = Z(), Te = [
|
|
|
797
786
|
"onUpdate:value": e[11] || (e[11] = (o) => x.value = o)
|
|
798
787
|
}, null, 8, ["value"])
|
|
799
788
|
]),
|
|
800
|
-
t("div",
|
|
789
|
+
t("div", ct, [
|
|
801
790
|
e[58] || (e[58] = t("div", { class: "setting-label" }, [
|
|
802
791
|
t("span", null, "色弱模式"),
|
|
803
792
|
t("span", { class: "setting-desc" }, "提供无障碍访问支持")
|
|
804
793
|
], -1)),
|
|
805
794
|
a(l(H), {
|
|
806
|
-
value:
|
|
807
|
-
"onUpdate:value": e[12] || (e[12] = (o) =>
|
|
795
|
+
value: f.value,
|
|
796
|
+
"onUpdate:value": e[12] || (e[12] = (o) => f.value = o)
|
|
808
797
|
}, null, 8, ["value"])
|
|
809
798
|
])
|
|
810
799
|
]),
|
|
811
|
-
t("div",
|
|
800
|
+
t("div", vt, [
|
|
812
801
|
e[61] || (e[61] = t("div", { class: "section-title" }, "水印设置", -1)),
|
|
813
|
-
t("div",
|
|
802
|
+
t("div", pt, [
|
|
814
803
|
e[60] || (e[60] = t("span", null, "启用水印", -1)),
|
|
815
804
|
a(l(H), {
|
|
816
805
|
value: y.value,
|
|
817
806
|
"onUpdate:value": e[13] || (e[13] = (o) => y.value = o)
|
|
818
807
|
}, null, 8, ["value"])
|
|
819
808
|
]),
|
|
820
|
-
y.value ? (R(), W("div",
|
|
809
|
+
y.value ? (R(), W("div", mt, [
|
|
821
810
|
a(l(ge), {
|
|
822
811
|
value: k.value,
|
|
823
812
|
"onUpdate:value": e[14] || (e[14] = (o) => k.value = o),
|
|
824
813
|
placeholder: "请输入水印内容",
|
|
825
814
|
size: "small"
|
|
826
815
|
}, null, 8, ["value"])
|
|
827
|
-
])) :
|
|
816
|
+
])) : Z("", !0)
|
|
828
817
|
]),
|
|
829
818
|
t("div", gt, [
|
|
830
819
|
e[68] || (e[68] = t("div", { class: "section-title" }, "系统信息", -1)),
|
|
831
|
-
t("div",
|
|
832
|
-
t("div",
|
|
820
|
+
t("div", ft, [
|
|
821
|
+
t("div", yt, [
|
|
833
822
|
e[62] || (e[62] = t("span", { class: "info-label" }, "浏览器", -1)),
|
|
834
|
-
t("span",
|
|
823
|
+
t("span", ht, h(S.value.browser), 1)
|
|
835
824
|
]),
|
|
836
|
-
t("div",
|
|
825
|
+
t("div", bt, [
|
|
837
826
|
e[63] || (e[63] = t("span", { class: "info-label" }, "操作系统", -1)),
|
|
838
|
-
t("span",
|
|
827
|
+
t("span", wt, h(S.value.os), 1)
|
|
839
828
|
]),
|
|
840
|
-
t("div",
|
|
829
|
+
t("div", xt, [
|
|
841
830
|
e[64] || (e[64] = t("span", { class: "info-label" }, "屏幕分辨率", -1)),
|
|
842
|
-
t("span",
|
|
831
|
+
t("span", Ct, h(S.value.resolution), 1)
|
|
843
832
|
]),
|
|
844
|
-
t("div",
|
|
833
|
+
t("div", Tt, [
|
|
845
834
|
e[65] || (e[65] = t("span", { class: "info-label" }, "设备像素比", -1)),
|
|
846
|
-
t("span",
|
|
835
|
+
t("span", kt, h(S.value.pixelRatio), 1)
|
|
847
836
|
]),
|
|
848
|
-
t("div",
|
|
837
|
+
t("div", St, [
|
|
849
838
|
e[66] || (e[66] = t("span", { class: "info-label" }, "语言", -1)),
|
|
850
|
-
t("span",
|
|
839
|
+
t("span", Mt, h(S.value.language), 1)
|
|
851
840
|
]),
|
|
852
|
-
t("div",
|
|
841
|
+
t("div", Rt, [
|
|
853
842
|
e[67] || (e[67] = t("span", { class: "info-label" }, "时区", -1)),
|
|
854
|
-
t("span",
|
|
843
|
+
t("span", Ht, h(S.value.timezone), 1)
|
|
855
844
|
])
|
|
856
845
|
])
|
|
857
846
|
])
|
|
@@ -868,27 +857,28 @@ const Ce = Z(), Te = [
|
|
|
868
857
|
_: 1
|
|
869
858
|
}, 8, ["show"]));
|
|
870
859
|
}
|
|
871
|
-
}),
|
|
872
|
-
const
|
|
860
|
+
}), Bt = (b, u) => {
|
|
861
|
+
const p = b.__vccOpts || b;
|
|
873
862
|
for (const [s, w] of u)
|
|
874
|
-
|
|
875
|
-
return
|
|
876
|
-
}, It = /* @__PURE__ */
|
|
877
|
-
function
|
|
878
|
-
const
|
|
879
|
-
return
|
|
863
|
+
p[s] = w;
|
|
864
|
+
return p;
|
|
865
|
+
}, It = /* @__PURE__ */ Bt(Vt, [["__scopeId", "data-v-f8cba7b1"]]);
|
|
866
|
+
function Ot(b, u = {}) {
|
|
867
|
+
const p = X(u);
|
|
868
|
+
return p().syncCSSVariables(), p;
|
|
880
869
|
}
|
|
881
870
|
export {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
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,
|
|
887
876
|
It as SettingsDrawer,
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
877
|
+
he as THEME_PRESETS,
|
|
878
|
+
we as TRANSITION_MAP,
|
|
879
|
+
Q as adjustColor,
|
|
880
|
+
X as createSettingsStore,
|
|
881
|
+
Ot as setupLayout,
|
|
892
882
|
Ce as useSettingsStore
|
|
893
883
|
};
|
|
894
884
|
//# sourceMappingURL=index.js.map
|