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