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