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