@chewel611/naive-ui-plus 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +546 -544
- package/dist/index.umd.cjs +1 -1
- package/es/layout/sider/PMenus.vue.js +47 -45
- package/lib/layout/sider/PMenus.vue.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useDialog as Ee, useMessage as ce, NCard as Oe, NDataTable as Me, NSpace as he, NTooltip as Ne, NIcon as
|
|
2
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { useDialog as Ee, useMessage as ce, NCard as Oe, NDataTable as Me, NSpace as he, NTooltip as Ne, NIcon as A, NDropdown as Q, NButton as _e, NAvatar as ve, NBreadcrumb as Ie, NBreadcrumbItem as Ue, NDivider as He, useThemeVars as We, NMenu as qe, NLayout as Le, NLayoutSider as je, NFlex as Ve, NLayoutHeader as Fe, NLayoutContent as Ke, NBackTop as Ye, NConfigProvider as Xe, dateZhCN as Je, zhCN as Ze, NDialogProvider as Ge, NNotificationProvider as Qe, NMessageProvider as et, NModal as tt, NText as at, NEmpty as nt, NSpin as ot, NResult as be } from "naive-ui";
|
|
2
|
+
import { defineComponent as H, ref as z, computed as F, unref as a, onMounted as ee, openBlock as g, createBlock as L, withCtx as l, createElementVNode as m, createElementBlock as U, renderSlot as K, createCommentVNode as M, createVNode as c, toDisplayString as q, h as D, toRaw as Ce, reactive as ye, normalizeClass as oe, withDirectives as st, vShow as lt, nextTick as se, inject as Re, Fragment as Te, renderList as rt, resolveDynamicComponent as pe, withModifiers as me, resolveComponent as Ae, KeepAlive as ct, useCssVars as it, watch as ze, normalizeStyle as Be, provide as ut, mergeProps as dt, createTextVNode as ge, onBeforeMount as ft } from "vue";
|
|
3
3
|
import { PlusSquareOutlined as gt, DeleteOutlined as Se, ReloadOutlined as we, MoreOutlined as pt, EditOutlined as mt, MenuUnfoldOutlined as ht, MenuFoldOutlined as _t, FullscreenOutlined as vt, FullscreenExitOutlined as bt, CloseOutlined as $e, ColumnWidthOutlined as yt, MinusOutlined as wt, LeftOutlined as Pt, RightOutlined as kt, DownOutlined as xt, AlertOutlined as Lt } from "@vicons/antd";
|
|
4
4
|
import { defineStore as Pe } from "pinia";
|
|
5
5
|
import { useRoute as te, useRouter as le } from "vue-router";
|
|
@@ -19,86 +19,86 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
19
19
|
onAdd: {},
|
|
20
20
|
onEdit: {}
|
|
21
21
|
},
|
|
22
|
-
setup(e, { expose:
|
|
23
|
-
const o =
|
|
22
|
+
setup(e, { expose: s }) {
|
|
23
|
+
const o = z(null), p = Ee(), _ = ce(), u = z(!1), y = z([]), i = z([]), E = z({
|
|
24
24
|
page: 1,
|
|
25
25
|
itemCount: 0,
|
|
26
26
|
pageSize: 10,
|
|
27
27
|
pageSizes: [10, 20, 30, 50],
|
|
28
28
|
showSizePicker: !0,
|
|
29
29
|
onChange: async (P) => {
|
|
30
|
-
|
|
30
|
+
E.value.page = P, await N();
|
|
31
31
|
},
|
|
32
32
|
onUpdatePageSize: async (P) => {
|
|
33
|
-
|
|
33
|
+
E.value.pageSize = P, await N();
|
|
34
34
|
}
|
|
35
|
-
}), w = e,
|
|
36
|
-
const k = (
|
|
37
|
-
const
|
|
35
|
+
}), w = e, r = (P) => {
|
|
36
|
+
const k = (T) => {
|
|
37
|
+
const R = [];
|
|
38
38
|
return P && P.forEach((I) => {
|
|
39
|
-
I.key !== "edit" && I.key !== "delete" &&
|
|
39
|
+
I.key !== "edit" && I.key !== "delete" && R.push({
|
|
40
40
|
label: I.name,
|
|
41
41
|
key: I.key,
|
|
42
|
-
icon: I.icon && (() =>
|
|
43
|
-
props: { onClick: () => I.action(
|
|
42
|
+
icon: I.icon && (() => D(A, null, { default: () => D(I.icon) })),
|
|
43
|
+
props: { onClick: () => I.action(T) }
|
|
44
44
|
});
|
|
45
|
-
}),
|
|
45
|
+
}), R;
|
|
46
46
|
};
|
|
47
47
|
return {
|
|
48
48
|
title: "操作",
|
|
49
49
|
key: "actions",
|
|
50
50
|
width: 100,
|
|
51
51
|
fixed: "right",
|
|
52
|
-
render: (
|
|
53
|
-
let
|
|
54
|
-
if (w.onEdit &&
|
|
52
|
+
render: (T) => {
|
|
53
|
+
let R = [];
|
|
54
|
+
if (w.onEdit && R.push({
|
|
55
55
|
label: "编辑",
|
|
56
56
|
key: "edit",
|
|
57
|
-
icon: () =>
|
|
58
|
-
props: { onClick: async () => await w.onEdit(
|
|
59
|
-
}), w.onDelete &&
|
|
57
|
+
icon: () => D(A, null, { default: () => D(mt) }),
|
|
58
|
+
props: { onClick: async () => await w.onEdit(T) }
|
|
59
|
+
}), w.onDelete && R.push({
|
|
60
60
|
label: "删除",
|
|
61
61
|
key: "delete",
|
|
62
|
-
icon: () =>
|
|
63
|
-
props: { onClick: () =>
|
|
64
|
-
}),
|
|
65
|
-
return
|
|
62
|
+
icon: () => D(A, null, { default: () => D(Se) }),
|
|
63
|
+
props: { onClick: () => x(T) }
|
|
64
|
+
}), R = [...R, ...k(T)], !(R.length <= 0))
|
|
65
|
+
return D(
|
|
66
66
|
Q,
|
|
67
67
|
{
|
|
68
|
-
options:
|
|
68
|
+
options: R,
|
|
69
69
|
placement: "bottom-start"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
default: () =>
|
|
72
|
+
default: () => D(
|
|
73
73
|
_e,
|
|
74
74
|
{ size: "small", type: "primary" },
|
|
75
|
-
{ default: () => ["操作",
|
|
75
|
+
{ default: () => ["操作", D(A, () => D(pt))] }
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
}, $ = F(() => {
|
|
82
|
-
const P = w.columns.filter((
|
|
83
|
-
title:
|
|
84
|
-
key:
|
|
85
|
-
width:
|
|
86
|
-
fixed:
|
|
87
|
-
render:
|
|
88
|
-
ellipsis:
|
|
82
|
+
const P = w.columns.filter((T) => T.key != "action").map((T) => ({
|
|
83
|
+
title: T.title,
|
|
84
|
+
key: T.key,
|
|
85
|
+
width: T.width,
|
|
86
|
+
fixed: T.fixed ?? !1,
|
|
87
|
+
render: T.render,
|
|
88
|
+
ellipsis: T.ellipsis ? { tooltip: !0 } : !1
|
|
89
89
|
})), k = w.columns.reduce(
|
|
90
|
-
(
|
|
90
|
+
(T, R) => R.key === "action" ? R : T,
|
|
91
91
|
void 0
|
|
92
92
|
)?.action;
|
|
93
93
|
return k && k?.length > 0 || w.onEdit || w.onDelete ? [
|
|
94
94
|
{ type: "selection", fixed: "left" },
|
|
95
95
|
...P,
|
|
96
|
-
|
|
96
|
+
r(k)
|
|
97
97
|
] : [{ type: "selection", fixed: "left" }, ...P];
|
|
98
|
-
}),
|
|
99
|
-
const P =
|
|
100
|
-
|
|
101
|
-
},
|
|
98
|
+
}), d = async () => await N(), x = (P) => C([P]), O = () => {
|
|
99
|
+
const P = n();
|
|
100
|
+
C(P);
|
|
101
|
+
}, C = (P) => {
|
|
102
102
|
P && P.length > 0 && p.warning({
|
|
103
103
|
title: "警告",
|
|
104
104
|
content: "删除数据不可恢复, 确认删除吗?",
|
|
@@ -107,50 +107,50 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
107
107
|
onPositiveClick: async () => {
|
|
108
108
|
if (w.onDelete)
|
|
109
109
|
try {
|
|
110
|
-
await w.onDelete(P) ? (
|
|
110
|
+
await w.onDelete(P) ? (N(), _.success("删除成功")) : _.error("删除失败");
|
|
111
111
|
} catch (k) {
|
|
112
|
-
|
|
112
|
+
_.error(k.message);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
-
},
|
|
117
|
-
if (!
|
|
118
|
-
|
|
116
|
+
}, n = () => y.value ? i.value.filter((k) => y.value.includes(k.id)).map((k) => Ce(k)) : [], v = () => n()[0], S = () => Ce(i.value), N = async () => {
|
|
117
|
+
if (!u.value) {
|
|
118
|
+
u.value = !0;
|
|
119
119
|
try {
|
|
120
120
|
if (w.onLoad) {
|
|
121
121
|
var { items: P, totalCount: k } = await w.onLoad(
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
E.value.page,
|
|
123
|
+
E.value.pageSize
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
i.value = P, E.value.itemCount = k;
|
|
126
126
|
}
|
|
127
|
-
} catch (
|
|
128
|
-
|
|
127
|
+
} catch (T) {
|
|
128
|
+
_.error(T.message);
|
|
129
129
|
} finally {
|
|
130
|
-
|
|
130
|
+
u.value = !1;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
},
|
|
134
|
-
const P =
|
|
133
|
+
}, h = F(() => {
|
|
134
|
+
const P = a(o);
|
|
135
135
|
if (!P) return;
|
|
136
|
-
const k = P?.$el,
|
|
136
|
+
const k = P?.$el, T = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: R } = ae(T), I = 48;
|
|
137
137
|
let j = 12, G = 25;
|
|
138
|
-
const
|
|
138
|
+
const X = k.querySelector(
|
|
139
139
|
".n-data-table__pagination"
|
|
140
140
|
);
|
|
141
|
-
if (
|
|
142
|
-
const
|
|
143
|
-
j +=
|
|
141
|
+
if (X) {
|
|
142
|
+
const J = X.offsetHeight;
|
|
143
|
+
j += J || 0;
|
|
144
144
|
} else
|
|
145
145
|
j += 28;
|
|
146
|
-
return
|
|
147
|
-
}),
|
|
148
|
-
const k = document.documentElement,
|
|
149
|
-
left:
|
|
146
|
+
return R - (I + j + G);
|
|
147
|
+
}), Y = (P) => !P || !P.getBoundingClientRect ? 0 : P.getBoundingClientRect(), ae = (P) => {
|
|
148
|
+
const k = document.documentElement, T = k.scrollLeft, R = k.scrollTop, I = k.clientLeft, j = k.clientTop, G = window.pageXOffset, X = window.pageYOffset, ne = Y(P), {
|
|
149
|
+
left: J,
|
|
150
150
|
top: ie,
|
|
151
151
|
width: ue,
|
|
152
152
|
height: t
|
|
153
|
-
} = ne, f = (G ||
|
|
153
|
+
} = ne, f = (G || T) - (I || 0), b = (X || R) - (j || 0), B = J + G, Z = ie + X, de = B - f, fe = Z - b, ke = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
|
|
154
154
|
return {
|
|
155
155
|
left: de,
|
|
156
156
|
top: fe,
|
|
@@ -160,83 +160,83 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
160
160
|
bottomIncludeBody: xe - fe
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
|
-
return ee(async () => await
|
|
164
|
-
getData:
|
|
165
|
-
getSelectedRow:
|
|
166
|
-
getSelectedRows:
|
|
167
|
-
refreshData:
|
|
163
|
+
return ee(async () => await N()), s({
|
|
164
|
+
getData: S,
|
|
165
|
+
getSelectedRow: v,
|
|
166
|
+
getSelectedRows: n,
|
|
167
|
+
refreshData: N,
|
|
168
168
|
resetPage: () => {
|
|
169
|
-
|
|
169
|
+
E.value.page = 1;
|
|
170
170
|
}
|
|
171
171
|
}), (P, k) => {
|
|
172
|
-
const
|
|
173
|
-
return g(),
|
|
174
|
-
header:
|
|
175
|
-
|
|
172
|
+
const T = Ne, R = he, I = Me;
|
|
173
|
+
return g(), L(a(Oe), { bordered: !1 }, {
|
|
174
|
+
header: l(() => [
|
|
175
|
+
c(R, {
|
|
176
176
|
justify: "space-between",
|
|
177
177
|
align: "center",
|
|
178
178
|
class: "w-full"
|
|
179
179
|
}, {
|
|
180
|
-
default:
|
|
180
|
+
default: l(() => [
|
|
181
181
|
m("span", St, q(e.title), 1),
|
|
182
|
-
|
|
183
|
-
default:
|
|
184
|
-
w.onAdd ? (g(),
|
|
182
|
+
c(R, null, {
|
|
183
|
+
default: l(() => [
|
|
184
|
+
w.onAdd ? (g(), L(T, {
|
|
185
185
|
key: 0,
|
|
186
186
|
trigger: "hover"
|
|
187
187
|
}, {
|
|
188
|
-
trigger:
|
|
189
|
-
|
|
188
|
+
trigger: l(() => [
|
|
189
|
+
c(a(A), {
|
|
190
190
|
size: "18",
|
|
191
191
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
192
192
|
onClick: w.onAdd
|
|
193
193
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
|
|
194
|
+
default: l(() => [
|
|
195
|
+
c(a(gt))
|
|
196
196
|
]),
|
|
197
197
|
_: 1
|
|
198
198
|
}, 8, ["onClick"])
|
|
199
199
|
]),
|
|
200
|
-
default:
|
|
200
|
+
default: l(() => [
|
|
201
201
|
k[1] || (k[1] = m("span", null, "新增", -1))
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
204
|
})) : M("", !0),
|
|
205
|
-
w.onDelete ? (g(),
|
|
205
|
+
w.onDelete ? (g(), L(T, {
|
|
206
206
|
key: 1,
|
|
207
207
|
trigger: "hover"
|
|
208
208
|
}, {
|
|
209
|
-
trigger:
|
|
210
|
-
|
|
209
|
+
trigger: l(() => [
|
|
210
|
+
c(a(A), {
|
|
211
211
|
size: "18",
|
|
212
212
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: O
|
|
214
214
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
|
|
215
|
+
default: l(() => [
|
|
216
|
+
c(a(Se))
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
})
|
|
220
220
|
]),
|
|
221
|
-
default:
|
|
221
|
+
default: l(() => [
|
|
222
222
|
k[2] || (k[2] = m("span", null, "删除", -1))
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
225
|
})) : M("", !0),
|
|
226
|
-
|
|
227
|
-
trigger:
|
|
228
|
-
|
|
226
|
+
c(T, { trigger: "hover" }, {
|
|
227
|
+
trigger: l(() => [
|
|
228
|
+
c(a(A), {
|
|
229
229
|
size: "18",
|
|
230
230
|
class: "cursor-pointer hover:text-blue-600",
|
|
231
|
-
onClick:
|
|
231
|
+
onClick: d
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
|
|
233
|
+
default: l(() => [
|
|
234
|
+
c(a(we))
|
|
235
235
|
]),
|
|
236
236
|
_: 1
|
|
237
237
|
})
|
|
238
238
|
]),
|
|
239
|
-
default:
|
|
239
|
+
default: l(() => [
|
|
240
240
|
k[3] || (k[3] = m("span", null, "刷新", -1))
|
|
241
241
|
]),
|
|
242
242
|
_: 1
|
|
@@ -248,24 +248,24 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
248
248
|
_: 1
|
|
249
249
|
})
|
|
250
250
|
]),
|
|
251
|
-
default:
|
|
251
|
+
default: l(() => [
|
|
252
252
|
m("div", $t, [
|
|
253
253
|
P.$slots.toolbar ? (g(), U("div", Et, [
|
|
254
254
|
K(P.$slots, "toolbar")
|
|
255
255
|
])) : M("", !0),
|
|
256
|
-
|
|
256
|
+
c(I, {
|
|
257
257
|
remote: "",
|
|
258
258
|
ref_key: "$table",
|
|
259
259
|
ref: o,
|
|
260
260
|
"checked-row-keys": y.value,
|
|
261
261
|
"onUpdate:checkedRowKeys": k[0] || (k[0] = (j) => y.value = j),
|
|
262
|
-
"max-height":
|
|
263
|
-
loading:
|
|
262
|
+
"max-height": h.value,
|
|
263
|
+
loading: u.value,
|
|
264
264
|
bordered: !1,
|
|
265
265
|
"single-line": !1,
|
|
266
266
|
columns: $.value,
|
|
267
|
-
data:
|
|
268
|
-
pagination:
|
|
267
|
+
data: i.value,
|
|
268
|
+
pagination: E.value,
|
|
269
269
|
"row-key": (j) => j[e.idField]
|
|
270
270
|
}, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"])
|
|
271
271
|
])
|
|
@@ -275,9 +275,9 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
}), W = (e) => {
|
|
278
|
-
const
|
|
279
|
-
return
|
|
280
|
-
o.component(
|
|
278
|
+
const s = e;
|
|
279
|
+
return s.install = function(o) {
|
|
280
|
+
o.component(s.__name, e);
|
|
281
281
|
}, e;
|
|
282
282
|
}, Nt = W(Ot), Rt = ["Redirect", "RedirectSon", "login"], re = Pe(
|
|
283
283
|
"p-layout",
|
|
@@ -295,89 +295,89 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
295
295
|
});
|
|
296
296
|
return {
|
|
297
297
|
state: e,
|
|
298
|
-
initTabs: (
|
|
299
|
-
|
|
298
|
+
initTabs: (n) => {
|
|
299
|
+
n.sort((v, S) => v.meta.affix && !S.meta.affix ? -1 : !v.meta.affix && S.meta.affix ? 1 : Number(S.meta.sort ?? 0) - Number(v.meta.sort ?? 0)), e.tabs = n;
|
|
300
300
|
},
|
|
301
|
-
addTab: (
|
|
302
|
-
(
|
|
303
|
-
) || e.tabs?.push(
|
|
301
|
+
addTab: (n) => Rt.includes(n.name) ? !1 : (e.tabs?.some(
|
|
302
|
+
(S) => S.fullPath == n.fullPath
|
|
303
|
+
) || e.tabs?.push(n), !0),
|
|
304
304
|
getCurrentTab: () => {
|
|
305
|
-
const
|
|
306
|
-
return e.tabs.find((
|
|
305
|
+
const n = te();
|
|
306
|
+
return e.tabs.find((v) => v.fullPath == n.fullPath);
|
|
307
307
|
},
|
|
308
|
-
closeCurrentTab: (
|
|
309
|
-
const
|
|
310
|
-
(
|
|
308
|
+
closeCurrentTab: (n) => {
|
|
309
|
+
const v = e.tabs.findIndex(
|
|
310
|
+
(S) => S.fullPath == n.fullPath
|
|
311
311
|
);
|
|
312
|
-
e.tabs.splice(
|
|
312
|
+
e.tabs.splice(v, 1);
|
|
313
313
|
},
|
|
314
314
|
closeAllTabs: () => {
|
|
315
|
-
e.tabs = e.tabs.filter((
|
|
315
|
+
e.tabs = e.tabs.filter((n) => n?.meta?.affix ?? !1);
|
|
316
316
|
},
|
|
317
|
-
closeOtherTabs: (
|
|
317
|
+
closeOtherTabs: (n) => {
|
|
318
318
|
e.tabs = e.tabs.filter(
|
|
319
|
-
(
|
|
319
|
+
(v) => v.fullPath == n.fullPath || (v?.meta?.affix ?? !1)
|
|
320
320
|
);
|
|
321
321
|
},
|
|
322
|
-
closeLeftTabs: (
|
|
323
|
-
const
|
|
324
|
-
(
|
|
322
|
+
closeLeftTabs: (n) => {
|
|
323
|
+
const v = e.tabs.findIndex(
|
|
324
|
+
(S) => S.fullPath == n.fullPath
|
|
325
325
|
);
|
|
326
326
|
e.tabs = e.tabs.filter(
|
|
327
|
-
(
|
|
327
|
+
(S, N) => N >= v || (S?.meta?.affix ?? !1)
|
|
328
328
|
);
|
|
329
329
|
},
|
|
330
|
-
closeRightTabs: (
|
|
331
|
-
const
|
|
332
|
-
(
|
|
330
|
+
closeRightTabs: (n) => {
|
|
331
|
+
const v = e.tabs.findIndex(
|
|
332
|
+
(S) => S.fullPath == n.fullPath
|
|
333
333
|
);
|
|
334
334
|
e.tabs = e.tabs.filter(
|
|
335
|
-
(
|
|
335
|
+
(S, N) => N <= v || (S?.meta?.affix ?? !1)
|
|
336
336
|
);
|
|
337
337
|
},
|
|
338
338
|
collapse: () => {
|
|
339
339
|
e.collapsed = !e.collapsed;
|
|
340
340
|
},
|
|
341
|
-
setTitle: (
|
|
342
|
-
e.title =
|
|
341
|
+
setTitle: (n) => {
|
|
342
|
+
e.title = n;
|
|
343
343
|
},
|
|
344
|
-
setLogo: (
|
|
345
|
-
e.logo =
|
|
344
|
+
setLogo: (n) => {
|
|
345
|
+
e.logo = n;
|
|
346
346
|
},
|
|
347
|
-
setUser: (
|
|
348
|
-
e.uid =
|
|
347
|
+
setUser: (n, v) => {
|
|
348
|
+
e.uid = n, e.uname = v;
|
|
349
349
|
},
|
|
350
|
-
setSettingPages: (
|
|
351
|
-
e.settingPages =
|
|
350
|
+
setSettingPages: (n) => {
|
|
351
|
+
e.settingPages = n;
|
|
352
352
|
},
|
|
353
|
-
setLogout: (
|
|
354
|
-
e.logout =
|
|
353
|
+
setLogout: (n) => {
|
|
354
|
+
e.logout = n;
|
|
355
355
|
},
|
|
356
|
-
enableLanguage: (
|
|
357
|
-
e.enableLanguage =
|
|
356
|
+
enableLanguage: (n) => {
|
|
357
|
+
e.enableLanguage = n;
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
), At = { class: "logo" }, zt = /* @__PURE__ */ H({
|
|
362
362
|
__name: "PLogo",
|
|
363
363
|
setup(e) {
|
|
364
|
-
const
|
|
364
|
+
const s = re();
|
|
365
365
|
return (o, p) => (g(), U("div", At, [
|
|
366
|
-
|
|
366
|
+
c(a(ve), {
|
|
367
367
|
color: "var(--color-logo)",
|
|
368
368
|
size: 32,
|
|
369
|
-
src:
|
|
370
|
-
class: oe({ "mr-2": !
|
|
369
|
+
src: a(s).state.logo,
|
|
370
|
+
class: oe({ "mr-2": !a(s).state.collapsed })
|
|
371
371
|
}, null, 8, ["src", "class"]),
|
|
372
|
-
st(m("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(
|
|
373
|
-
[lt, !
|
|
372
|
+
st(m("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(a(s).state.title), 513), [
|
|
373
|
+
[lt, !a(s).state.collapsed]
|
|
374
374
|
])
|
|
375
375
|
]));
|
|
376
376
|
}
|
|
377
|
-
}), V = (e,
|
|
377
|
+
}), V = (e, s) => {
|
|
378
378
|
const o = e.__vccOpts || e;
|
|
379
|
-
for (const [p,
|
|
380
|
-
o[p] =
|
|
379
|
+
for (const [p, _] of s)
|
|
380
|
+
o[p] = _;
|
|
381
381
|
return o;
|
|
382
382
|
}, Bt = /* @__PURE__ */ V(zt, [["__scopeId", "data-v-e48aeefa"]]), Dt = {
|
|
383
383
|
translationApiUrl: "https://translate.zvo.cn/api",
|
|
@@ -388,75 +388,75 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
388
388
|
selectLanguage: async (e) => {
|
|
389
389
|
}
|
|
390
390
|
}, Mt = Pe("language", () => {
|
|
391
|
-
const e =
|
|
391
|
+
const e = z(Dt), s = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
|
|
392
392
|
return {
|
|
393
|
-
select: async (
|
|
394
|
-
if (e.value.currentLanguage ===
|
|
393
|
+
select: async (r) => {
|
|
394
|
+
if (e.value.currentLanguage === r)
|
|
395
395
|
return;
|
|
396
|
-
const $ = (await
|
|
397
|
-
(
|
|
396
|
+
const $ = (await s()).find(
|
|
397
|
+
(d) => d.key === r
|
|
398
398
|
);
|
|
399
399
|
$ && (e.value.currentLanguage = $.key, e.value.selectLanguage($));
|
|
400
400
|
},
|
|
401
|
-
selectLanguageCallback: async (
|
|
402
|
-
e.value.selectLanguage =
|
|
401
|
+
selectLanguageCallback: async (r) => {
|
|
402
|
+
e.value.selectLanguage = r;
|
|
403
403
|
},
|
|
404
|
-
initLanguagesCallback: async (
|
|
405
|
-
e.value.initLanguages =
|
|
404
|
+
initLanguagesCallback: async (r) => {
|
|
405
|
+
e.value.initLanguages = r;
|
|
406
406
|
},
|
|
407
|
-
getLanguages:
|
|
407
|
+
getLanguages: s,
|
|
408
408
|
getCurrentLanguage: async () => {
|
|
409
409
|
if (e.value.currentLanguage)
|
|
410
|
-
return (await
|
|
411
|
-
(
|
|
410
|
+
return (await s()).find(
|
|
411
|
+
(r) => r.key === e.value.currentLanguage
|
|
412
412
|
);
|
|
413
413
|
},
|
|
414
|
-
setTranslationApiUrl: (
|
|
415
|
-
e.value.translationApiUrl =
|
|
414
|
+
setTranslationApiUrl: (r) => {
|
|
415
|
+
e.value.translationApiUrl = r;
|
|
416
416
|
},
|
|
417
417
|
getTranslationApiUrl: () => e.value.translationApiUrl,
|
|
418
418
|
getDefaultLanguage: () => e.value.defaultLanguage ? e.value.defaultLanguage : "chinese_simplified",
|
|
419
|
-
setDefaultLanguage: (
|
|
420
|
-
(
|
|
419
|
+
setDefaultLanguage: (r) => {
|
|
420
|
+
(r === "Chinese" || r === "chinese") && (r = "chinese_simplified"), e.value.defaultLanguage = r;
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
}), It = { key: 1 }, De = /* @__PURE__ */ H({
|
|
424
424
|
__name: "PLanguage",
|
|
425
425
|
setup(e) {
|
|
426
426
|
const {
|
|
427
|
-
select:
|
|
427
|
+
select: s,
|
|
428
428
|
getLanguages: o,
|
|
429
429
|
getCurrentLanguage: p,
|
|
430
|
-
getDefaultLanguage:
|
|
431
|
-
getTranslationApiUrl:
|
|
432
|
-
} = Mt(), y =
|
|
433
|
-
const
|
|
434
|
-
|
|
430
|
+
getDefaultLanguage: _,
|
|
431
|
+
getTranslationApiUrl: u
|
|
432
|
+
} = Mt(), y = z(), i = z([]), E = async (r) => await s(r), w = async () => {
|
|
433
|
+
const r = window.translate;
|
|
434
|
+
r && (r.selectLanguageTag.show = !1, r.selectLanguageTag.languages = (await o()).map(($) => $.key).join(","), r.ignore.class.push("ignore-translate-flag"), r.ignore.id.push("ignore-translation"), r.language.setLocal(_()), r.request.api.translate = "api/v1/translation", r.request.api.connectTest = "api/v1/translation/connect-test", r.request.api.init = "api/v1/translation/init", r.request.api.language = "api/v1/translation/language", r.request.setHost(u()), r.request.listener.start(), r.listener.start(), r.whole.enableAll(), r.execute());
|
|
435
435
|
};
|
|
436
436
|
return ee(async () => {
|
|
437
|
-
await se(), await w(), y.value = await p(),
|
|
438
|
-
}), (
|
|
439
|
-
const
|
|
440
|
-
return
|
|
437
|
+
await se(), await w(), y.value = await p(), i.value = await o();
|
|
438
|
+
}), (r, $) => {
|
|
439
|
+
const d = A, x = _e;
|
|
440
|
+
return i.value.length > 0 ? (g(), L(a(Q), {
|
|
441
441
|
key: 0,
|
|
442
442
|
id: "ignore-translation",
|
|
443
443
|
placement: "bottom-start",
|
|
444
444
|
trigger: "hover",
|
|
445
445
|
class: "flex flex-col justify-center h-full ignore",
|
|
446
|
-
onSelect:
|
|
447
|
-
options:
|
|
446
|
+
onSelect: E,
|
|
447
|
+
options: i.value
|
|
448
448
|
}, {
|
|
449
|
-
default:
|
|
450
|
-
|
|
449
|
+
default: l(() => [
|
|
450
|
+
c(x, {
|
|
451
451
|
quaternary: "",
|
|
452
452
|
type: "info"
|
|
453
453
|
}, {
|
|
454
|
-
default:
|
|
455
|
-
y.value ? (g(), U("label", It, q(y.value?.label), 1)) : (g(),
|
|
454
|
+
default: l(() => [
|
|
455
|
+
y.value ? (g(), U("label", It, q(y.value?.label), 1)) : (g(), L(d, {
|
|
456
456
|
key: 0,
|
|
457
457
|
size: "18"
|
|
458
458
|
}, {
|
|
459
|
-
default:
|
|
459
|
+
default: l(() => [...$[0] || ($[0] = [
|
|
460
460
|
m("svg", {
|
|
461
461
|
xmlns: "http://www.w3.org/2000/svg",
|
|
462
462
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -491,34 +491,34 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
491
491
|
}, Ft = { class: "layout-header-trigger layout-header-trigger-min" }, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */ H({
|
|
492
492
|
__name: "PHeader",
|
|
493
493
|
setup(e) {
|
|
494
|
-
const
|
|
495
|
-
const
|
|
496
|
-
key:
|
|
497
|
-
label:
|
|
498
|
-
icon:
|
|
499
|
-
meta:
|
|
500
|
-
disabled:
|
|
494
|
+
const s = ce(), o = Ee(), p = re(), _ = le(), u = te(), y = Re("reloadPage"), i = (C) => _.push({ name: C }), E = F(() => w(u.matched)), w = (C) => C.map((n) => {
|
|
495
|
+
const v = {
|
|
496
|
+
key: n.name,
|
|
497
|
+
label: n.meta.title,
|
|
498
|
+
icon: n.meta.icon,
|
|
499
|
+
meta: n.meta,
|
|
500
|
+
disabled: n.path === "/",
|
|
501
501
|
children: void 0
|
|
502
502
|
};
|
|
503
|
-
return
|
|
504
|
-
|
|
505
|
-
)),
|
|
506
|
-
}),
|
|
507
|
-
document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(),
|
|
508
|
-
},
|
|
509
|
-
const
|
|
510
|
-
return
|
|
503
|
+
return n.children && n.children.length > 0 && (v.children = w(
|
|
504
|
+
n.children
|
|
505
|
+
)), v;
|
|
506
|
+
}), r = z(!1), $ = () => {
|
|
507
|
+
document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), r.value = !1) : (document.documentElement.requestFullscreen(), r.value = !0);
|
|
508
|
+
}, d = F(() => {
|
|
509
|
+
const C = [];
|
|
510
|
+
return C.push({
|
|
511
511
|
label: "退出登录",
|
|
512
512
|
key: "logout"
|
|
513
|
-
}), p.state.settingPages && p.state.settingPages.length > 0 && p.state.settingPages.forEach((
|
|
514
|
-
|
|
515
|
-
label:
|
|
516
|
-
key:
|
|
513
|
+
}), p.state.settingPages && p.state.settingPages.length > 0 && p.state.settingPages.forEach((n) => {
|
|
514
|
+
C.push({
|
|
515
|
+
label: n.title,
|
|
516
|
+
key: n.route
|
|
517
517
|
});
|
|
518
|
-
}),
|
|
519
|
-
}),
|
|
520
|
-
|
|
521
|
-
},
|
|
518
|
+
}), C;
|
|
519
|
+
}), x = (C) => {
|
|
520
|
+
C === "logout" ? O() : _.push({ name: C });
|
|
521
|
+
}, O = () => {
|
|
522
522
|
o.info({
|
|
523
523
|
title: "提示",
|
|
524
524
|
content: "您确定要退出登录吗",
|
|
@@ -527,80 +527,80 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
527
527
|
onPositiveClick: async () => {
|
|
528
528
|
if (p.state.logout)
|
|
529
529
|
try {
|
|
530
|
-
await p.state.logout(), localStorage.removeItem("TABS-ROUTES"),
|
|
531
|
-
} catch (
|
|
532
|
-
console.error(
|
|
530
|
+
await p.state.logout(), localStorage.removeItem("TABS-ROUTES"), s.error("退出成功");
|
|
531
|
+
} catch (C) {
|
|
532
|
+
console.error(C), s.error("退出登录失败");
|
|
533
533
|
} finally {
|
|
534
534
|
location.reload();
|
|
535
535
|
}
|
|
536
536
|
else
|
|
537
|
-
|
|
537
|
+
s.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
|
|
538
538
|
},
|
|
539
539
|
onNegativeClick: () => {
|
|
540
540
|
}
|
|
541
541
|
});
|
|
542
542
|
};
|
|
543
|
-
return (
|
|
544
|
-
const
|
|
543
|
+
return (C, n) => {
|
|
544
|
+
const v = Ne, S = He, N = ve;
|
|
545
545
|
return g(), U("div", Ut, [
|
|
546
546
|
m("div", Ht, [
|
|
547
547
|
m("div", {
|
|
548
548
|
class: "ml-1 layout-header-trigger layout-header-trigger-min",
|
|
549
|
-
onClick:
|
|
550
|
-
(...
|
|
549
|
+
onClick: n[0] || (n[0] = //@ts-ignore
|
|
550
|
+
(...h) => a(p).collapse && a(p).collapse(...h))
|
|
551
551
|
}, [
|
|
552
|
-
|
|
552
|
+
a(p).state.collapsed ? (g(), L(a(A), {
|
|
553
553
|
key: 0,
|
|
554
554
|
size: "18"
|
|
555
555
|
}, {
|
|
556
|
-
default:
|
|
557
|
-
|
|
556
|
+
default: l(() => [
|
|
557
|
+
c(a(ht))
|
|
558
558
|
]),
|
|
559
559
|
_: 1
|
|
560
|
-
})) : (g(),
|
|
560
|
+
})) : (g(), L(a(A), {
|
|
561
561
|
key: 1,
|
|
562
562
|
size: "18"
|
|
563
563
|
}, {
|
|
564
|
-
default:
|
|
565
|
-
|
|
564
|
+
default: l(() => [
|
|
565
|
+
c(a(_t))
|
|
566
566
|
]),
|
|
567
567
|
_: 1
|
|
568
568
|
}))
|
|
569
569
|
]),
|
|
570
570
|
m("div", {
|
|
571
571
|
class: "mr-1 layout-header-trigger layout-header-trigger-min",
|
|
572
|
-
onClick:
|
|
573
|
-
(...
|
|
572
|
+
onClick: n[1] || (n[1] = //@ts-ignore
|
|
573
|
+
(...h) => a(y) && a(y)(...h))
|
|
574
574
|
}, [
|
|
575
|
-
|
|
576
|
-
default:
|
|
577
|
-
|
|
575
|
+
c(a(A), { size: "18" }, {
|
|
576
|
+
default: l(() => [
|
|
577
|
+
c(a(we))
|
|
578
578
|
]),
|
|
579
579
|
_: 1
|
|
580
580
|
})
|
|
581
581
|
]),
|
|
582
|
-
|
|
583
|
-
default:
|
|
584
|
-
(g(!0), U(Te, null, rt(
|
|
585
|
-
key:
|
|
582
|
+
c(a(Ie), null, {
|
|
583
|
+
default: l(() => [
|
|
584
|
+
(g(!0), U(Te, null, rt(E.value, (h) => (g(), U(Te, {
|
|
585
|
+
key: h.label
|
|
586
586
|
}, [
|
|
587
|
-
|
|
588
|
-
default:
|
|
589
|
-
|
|
587
|
+
h.label ? (g(), L(a(Ue), { key: 0 }, {
|
|
588
|
+
default: l(() => [
|
|
589
|
+
h.children && h.children.length ? (g(), L(a(Q), {
|
|
590
590
|
key: 0,
|
|
591
|
-
options:
|
|
592
|
-
onSelect:
|
|
591
|
+
options: h.children,
|
|
592
|
+
onSelect: i
|
|
593
593
|
}, {
|
|
594
|
-
default:
|
|
594
|
+
default: l(() => [
|
|
595
595
|
m("span", Wt, [
|
|
596
|
-
|
|
597
|
-
m("span", null, q(
|
|
596
|
+
h.icon ? (g(), L(pe(h.icon), { key: 0 })) : M("", !0),
|
|
597
|
+
m("span", null, q(h.label), 1)
|
|
598
598
|
])
|
|
599
599
|
]),
|
|
600
600
|
_: 2
|
|
601
601
|
}, 1032, ["options"])) : (g(), U("span", qt, [
|
|
602
|
-
|
|
603
|
-
m("span", null, q(
|
|
602
|
+
h.icon ? (g(), L(pe(h.icon), { key: 0 })) : M("", !0),
|
|
603
|
+
m("span", null, q(h.label), 1)
|
|
604
604
|
]))
|
|
605
605
|
]),
|
|
606
606
|
_: 2
|
|
@@ -611,41 +611,41 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
611
611
|
})
|
|
612
612
|
]),
|
|
613
613
|
m("div", jt, [
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
a(p).state.enableLanguage ? (g(), U("div", Vt, [
|
|
615
|
+
c(De)
|
|
616
616
|
])) : M("", !0),
|
|
617
617
|
m("div", Ft, [
|
|
618
|
-
|
|
619
|
-
trigger:
|
|
620
|
-
|
|
618
|
+
c(v, { placement: "bottom" }, {
|
|
619
|
+
trigger: l(() => [
|
|
620
|
+
c(a(A), {
|
|
621
621
|
size: "18",
|
|
622
622
|
onClick: me($, ["stop"])
|
|
623
623
|
}, {
|
|
624
|
-
default:
|
|
625
|
-
|
|
624
|
+
default: l(() => [
|
|
625
|
+
r.value ? (g(), L(a(bt), { key: 1 })) : (g(), L(a(vt), { key: 0 }))
|
|
626
626
|
]),
|
|
627
627
|
_: 1
|
|
628
628
|
})
|
|
629
629
|
]),
|
|
630
|
-
default:
|
|
631
|
-
|
|
630
|
+
default: l(() => [
|
|
631
|
+
n[2] || (n[2] = m("span", null, "全屏", -1))
|
|
632
632
|
]),
|
|
633
633
|
_: 1
|
|
634
634
|
})
|
|
635
635
|
]),
|
|
636
636
|
m("div", Kt, [
|
|
637
|
-
|
|
637
|
+
c(a(Q), {
|
|
638
638
|
trigger: "hover",
|
|
639
|
-
onSelect:
|
|
640
|
-
options:
|
|
639
|
+
onSelect: x,
|
|
640
|
+
options: d.value
|
|
641
641
|
}, {
|
|
642
|
-
default:
|
|
642
|
+
default: l(() => [
|
|
643
643
|
m("div", Yt, [
|
|
644
|
-
m("span", null, q(
|
|
645
|
-
|
|
646
|
-
|
|
644
|
+
m("span", null, q(a(p).state.uname), 1),
|
|
645
|
+
c(S, { vertical: "" }),
|
|
646
|
+
c(N, {
|
|
647
647
|
round: "",
|
|
648
|
-
src:
|
|
648
|
+
src: a(p).state.avatar
|
|
649
649
|
}, null, 8, ["src"])
|
|
650
650
|
])
|
|
651
651
|
]),
|
|
@@ -662,14 +662,14 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
662
662
|
loading: { type: Boolean, default: !1 }
|
|
663
663
|
},
|
|
664
664
|
setup(e) {
|
|
665
|
-
return (
|
|
665
|
+
return (s, o) => {
|
|
666
666
|
const p = Ae("RouterView");
|
|
667
667
|
return g(), U("div", Zt, [
|
|
668
|
-
e.loading ? M("", !0) : (g(),
|
|
669
|
-
default:
|
|
670
|
-
(g(),
|
|
671
|
-
(g(),
|
|
672
|
-
key:
|
|
668
|
+
e.loading ? M("", !0) : (g(), L(p, { key: 0 }, {
|
|
669
|
+
default: l(({ Component: _, route: u }) => [
|
|
670
|
+
(g(), L(ct, null, [
|
|
671
|
+
(g(), L(pe(_), {
|
|
672
|
+
key: u.fullPath
|
|
673
673
|
}))
|
|
674
674
|
], 1024))
|
|
675
675
|
]),
|
|
@@ -685,15 +685,15 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
685
685
|
v4f917f8c: o.value,
|
|
686
686
|
v1c2fb72a: p.value
|
|
687
687
|
}));
|
|
688
|
-
const
|
|
689
|
-
activeKey:
|
|
688
|
+
const s = We(), o = F(() => s.value.cardColor), p = F(() => s.value.textColor1), _ = ce(), u = te(), y = le(), i = z(null), E = z(null), w = z(!1), r = re(), $ = F(() => r.state.tabs), d = ye({
|
|
689
|
+
activeKey: u.fullPath,
|
|
690
690
|
scrollable: !0,
|
|
691
691
|
dropdownX: 0,
|
|
692
692
|
dropdownY: 0,
|
|
693
693
|
showDropdown: !1,
|
|
694
694
|
isMultiHeaderFixed: !0,
|
|
695
695
|
multiTabsSetting: !0
|
|
696
|
-
}),
|
|
696
|
+
}), x = ["Login", "Redirect", "ErrorPage"], O = (t) => ({
|
|
697
697
|
meta: t.meta,
|
|
698
698
|
name: t.name,
|
|
699
699
|
fullPath: t.fullPath ?? t.path,
|
|
@@ -701,220 +701,220 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
701
701
|
hash: t.hash ?? "",
|
|
702
702
|
query: t.query ?? {},
|
|
703
703
|
params: t.params ?? {}
|
|
704
|
-
}),
|
|
705
|
-
const b =
|
|
704
|
+
}), C = F(() => {
|
|
705
|
+
const b = r.state.collapsed ? "64px" : "272px";
|
|
706
706
|
return {
|
|
707
707
|
left: b,
|
|
708
708
|
width: `calc(100% - ${b})`
|
|
709
709
|
};
|
|
710
|
-
}),
|
|
710
|
+
}), n = F(() => {
|
|
711
711
|
const t = $.value.length <= 1;
|
|
712
712
|
return [
|
|
713
713
|
{
|
|
714
714
|
label: "刷新当前",
|
|
715
715
|
key: "1",
|
|
716
|
-
icon: () =>
|
|
716
|
+
icon: () => D(A, null, { default: () => D(we) })
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
719
|
label: "关闭当前",
|
|
720
720
|
key: "2",
|
|
721
721
|
disabled: w.value || t,
|
|
722
|
-
icon: () =>
|
|
722
|
+
icon: () => D(A, null, { default: () => D($e) })
|
|
723
723
|
},
|
|
724
724
|
{
|
|
725
725
|
label: "关闭其他",
|
|
726
726
|
key: "3",
|
|
727
727
|
disabled: t,
|
|
728
|
-
icon: () =>
|
|
728
|
+
icon: () => D(A, null, { default: () => D(yt) })
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
label: "关闭全部",
|
|
732
732
|
key: "4",
|
|
733
733
|
disabled: t,
|
|
734
|
-
icon: () =>
|
|
734
|
+
icon: () => D(A, null, { default: () => D(wt) })
|
|
735
735
|
}
|
|
736
736
|
];
|
|
737
|
-
}),
|
|
738
|
-
let t = [
|
|
737
|
+
}), v = () => {
|
|
738
|
+
let t = [O(u)];
|
|
739
739
|
y.getRoutes().filter((f) => f.meta.affix).forEach((f) => {
|
|
740
|
-
const b =
|
|
741
|
-
t.every((
|
|
740
|
+
const b = O(f);
|
|
741
|
+
t.every((B) => B.name !== b.name) && t.push(b);
|
|
742
742
|
});
|
|
743
743
|
try {
|
|
744
|
-
if (
|
|
744
|
+
if (r.state.cacheTabs) {
|
|
745
745
|
const f = localStorage.getItem("TABS_ROUTES");
|
|
746
746
|
t = f ? JSON.parse(f) : t;
|
|
747
747
|
}
|
|
748
748
|
} finally {
|
|
749
749
|
return t;
|
|
750
750
|
}
|
|
751
|
-
},
|
|
751
|
+
}, S = (t) => {
|
|
752
752
|
const f = y.getRoutes();
|
|
753
753
|
t.forEach((b) => {
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
}),
|
|
757
|
-
},
|
|
758
|
-
const t =
|
|
759
|
-
|
|
760
|
-
},
|
|
761
|
-
if (await se(), !
|
|
762
|
-
const f =
|
|
763
|
-
f < b ? (
|
|
764
|
-
|
|
765
|
-
})) :
|
|
766
|
-
},
|
|
754
|
+
const B = f.find((Z) => Z.path === b.path);
|
|
755
|
+
B && (b.meta = B.meta || b.meta, b.name = B.name || b.name);
|
|
756
|
+
}), r.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
|
|
757
|
+
}, N = () => {
|
|
758
|
+
const t = v();
|
|
759
|
+
S(t), r.initTabs(t);
|
|
760
|
+
}, h = async (t) => {
|
|
761
|
+
if (await se(), !i.value) return;
|
|
762
|
+
const f = i.value.offsetWidth, b = i.value.scrollWidth;
|
|
763
|
+
f < b ? (d.scrollable = !0, t && [...i.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((Z) => {
|
|
764
|
+
Z.id === `tag${d.activeKey.split("/").join("/")}` && Z.scrollIntoView && Z.scrollIntoView();
|
|
765
|
+
})) : d.scrollable = !1;
|
|
766
|
+
}, Y = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), ae = () => {
|
|
767
767
|
let t;
|
|
768
|
-
t = Ct(), t.listenTo(
|
|
768
|
+
t = Ct(), t.listenTo(E.value, () => h(!0));
|
|
769
769
|
}, P = (t) => {
|
|
770
|
-
if (!t || t.fullPath ===
|
|
771
|
-
if (
|
|
770
|
+
if (!t || t.fullPath === u.fullPath) return;
|
|
771
|
+
if (d.activeKey = t.fullPath, toString.call(t) === "[object String]") {
|
|
772
772
|
y.replace(t).catch(console.error);
|
|
773
773
|
return;
|
|
774
774
|
}
|
|
775
775
|
const f = t;
|
|
776
776
|
y.replace(f).catch(console.error);
|
|
777
777
|
}, k = (t, f) => {
|
|
778
|
-
t.preventDefault(), w.value = f.path === "/home",
|
|
779
|
-
|
|
778
|
+
t.preventDefault(), w.value = f.path === "/home", d.showDropdown = !1, se().then(() => {
|
|
779
|
+
d.showDropdown = !0, d.dropdownX = t.clientX, d.dropdownY = t.clientY;
|
|
780
780
|
});
|
|
781
|
-
},
|
|
782
|
-
if (
|
|
781
|
+
}, T = () => {
|
|
782
|
+
if (u.meta.keepAlive) {
|
|
783
783
|
var t = y.currentRoute.value.matched.find(
|
|
784
|
-
(f) => f.name ==
|
|
784
|
+
(f) => f.name == u.name
|
|
785
785
|
);
|
|
786
786
|
t && t.components?.default?.name;
|
|
787
787
|
}
|
|
788
|
-
},
|
|
788
|
+
}, R = (t) => {
|
|
789
789
|
if ($.value.length === 1)
|
|
790
|
-
return
|
|
791
|
-
if (
|
|
790
|
+
return _.warning("这已经是最后一页,不能再关闭了!");
|
|
791
|
+
if (T(), r.closeCurrentTab(t), d.activeKey === t.fullPath) {
|
|
792
792
|
const f = $.value[Math.max(0, $.value.length - 1)];
|
|
793
|
-
|
|
793
|
+
d.activeKey = f.fullPath, y.push(f);
|
|
794
794
|
}
|
|
795
|
-
|
|
795
|
+
h();
|
|
796
796
|
}, I = (t) => {
|
|
797
797
|
const f = $.value.find((b) => b.fullPath == t.fullPath);
|
|
798
|
-
f &&
|
|
798
|
+
f && R(f);
|
|
799
799
|
}, j = (t) => {
|
|
800
|
-
|
|
800
|
+
r.closeOtherTabs(t), d.activeKey = t.fullPath, h();
|
|
801
801
|
}, G = () => {
|
|
802
|
-
|
|
803
|
-
},
|
|
802
|
+
r.closeAllTabs(), h();
|
|
803
|
+
}, X = Re("reloadPage"), ne = (t) => {
|
|
804
804
|
switch (t) {
|
|
805
805
|
//刷新
|
|
806
806
|
case "1":
|
|
807
|
-
|
|
807
|
+
X();
|
|
808
808
|
break;
|
|
809
809
|
//关闭
|
|
810
810
|
case "2":
|
|
811
|
-
|
|
811
|
+
R(u);
|
|
812
812
|
break;
|
|
813
813
|
//关闭其他
|
|
814
814
|
case "3":
|
|
815
|
-
j(
|
|
815
|
+
j(u);
|
|
816
816
|
break;
|
|
817
817
|
//关闭所有
|
|
818
818
|
case "4":
|
|
819
819
|
G();
|
|
820
820
|
break;
|
|
821
821
|
}
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
const b =
|
|
825
|
-
if (
|
|
826
|
-
return window.requestAnimationFrame(() =>
|
|
822
|
+
h(), d.showDropdown = !1;
|
|
823
|
+
}, J = (t, f) => {
|
|
824
|
+
const b = i.value.scrollLeft, B = f > 0 && b + f >= t || f < 0 && b + f <= t ? t : b + f;
|
|
825
|
+
if (i.value && i.value.scrollTo(B, 0), B !== t)
|
|
826
|
+
return window.requestAnimationFrame(() => J(t, f));
|
|
827
827
|
}, ie = () => {
|
|
828
|
-
const t =
|
|
828
|
+
const t = i.value.offsetWidth, f = i.value.scrollLeft;
|
|
829
829
|
if (!f) return;
|
|
830
830
|
const b = f > t ? f - t : 0;
|
|
831
|
-
|
|
831
|
+
J(b, (b - f) / 20);
|
|
832
832
|
}, ue = () => {
|
|
833
|
-
const t =
|
|
833
|
+
const t = i.value.offsetWidth, f = i.value.scrollWidth, b = i.value.scrollLeft;
|
|
834
834
|
if (f - b <= t) return;
|
|
835
|
-
const
|
|
836
|
-
|
|
835
|
+
const B = f - b > t * 2 ? b + t : f - t;
|
|
836
|
+
J(B, (B - b) / 20);
|
|
837
837
|
};
|
|
838
838
|
return window.addEventListener("beforeunload", () => {
|
|
839
|
-
|
|
839
|
+
r.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify($.value));
|
|
840
840
|
}), window.addEventListener(
|
|
841
841
|
"scroll",
|
|
842
842
|
(t) => {
|
|
843
843
|
let f = t.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
|
|
844
|
-
|
|
844
|
+
d.isMultiHeaderFixed = f >= 64;
|
|
845
845
|
},
|
|
846
846
|
!0
|
|
847
847
|
), ze(
|
|
848
|
-
() =>
|
|
848
|
+
() => u.fullPath,
|
|
849
849
|
(t) => {
|
|
850
|
-
|
|
850
|
+
x.includes(u.name) || (d.activeKey = t, r.addTab(O(u)), h(!0));
|
|
851
851
|
},
|
|
852
852
|
{ immediate: !0 }
|
|
853
|
-
),
|
|
853
|
+
), N(), ee(() => ae()), (t, f) => (g(), U("div", {
|
|
854
854
|
class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
|
|
855
|
-
style: Be(
|
|
855
|
+
style: Be(C.value)
|
|
856
856
|
}, [
|
|
857
857
|
m("div", Qt, [
|
|
858
858
|
m("div", {
|
|
859
859
|
ref_key: "navWrap",
|
|
860
|
-
ref:
|
|
861
|
-
class: oe(["tabs-card", { "tabs-card-scrollable":
|
|
860
|
+
ref: E,
|
|
861
|
+
class: oe(["tabs-card", { "tabs-card-scrollable": d.scrollable }])
|
|
862
862
|
}, [
|
|
863
863
|
m("span", {
|
|
864
|
-
class: oe(["tabs-card-prev", { "tabs-card-prev-hide": !
|
|
864
|
+
class: oe(["tabs-card-prev", { "tabs-card-prev-hide": !d.scrollable }]),
|
|
865
865
|
onClick: ie
|
|
866
866
|
}, [
|
|
867
|
-
|
|
867
|
+
c(a(A), {
|
|
868
868
|
size: "16",
|
|
869
869
|
color: "#515a6e"
|
|
870
870
|
}, {
|
|
871
|
-
default:
|
|
872
|
-
|
|
871
|
+
default: l(() => [
|
|
872
|
+
c(a(Pt))
|
|
873
873
|
]),
|
|
874
874
|
_: 1
|
|
875
875
|
})
|
|
876
876
|
], 2),
|
|
877
877
|
m("span", {
|
|
878
|
-
class: oe(["tabs-card-next", { "tabs-card-next-hide": !
|
|
878
|
+
class: oe(["tabs-card-next", { "tabs-card-next-hide": !d.scrollable }]),
|
|
879
879
|
onClick: ue
|
|
880
880
|
}, [
|
|
881
|
-
|
|
881
|
+
c(a(A), {
|
|
882
882
|
size: "16",
|
|
883
883
|
color: "#515a6e"
|
|
884
884
|
}, {
|
|
885
|
-
default:
|
|
886
|
-
|
|
885
|
+
default: l(() => [
|
|
886
|
+
c(a(kt))
|
|
887
887
|
]),
|
|
888
888
|
_: 1
|
|
889
889
|
})
|
|
890
890
|
], 2),
|
|
891
891
|
m("div", {
|
|
892
892
|
ref_key: "navScroll",
|
|
893
|
-
ref:
|
|
893
|
+
ref: i,
|
|
894
894
|
class: "tabs-card-scroll"
|
|
895
895
|
}, [
|
|
896
|
-
|
|
896
|
+
c(a(Tt), {
|
|
897
897
|
animation: "300",
|
|
898
898
|
"item-key": "fullPath",
|
|
899
899
|
class: "flex",
|
|
900
900
|
list: $.value,
|
|
901
|
-
move:
|
|
901
|
+
move: Y
|
|
902
902
|
}, {
|
|
903
|
-
item:
|
|
903
|
+
item: l(({ element: b }) => [
|
|
904
904
|
m("div", {
|
|
905
|
-
class: oe(["tabs-card-scroll-item", { "active-item":
|
|
905
|
+
class: oe(["tabs-card-scroll-item", { "active-item": d.activeKey === b.fullPath }]),
|
|
906
906
|
id: `tag${b.fullPath.split("/").join("/")}`,
|
|
907
|
-
onClick: me((
|
|
908
|
-
onContextmenu: (
|
|
907
|
+
onClick: me((B) => P(b), ["stop"]),
|
|
908
|
+
onContextmenu: (B) => k(B, b)
|
|
909
909
|
}, [
|
|
910
910
|
m("span", null, q(b.meta.title), 1),
|
|
911
|
-
b.meta.affix ? M("", !0) : (g(),
|
|
911
|
+
b.meta.affix ? M("", !0) : (g(), L(a(A), {
|
|
912
912
|
key: 0,
|
|
913
913
|
size: "14",
|
|
914
|
-
onClick: me((
|
|
914
|
+
onClick: me((B) => I(b), ["stop"])
|
|
915
915
|
}, {
|
|
916
|
-
default:
|
|
917
|
-
|
|
916
|
+
default: l(() => [
|
|
917
|
+
c(a($e))
|
|
918
918
|
]),
|
|
919
919
|
_: 1
|
|
920
920
|
}, 8, ["onClick"]))
|
|
@@ -925,20 +925,20 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
925
925
|
], 512)
|
|
926
926
|
], 2),
|
|
927
927
|
m("div", ta, [
|
|
928
|
-
|
|
928
|
+
c(a(Q), {
|
|
929
929
|
trigger: "hover",
|
|
930
930
|
placement: "bottom-end",
|
|
931
|
-
options:
|
|
931
|
+
options: n.value,
|
|
932
932
|
onSelect: ne
|
|
933
933
|
}, {
|
|
934
|
-
default:
|
|
934
|
+
default: l(() => [
|
|
935
935
|
m("div", aa, [
|
|
936
|
-
|
|
936
|
+
c(a(A), {
|
|
937
937
|
size: "16",
|
|
938
938
|
color: "#515a6e"
|
|
939
939
|
}, {
|
|
940
|
-
default:
|
|
941
|
-
|
|
940
|
+
default: l(() => [
|
|
941
|
+
c(a(xt))
|
|
942
942
|
]),
|
|
943
943
|
_: 1
|
|
944
944
|
})
|
|
@@ -947,13 +947,13 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
947
947
|
_: 1
|
|
948
948
|
}, 8, ["options"])
|
|
949
949
|
]),
|
|
950
|
-
|
|
950
|
+
c(a(Q), {
|
|
951
951
|
placement: "bottom-start",
|
|
952
|
-
show:
|
|
953
|
-
x:
|
|
954
|
-
y:
|
|
955
|
-
options:
|
|
956
|
-
onClickoutside: f[0] || (f[0] = (b) =>
|
|
952
|
+
show: d.showDropdown,
|
|
953
|
+
x: d.dropdownX,
|
|
954
|
+
y: d.dropdownY,
|
|
955
|
+
options: n.value,
|
|
956
|
+
onClickoutside: f[0] || (f[0] = (b) => d.showDropdown = !1),
|
|
957
957
|
onSelect: ne
|
|
958
958
|
}, null, 8, ["show", "x", "y", "options"])
|
|
959
959
|
])
|
|
@@ -962,58 +962,60 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
962
962
|
}), oa = /* @__PURE__ */ V(na, [["__scopeId", "data-v-50f5202c"]]), sa = /* @__PURE__ */ H({
|
|
963
963
|
__name: "PMenus",
|
|
964
964
|
setup(e) {
|
|
965
|
-
const
|
|
966
|
-
o.matched && o.matched.length ? o.matched.map((
|
|
967
|
-
),
|
|
968
|
-
o.name !==
|
|
969
|
-
},
|
|
970
|
-
if (!
|
|
971
|
-
const
|
|
972
|
-
y.value =
|
|
965
|
+
const s = z([]), o = te(), p = le(), _ = re(), u = z(o.name), y = z(
|
|
966
|
+
o.matched && o.matched.length ? o.matched.map((x) => x.name) : []
|
|
967
|
+
), i = (x) => {
|
|
968
|
+
o.name !== x && (/http(s)?:/.test(x) ? window.open(x) : p.push({ name: x }));
|
|
969
|
+
}, E = (x) => {
|
|
970
|
+
if (!x) return;
|
|
971
|
+
const O = x.find((C) => y.value.indexOf(C) === -1);
|
|
972
|
+
y.value = O ? [O] : [];
|
|
973
973
|
}, w = () => {
|
|
974
|
-
const
|
|
975
|
-
y.value =
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
];
|
|
986
|
-
if (!
|
|
987
|
-
return
|
|
988
|
-
|
|
989
|
-
let
|
|
990
|
-
return
|
|
974
|
+
const x = o.matched;
|
|
975
|
+
y.value = x.map((C) => C.name);
|
|
976
|
+
const O = o.meta?.activeMenu || "";
|
|
977
|
+
u.value = O || o.name;
|
|
978
|
+
}, r = [
|
|
979
|
+
"/:path(.*)*",
|
|
980
|
+
"/redirect",
|
|
981
|
+
"/redirect/:path(.*)",
|
|
982
|
+
"/login",
|
|
983
|
+
"/oidc-callback"
|
|
984
|
+
], $ = (x, O = [], C = !1) => {
|
|
985
|
+
const n = [];
|
|
986
|
+
if (!x || x.length === 0)
|
|
987
|
+
return n;
|
|
988
|
+
x = x.sort((v, S) => {
|
|
989
|
+
let N = (S.children?.length ? 1 : 0) - (v.children?.length ? 1 : 0);
|
|
990
|
+
return N === 0 && (N = Number(v.meta?.sort ?? 0) - Number(S.meta?.sort ?? 0)), N;
|
|
991
991
|
});
|
|
992
|
-
for (const
|
|
993
|
-
if (
|
|
994
|
-
|
|
992
|
+
for (const v of x) {
|
|
993
|
+
if (C || v.meta?.hidden || r.includes(v.path.toLowerCase())) {
|
|
994
|
+
O.push(v.name), $(v.children || [], O, !0);
|
|
995
995
|
continue;
|
|
996
996
|
}
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
permissions: v.meta?.permissions,
|
|
1008
|
-
meta: v.meta,
|
|
997
|
+
const S = v.children?.filter((ae) => !ae.meta?.hidden) || [], N = S.length === 1, h = N ? S[0] : v, Y = {
|
|
998
|
+
key: h.name,
|
|
999
|
+
label: h.meta?.title,
|
|
1000
|
+
affix: h.meta?.affix,
|
|
1001
|
+
sort: Number(N ? v.meta?.sort ?? 0 : h.meta?.sort ?? 0),
|
|
1002
|
+
path: h.path,
|
|
1003
|
+
redirect: h.redirect,
|
|
1004
|
+
icon: N ? v.meta?.icon : h.meta?.icon,
|
|
1005
|
+
permission: h.meta?.permission,
|
|
1006
|
+
meta: h.meta,
|
|
1009
1007
|
children: void 0
|
|
1010
1008
|
};
|
|
1011
|
-
|
|
1009
|
+
if (h.children && h.children.length > 0 && (Y.children = $(h.children, O, C), !N && (!Y.children || Y.children.length === 0))) {
|
|
1010
|
+
O.push(h.name);
|
|
1011
|
+
continue;
|
|
1012
|
+
}
|
|
1013
|
+
O.includes(h.name) || (n.push(Y), O.push(h.name));
|
|
1012
1014
|
}
|
|
1013
|
-
return
|
|
1014
|
-
},
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1015
|
+
return n;
|
|
1016
|
+
}, d = () => {
|
|
1017
|
+
const x = p.getRoutes();
|
|
1018
|
+
s.value = $(x);
|
|
1017
1019
|
};
|
|
1018
1020
|
return ze(
|
|
1019
1021
|
() => o.fullPath,
|
|
@@ -1021,37 +1023,37 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1021
1023
|
w();
|
|
1022
1024
|
}
|
|
1023
1025
|
), ee(() => {
|
|
1024
|
-
|
|
1025
|
-
}), (
|
|
1026
|
+
d(), w();
|
|
1027
|
+
}), (x, O) => (g(), L(a(qe), {
|
|
1026
1028
|
class: "h-full",
|
|
1027
1029
|
inverted: "",
|
|
1028
1030
|
mode: "vertical",
|
|
1029
|
-
options:
|
|
1030
|
-
collapsed:
|
|
1031
|
+
options: s.value,
|
|
1032
|
+
collapsed: a(_).state.collapsed,
|
|
1031
1033
|
"collapsed-width": 64,
|
|
1032
1034
|
"collapsed-icon-size": 20,
|
|
1033
1035
|
indent: 24,
|
|
1034
1036
|
"expanded-keys": y.value,
|
|
1035
|
-
value:
|
|
1036
|
-
"onUpdate:value":
|
|
1037
|
-
"onUpdate:expandedKeys":
|
|
1037
|
+
value: u.value,
|
|
1038
|
+
"onUpdate:value": i,
|
|
1039
|
+
"onUpdate:expandedKeys": E
|
|
1038
1040
|
}, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
|
|
1039
1041
|
}
|
|
1040
1042
|
}), la = { class: "layout-content-main layout-content-main-fix" }, ra = { class: "main-view main-view-fix" }, ca = /* @__PURE__ */ H({
|
|
1041
1043
|
__name: "PLayout",
|
|
1042
1044
|
setup(e) {
|
|
1043
|
-
const
|
|
1045
|
+
const s = re(), o = z(!1);
|
|
1044
1046
|
return ut("reloadPage", () => {
|
|
1045
1047
|
o.value = !0, se(() => o.value = !1);
|
|
1046
|
-
}), (
|
|
1048
|
+
}), (_, u) => {
|
|
1047
1049
|
const y = Ye;
|
|
1048
|
-
return g(),
|
|
1050
|
+
return g(), L(a(Le), {
|
|
1049
1051
|
"has-sider": "",
|
|
1050
1052
|
class: "layout",
|
|
1051
1053
|
position: "absolute"
|
|
1052
1054
|
}, {
|
|
1053
|
-
default:
|
|
1054
|
-
|
|
1055
|
+
default: l(() => [
|
|
1056
|
+
c(a(je), {
|
|
1055
1057
|
class: "layout-sider",
|
|
1056
1058
|
inverted: "",
|
|
1057
1059
|
"show-trigger": "bar",
|
|
@@ -1059,43 +1061,43 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1059
1061
|
"collapse-mode": "width",
|
|
1060
1062
|
"trigger-class": "!-right-5",
|
|
1061
1063
|
"collapsed-trigger-class": "!-right-5",
|
|
1062
|
-
collapsed:
|
|
1064
|
+
collapsed: a(s).state.collapsed,
|
|
1063
1065
|
"native-scrollbar": !1,
|
|
1064
1066
|
"collapsed-width": 64,
|
|
1065
|
-
onCollapse:
|
|
1066
|
-
onExpand:
|
|
1067
|
+
onCollapse: a(s).collapse,
|
|
1068
|
+
onExpand: a(s).collapse
|
|
1067
1069
|
}, {
|
|
1068
|
-
default:
|
|
1069
|
-
|
|
1070
|
-
default:
|
|
1071
|
-
|
|
1072
|
-
|
|
1070
|
+
default: l(() => [
|
|
1071
|
+
c(a(Ve), { vertical: "" }, {
|
|
1072
|
+
default: l(() => [
|
|
1073
|
+
c(Bt),
|
|
1074
|
+
c(sa)
|
|
1073
1075
|
]),
|
|
1074
1076
|
_: 1
|
|
1075
1077
|
})
|
|
1076
1078
|
]),
|
|
1077
1079
|
_: 1
|
|
1078
1080
|
}, 8, ["collapsed", "onCollapse", "onExpand"]),
|
|
1079
|
-
|
|
1080
|
-
default:
|
|
1081
|
-
|
|
1082
|
-
default:
|
|
1083
|
-
|
|
1081
|
+
c(a(Le), null, {
|
|
1082
|
+
default: l(() => [
|
|
1083
|
+
c(a(Fe), { position: "absolute" }, {
|
|
1084
|
+
default: l(() => [
|
|
1085
|
+
c(Jt)
|
|
1084
1086
|
]),
|
|
1085
1087
|
_: 1
|
|
1086
1088
|
}),
|
|
1087
|
-
|
|
1088
|
-
default:
|
|
1089
|
+
c(a(Ke), { class: "layout-content layout-default-background" }, {
|
|
1090
|
+
default: l(() => [
|
|
1089
1091
|
m("div", la, [
|
|
1090
|
-
|
|
1092
|
+
c(oa),
|
|
1091
1093
|
m("div", ra, [
|
|
1092
|
-
|
|
1094
|
+
c(Gt, { loading: o.value }, null, 8, ["loading"])
|
|
1093
1095
|
])
|
|
1094
1096
|
])
|
|
1095
1097
|
]),
|
|
1096
1098
|
_: 1
|
|
1097
1099
|
}),
|
|
1098
|
-
|
|
1100
|
+
c(y, {
|
|
1099
1101
|
right: 20,
|
|
1100
1102
|
class: "z-50"
|
|
1101
1103
|
})
|
|
@@ -1108,9 +1110,9 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1108
1110
|
};
|
|
1109
1111
|
}
|
|
1110
1112
|
}), ia = /* @__PURE__ */ V(ca, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
|
|
1111
|
-
function da(e,
|
|
1113
|
+
function da(e, s) {
|
|
1112
1114
|
const o = Ae("router-view");
|
|
1113
|
-
return g(),
|
|
1115
|
+
return g(), L(o);
|
|
1114
1116
|
}
|
|
1115
1117
|
const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma = /* @__PURE__ */ H({
|
|
1116
1118
|
__name: "PApplication",
|
|
@@ -1129,22 +1131,22 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1129
1131
|
} }
|
|
1130
1132
|
},
|
|
1131
1133
|
setup(e) {
|
|
1132
|
-
return (
|
|
1134
|
+
return (s, o) => {
|
|
1133
1135
|
const p = Xe;
|
|
1134
|
-
return g(),
|
|
1135
|
-
locale:
|
|
1136
|
+
return g(), L(p, {
|
|
1137
|
+
locale: a(Ze),
|
|
1136
1138
|
theme: e.theme,
|
|
1137
1139
|
"theme-overrides": e.themeOverrides,
|
|
1138
|
-
"date-locale":
|
|
1140
|
+
"date-locale": a(Je)
|
|
1139
1141
|
}, {
|
|
1140
|
-
default:
|
|
1141
|
-
|
|
1142
|
-
default:
|
|
1143
|
-
|
|
1144
|
-
default:
|
|
1145
|
-
|
|
1146
|
-
default:
|
|
1147
|
-
K(
|
|
1142
|
+
default: l(() => [
|
|
1143
|
+
c(a(Ge), null, {
|
|
1144
|
+
default: l(() => [
|
|
1145
|
+
c(a(Qe), null, {
|
|
1146
|
+
default: l(() => [
|
|
1147
|
+
c(a(et), null, {
|
|
1148
|
+
default: l(() => [
|
|
1149
|
+
K(s.$slots, "default")
|
|
1148
1150
|
]),
|
|
1149
1151
|
_: 3
|
|
1150
1152
|
})
|
|
@@ -1177,93 +1179,93 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1177
1179
|
onUpdateVisible: {}
|
|
1178
1180
|
},
|
|
1179
1181
|
emits: ["update:visible", "update:loading"],
|
|
1180
|
-
setup(e, { expose:
|
|
1181
|
-
const p = ce(),
|
|
1182
|
+
setup(e, { expose: s, emit: o }) {
|
|
1183
|
+
const p = ce(), _ = z(!1), u = z(!1), y = o, i = e, E = async () => {
|
|
1182
1184
|
try {
|
|
1183
|
-
|
|
1184
|
-
} catch (
|
|
1185
|
-
|
|
1185
|
+
_.value = !0, i.onSave && await i.onSave() && w();
|
|
1186
|
+
} catch (d) {
|
|
1187
|
+
d instanceof Error && window.$message.error(d.message), console.error(d);
|
|
1186
1188
|
} finally {
|
|
1187
|
-
|
|
1189
|
+
_.value = !1;
|
|
1188
1190
|
}
|
|
1189
1191
|
}, w = () => {
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
+
_.value = !1, u.value = !1, y("update:visible", !1);
|
|
1193
|
+
}, r = async () => {
|
|
1192
1194
|
try {
|
|
1193
|
-
|
|
1194
|
-
} catch (
|
|
1195
|
-
p.error(
|
|
1195
|
+
u.value = !0, i.onClose ? await i.onClose() && w() : w();
|
|
1196
|
+
} catch (d) {
|
|
1197
|
+
p.error(d.message);
|
|
1196
1198
|
} finally {
|
|
1197
|
-
|
|
1199
|
+
u.value = !1;
|
|
1198
1200
|
}
|
|
1199
1201
|
};
|
|
1200
|
-
return
|
|
1202
|
+
return s({
|
|
1201
1203
|
open: () => {
|
|
1202
|
-
|
|
1204
|
+
_.value = !1, u.value = !1, y("update:visible", !0);
|
|
1203
1205
|
},
|
|
1204
1206
|
close: w
|
|
1205
|
-
}), (
|
|
1206
|
-
const
|
|
1207
|
-
return g(),
|
|
1207
|
+
}), (d, x) => {
|
|
1208
|
+
const O = at, C = _e, n = he;
|
|
1209
|
+
return g(), L(a(tt), dt({
|
|
1208
1210
|
ref: "$modal",
|
|
1209
1211
|
preset: "card"
|
|
1210
|
-
},
|
|
1212
|
+
}, d.$attrs, {
|
|
1211
1213
|
"header-class": "bg-gray-50",
|
|
1212
|
-
show:
|
|
1214
|
+
show: i.visible,
|
|
1213
1215
|
draggable: !0,
|
|
1214
1216
|
closable: !1,
|
|
1215
1217
|
"close-on-esc": !1,
|
|
1216
1218
|
"mask-closable": !1,
|
|
1217
1219
|
bordered: !1,
|
|
1218
|
-
style: { width: `${
|
|
1220
|
+
style: { width: `${i.width}px` },
|
|
1219
1221
|
onClose: w,
|
|
1220
|
-
onAfterEnter:
|
|
1221
|
-
onAfterLeave:
|
|
1222
|
-
onUpdateVisible:
|
|
1222
|
+
onAfterEnter: i.onAfterEnter,
|
|
1223
|
+
onAfterLeave: i.onAfterLeave,
|
|
1224
|
+
onUpdateVisible: i.onUpdateVisible
|
|
1223
1225
|
}), {
|
|
1224
|
-
header:
|
|
1225
|
-
|
|
1226
|
-
default:
|
|
1226
|
+
header: l(() => [
|
|
1227
|
+
d.$slots.header ? K(d.$slots, "header", { key: 0 }) : i.title ? (g(), L(O, { key: 1 }, {
|
|
1228
|
+
default: l(() => [
|
|
1227
1229
|
ge(q(e.title), 1)
|
|
1228
1230
|
]),
|
|
1229
1231
|
_: 1
|
|
1230
1232
|
})) : M("", !0)
|
|
1231
1233
|
]),
|
|
1232
|
-
"header-extra":
|
|
1233
|
-
K(
|
|
1234
|
+
"header-extra": l(() => [
|
|
1235
|
+
K(d.$slots, "header-extra")
|
|
1234
1236
|
]),
|
|
1235
|
-
default:
|
|
1237
|
+
default: l(() => [
|
|
1236
1238
|
m("div", {
|
|
1237
1239
|
class: "overflow-y-auto overflow-hidden mt-5",
|
|
1238
|
-
style: Be({ maxHeight: `${
|
|
1240
|
+
style: Be({ maxHeight: `${i.height}px` })
|
|
1239
1241
|
}, [
|
|
1240
|
-
K(
|
|
1242
|
+
K(d.$slots, "default")
|
|
1241
1243
|
], 4)
|
|
1242
1244
|
]),
|
|
1243
|
-
footer:
|
|
1244
|
-
K(
|
|
1245
|
+
footer: l(() => [
|
|
1246
|
+
K(d.$slots, "footer")
|
|
1245
1247
|
]),
|
|
1246
|
-
action:
|
|
1247
|
-
|
|
1248
|
-
default:
|
|
1249
|
-
|
|
1248
|
+
action: l(() => [
|
|
1249
|
+
c(n, { justify: "end" }, {
|
|
1250
|
+
default: l(() => [
|
|
1251
|
+
i.hideSaveBtn ? M("", !0) : (g(), L(C, {
|
|
1250
1252
|
key: 0,
|
|
1251
1253
|
type: "primary",
|
|
1252
|
-
loading:
|
|
1253
|
-
onClick:
|
|
1254
|
+
loading: _.value,
|
|
1255
|
+
onClick: E
|
|
1254
1256
|
}, {
|
|
1255
|
-
default:
|
|
1257
|
+
default: l(() => [
|
|
1256
1258
|
ge(q(e.saveBtnText), 1)
|
|
1257
1259
|
]),
|
|
1258
1260
|
_: 1
|
|
1259
1261
|
}, 8, ["loading"])),
|
|
1260
|
-
K(
|
|
1261
|
-
|
|
1262
|
+
K(d.$slots, "action-extra"),
|
|
1263
|
+
i.hideCancelBtn ? M("", !0) : (g(), L(C, {
|
|
1262
1264
|
key: 1,
|
|
1263
|
-
loading:
|
|
1264
|
-
onClick:
|
|
1265
|
+
loading: u.value,
|
|
1266
|
+
onClick: r
|
|
1265
1267
|
}, {
|
|
1266
|
-
default:
|
|
1268
|
+
default: l(() => [
|
|
1267
1269
|
ge(q(e.cancelBtnText), 1)
|
|
1268
1270
|
]),
|
|
1269
1271
|
_: 1
|
|
@@ -1279,11 +1281,11 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1279
1281
|
}), va = W(_a), ba = W(De), ya = H({
|
|
1280
1282
|
name: "Redirect",
|
|
1281
1283
|
setup() {
|
|
1282
|
-
const e = te(),
|
|
1284
|
+
const e = te(), s = le();
|
|
1283
1285
|
return ft(() => {
|
|
1284
|
-
const { params: o, query: p } = e, { path:
|
|
1285
|
-
|
|
1286
|
-
path: "/" + (Array.isArray(
|
|
1286
|
+
const { params: o, query: p } = e, { path: _ } = o;
|
|
1287
|
+
s.replace({
|
|
1288
|
+
path: "/" + (Array.isArray(_) ? _.join("/") : _),
|
|
1287
1289
|
query: p
|
|
1288
1290
|
});
|
|
1289
1291
|
}), () => /* @__PURE__ */ React.createElement(nt, null);
|
|
@@ -1291,32 +1293,32 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1291
1293
|
}), wa = W(ya), Pa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ H({
|
|
1292
1294
|
__name: "PIframe",
|
|
1293
1295
|
setup(e) {
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1296
|
-
function
|
|
1296
|
+
const s = te(), o = z(!1), p = z(null), _ = z("");
|
|
1297
|
+
a(s.meta)?.frameSrc && (_.value = a(s.meta)?.frameSrc);
|
|
1298
|
+
function u() {
|
|
1297
1299
|
o.value = !1;
|
|
1298
1300
|
}
|
|
1299
1301
|
function y() {
|
|
1300
1302
|
se(() => {
|
|
1301
|
-
const
|
|
1302
|
-
if (!
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
}) :
|
|
1307
|
-
|
|
1303
|
+
const i = a(p);
|
|
1304
|
+
if (!i) return;
|
|
1305
|
+
const E = i;
|
|
1306
|
+
E.attachEvent ? E.attachEvent("onload", () => {
|
|
1307
|
+
u();
|
|
1308
|
+
}) : i.onload = () => {
|
|
1309
|
+
u();
|
|
1308
1310
|
};
|
|
1309
1311
|
});
|
|
1310
1312
|
}
|
|
1311
1313
|
return ee(() => {
|
|
1312
1314
|
o.value = !0, y();
|
|
1313
|
-
}), (
|
|
1315
|
+
}), (i, E) => {
|
|
1314
1316
|
const w = ot;
|
|
1315
|
-
return g(),
|
|
1316
|
-
default:
|
|
1317
|
+
return g(), L(w, { show: o.value }, {
|
|
1318
|
+
default: l(() => [
|
|
1317
1319
|
m("div", Pa, [
|
|
1318
1320
|
m("iframe", {
|
|
1319
|
-
src:
|
|
1321
|
+
src: _.value,
|
|
1320
1322
|
class: "frame-iframe",
|
|
1321
1323
|
ref_key: "frameRef",
|
|
1322
1324
|
ref: p
|
|
@@ -1335,44 +1337,44 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1335
1337
|
subtitle: { type: String, required: !1 }
|
|
1336
1338
|
},
|
|
1337
1339
|
setup(e) {
|
|
1338
|
-
const
|
|
1340
|
+
const s = e;
|
|
1339
1341
|
return (o, p) => {
|
|
1340
|
-
const
|
|
1342
|
+
const _ = A, u = ve, y = he, i = Oe;
|
|
1341
1343
|
return g(), U("div", Ta, [
|
|
1342
|
-
|
|
1344
|
+
s.title ? (g(), L(i, {
|
|
1343
1345
|
key: 0,
|
|
1344
1346
|
class: "mb-4",
|
|
1345
1347
|
bordered: !1,
|
|
1346
1348
|
"content-class": "py-4"
|
|
1347
1349
|
}, {
|
|
1348
|
-
default:
|
|
1349
|
-
|
|
1350
|
+
default: l(() => [
|
|
1351
|
+
c(y, {
|
|
1350
1352
|
align: "center",
|
|
1351
1353
|
justify: "space-between"
|
|
1352
1354
|
}, {
|
|
1353
|
-
default:
|
|
1354
|
-
|
|
1355
|
+
default: l(() => [
|
|
1356
|
+
c(y, {
|
|
1355
1357
|
align: "center",
|
|
1356
1358
|
size: 16
|
|
1357
1359
|
}, {
|
|
1358
|
-
default:
|
|
1359
|
-
|
|
1360
|
+
default: l(() => [
|
|
1361
|
+
s.icon ? (g(), L(u, {
|
|
1360
1362
|
key: 0,
|
|
1361
1363
|
size: 48,
|
|
1362
1364
|
class: "bg-linear-to-br from-blue-500 to-indigo-600"
|
|
1363
1365
|
}, {
|
|
1364
|
-
default:
|
|
1365
|
-
|
|
1366
|
+
default: l(() => [
|
|
1367
|
+
c(_, {
|
|
1366
1368
|
size: 24,
|
|
1367
|
-
component:
|
|
1369
|
+
component: s.icon,
|
|
1368
1370
|
color: "#fff"
|
|
1369
1371
|
}, null, 8, ["component"])
|
|
1370
1372
|
]),
|
|
1371
1373
|
_: 1
|
|
1372
1374
|
})) : M("", !0),
|
|
1373
1375
|
m("div", null, [
|
|
1374
|
-
m("div", Sa, q(
|
|
1375
|
-
m("div", $a, q(
|
|
1376
|
+
m("div", Sa, q(s.title), 1),
|
|
1377
|
+
m("div", $a, q(s.subtitle ?? s.title + "主页"), 1)
|
|
1376
1378
|
])
|
|
1377
1379
|
]),
|
|
1378
1380
|
_: 1
|
|
@@ -1383,23 +1385,23 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1383
1385
|
]),
|
|
1384
1386
|
_: 1
|
|
1385
1387
|
})) : M("", !0),
|
|
1386
|
-
o.$slots.search ? (g(),
|
|
1388
|
+
o.$slots.search ? (g(), L(i, {
|
|
1387
1389
|
key: 1,
|
|
1388
1390
|
class: "mb-4",
|
|
1389
1391
|
"content-class": "flex flex-row gap-2",
|
|
1390
1392
|
bordered: !1
|
|
1391
1393
|
}, {
|
|
1392
|
-
default:
|
|
1394
|
+
default: l(() => [
|
|
1393
1395
|
K(o.$slots, "search")
|
|
1394
1396
|
]),
|
|
1395
1397
|
_: 3
|
|
1396
1398
|
})) : M("", !0),
|
|
1397
|
-
o.$slots.default ? (g(),
|
|
1399
|
+
o.$slots.default ? (g(), L(i, {
|
|
1398
1400
|
key: 2,
|
|
1399
1401
|
"content-class": "flex flex-row gap-2 p-0!",
|
|
1400
1402
|
bordered: !1
|
|
1401
1403
|
}, {
|
|
1402
|
-
default:
|
|
1404
|
+
default: l(() => [
|
|
1403
1405
|
K(o.$slots, "default")
|
|
1404
1406
|
]),
|
|
1405
1407
|
_: 3
|
|
@@ -1408,10 +1410,10 @@ const fa = /* @__PURE__ */ V(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1408
1410
|
};
|
|
1409
1411
|
}
|
|
1410
1412
|
}), Oa = W(Ea), Na = {}, Ra = { class: "flex flex-col justify-center page-container" };
|
|
1411
|
-
function Aa(e,
|
|
1413
|
+
function Aa(e, s) {
|
|
1412
1414
|
const o = be;
|
|
1413
1415
|
return g(), U("div", Ra, [
|
|
1414
|
-
|
|
1416
|
+
c(o, {
|
|
1415
1417
|
status: "500",
|
|
1416
1418
|
title: "服务器错误",
|
|
1417
1419
|
description: "抱歉,服务器出错了"
|
|
@@ -1419,10 +1421,10 @@ function Aa(e, l) {
|
|
|
1419
1421
|
]);
|
|
1420
1422
|
}
|
|
1421
1423
|
const za = /* @__PURE__ */ V(Na, [["render", Aa], ["__scopeId", "data-v-89cb65c7"]]), Ba = {}, Da = { class: "flex flex-col justify-center page-container" };
|
|
1422
|
-
function Ma(e,
|
|
1424
|
+
function Ma(e, s) {
|
|
1423
1425
|
const o = be;
|
|
1424
1426
|
return g(), U("div", Da, [
|
|
1425
|
-
|
|
1427
|
+
c(o, {
|
|
1426
1428
|
status: "404",
|
|
1427
1429
|
title: "资源不存在",
|
|
1428
1430
|
description: "抱歉,你访问的页面不存在"
|
|
@@ -1430,10 +1432,10 @@ function Ma(e, l) {
|
|
|
1430
1432
|
]);
|
|
1431
1433
|
}
|
|
1432
1434
|
const Ia = /* @__PURE__ */ V(Ba, [["render", Ma], ["__scopeId", "data-v-99232671"]]), Ua = {}, Ha = { class: "flex flex-col justify-center page-container" };
|
|
1433
|
-
function Wa(e,
|
|
1435
|
+
function Wa(e, s) {
|
|
1434
1436
|
const o = be;
|
|
1435
1437
|
return g(), U("div", Ha, [
|
|
1436
|
-
|
|
1438
|
+
c(o, {
|
|
1437
1439
|
status: "403",
|
|
1438
1440
|
title: "禁止访问",
|
|
1439
1441
|
description: "抱歉,你无权访问该页面"
|
|
@@ -1443,22 +1445,22 @@ function Wa(e, l) {
|
|
|
1443
1445
|
const qa = /* @__PURE__ */ V(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16"]]), ja = W(za), Va = W(Ia), Fa = W(qa), Ka = Pe("app-oidc", () => {
|
|
1444
1446
|
const e = ye({});
|
|
1445
1447
|
return {
|
|
1446
|
-
setCallback: (
|
|
1447
|
-
callCallback: async (
|
|
1448
|
-
setError: (
|
|
1449
|
-
callError: async (
|
|
1448
|
+
setCallback: (u) => e.callback = u,
|
|
1449
|
+
callCallback: async (u) => await e.callback?.(u),
|
|
1450
|
+
setError: (u) => e.error = u,
|
|
1451
|
+
callError: async (u, y) => await e.error?.(u, y)
|
|
1450
1452
|
};
|
|
1451
1453
|
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ H({
|
|
1452
1454
|
__name: "POidc",
|
|
1453
1455
|
setup(e) {
|
|
1454
|
-
const
|
|
1456
|
+
const s = le(), { callCallback: o, callError: p } = Ka();
|
|
1455
1457
|
return ee(async () => {
|
|
1456
1458
|
try {
|
|
1457
|
-
await o(
|
|
1458
|
-
} catch (
|
|
1459
|
-
await p(
|
|
1459
|
+
await o(s);
|
|
1460
|
+
} catch (_) {
|
|
1461
|
+
await p(s, _);
|
|
1460
1462
|
}
|
|
1461
|
-
}), (
|
|
1463
|
+
}), (_, u) => (g(), U("div", Ya, [...u[0] || (u[0] = [
|
|
1462
1464
|
m("div", { class: "view-auth-callback-content" }, [
|
|
1463
1465
|
m("div", { class: "view-auth-callback-spinner" }, [
|
|
1464
1466
|
m("span", null, "正在处理登录回调...")
|
|
@@ -1481,9 +1483,9 @@ const qa = /* @__PURE__ */ V(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16
|
|
|
1481
1483
|
PPage: Oa,
|
|
1482
1484
|
PRedirect: wa,
|
|
1483
1485
|
PTable: Nt
|
|
1484
|
-
}, Symbol.toStringTag, { value: "Module" })), Qa = (e,
|
|
1486
|
+
}, Symbol.toStringTag, { value: "Module" })), Qa = (e, s) => (Object.values(Ga).forEach((o) => {
|
|
1485
1487
|
o.install && e.use(o);
|
|
1486
|
-
}),
|
|
1488
|
+
}), s?.(), e), rn = {
|
|
1487
1489
|
install: Qa
|
|
1488
1490
|
};
|
|
1489
1491
|
export {
|