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