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