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