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