@chewel611/naive-ui-plus 0.0.33 → 0.0.35
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 +311 -317
- package/dist/index.umd.cjs +1 -1
- package/es/layout/sider/PMenus.vue.js +48 -54
- package/es/table/PTable.vue.js +1 -1
- package/lib/layout/sider/PMenus.vue.cjs +1 -1
- package/lib/table/PTable.vue.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useDialog as Oe, useMessage as ue, NCard as Ee, NDataTable as Me, NSpace as _e, NTooltip as Re, NIcon as N, NDropdown as G, NButton as ve, NAvatar as be, NBreadcrumb as Ie, NBreadcrumbItem as He, NDivider as We, useThemeVars as Ue, NMenu as je, NLayout as Le, NLayoutSider as qe, NFlex as Fe, NLayoutHeader as
|
|
2
|
-
import { defineComponent as W, ref as
|
|
1
|
+
import { useDialog as Oe, useMessage as ue, NCard as Ee, NDataTable as Me, NSpace as _e, NTooltip as Re, NIcon as N, NDropdown as G, NButton as ve, NAvatar as be, NBreadcrumb as Ie, NBreadcrumbItem as He, NDivider as We, useThemeVars as Ue, NMenu as je, NLayout as Le, NLayoutSider as qe, NFlex as Fe, NLayoutHeader as Ke, NLayoutContent as Ve, 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 ye } from "naive-ui";
|
|
2
|
+
import { defineComponent as W, ref as B, computed as V, unref as a, onMounted as Q, openBlock as g, createBlock as L, withCtx as o, createElementVNode as v, createElementBlock as H, renderSlot as Y, createCommentVNode as A, createVNode as c, toDisplayString as j, h as z, toRaw as Ce, reactive as we, normalizeClass as oe, withDirectives as st, vShow as lt, nextTick as se, inject as Ne, Fragment as Se, renderList as ct, resolveDynamicComponent as he, withModifiers as me, resolveComponent as Be, KeepAlive as rt, useCssVars as it, watch as ze, normalizeStyle as De, provide as ut, mergeProps as dt, createTextVNode as pe, onBeforeMount as ft } from "vue";
|
|
3
3
|
import { PlusSquareOutlined as gt, DeleteOutlined as Te, ReloadOutlined as Pe, MoreOutlined as pt, EditOutlined as ht, MenuUnfoldOutlined as mt, MenuFoldOutlined as _t, FullscreenOutlined as vt, FullscreenExitOutlined as bt, CloseOutlined as $e, ColumnWidthOutlined as yt, MinusOutlined as wt, LeftOutlined as Pt, RightOutlined as kt, DownOutlined as xt, AlertOutlined as Lt } from "@vicons/antd";
|
|
4
4
|
import { defineStore as ke } from "pinia";
|
|
5
|
-
import { useRouter as
|
|
5
|
+
import { useRouter as le, useRoute as ce } from "vue-router";
|
|
6
6
|
import Ct from "element-resize-detector";
|
|
7
7
|
import St from "vuedraggable";
|
|
8
8
|
const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
@@ -20,27 +20,27 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
20
20
|
onEdit: {}
|
|
21
21
|
},
|
|
22
22
|
setup(e, { expose: n }) {
|
|
23
|
-
const r =
|
|
23
|
+
const r = B(null), m = Oe(), d = ue(), s = B(!1), P = B([]), h = B([]), $ = B({
|
|
24
24
|
page: 1,
|
|
25
25
|
itemCount: 0,
|
|
26
26
|
pageSize: 10,
|
|
27
27
|
pageSizes: [10, 20, 30, 50],
|
|
28
28
|
showSizePicker: !0,
|
|
29
29
|
onChange: async (w) => {
|
|
30
|
-
|
|
30
|
+
$.value.page = w, await C();
|
|
31
31
|
},
|
|
32
32
|
onUpdatePageSize: async (w) => {
|
|
33
|
-
|
|
33
|
+
$.value.pageSize = w, await C();
|
|
34
34
|
}
|
|
35
35
|
}), x = e, l = (w) => {
|
|
36
|
-
const k = (
|
|
36
|
+
const k = (S) => {
|
|
37
37
|
const E = [];
|
|
38
38
|
return w && w.forEach((I) => {
|
|
39
39
|
I.key !== "edit" && I.key !== "delete" && E.push({
|
|
40
40
|
label: I.name,
|
|
41
41
|
key: I.key,
|
|
42
|
-
icon: I.icon && (() =>
|
|
43
|
-
props: { onClick: () => I.action(
|
|
42
|
+
icon: I.icon && (() => z(N, null, { default: () => z(I.icon) })),
|
|
43
|
+
props: { onClick: () => I.action(S) }
|
|
44
44
|
});
|
|
45
45
|
}), E;
|
|
46
46
|
};
|
|
@@ -49,45 +49,45 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
49
49
|
key: "actions",
|
|
50
50
|
width: 100,
|
|
51
51
|
fixed: "right",
|
|
52
|
-
render: (
|
|
52
|
+
render: (S) => {
|
|
53
53
|
let E = [];
|
|
54
54
|
if (x.onEdit && E.push({
|
|
55
55
|
label: "编辑",
|
|
56
56
|
key: "edit",
|
|
57
|
-
icon: () =>
|
|
58
|
-
props: { onClick: async () => await x.onEdit(
|
|
57
|
+
icon: () => z(N, null, { default: () => z(ht) }),
|
|
58
|
+
props: { onClick: async () => await x.onEdit(S) }
|
|
59
59
|
}), x.onDelete && E.push({
|
|
60
60
|
label: "删除",
|
|
61
61
|
key: "delete",
|
|
62
|
-
icon: () =>
|
|
63
|
-
props: { onClick: () =>
|
|
64
|
-
}), E = [...E, ...k(
|
|
65
|
-
return
|
|
62
|
+
icon: () => z(N, null, { default: () => z(Te) }),
|
|
63
|
+
props: { onClick: () => O(S) }
|
|
64
|
+
}), E = [...E, ...k(S)], !(E.length <= 0))
|
|
65
|
+
return z(
|
|
66
66
|
G,
|
|
67
67
|
{
|
|
68
68
|
options: E,
|
|
69
69
|
placement: "bottom-start"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
default: () =>
|
|
72
|
+
default: () => z(
|
|
73
73
|
ve,
|
|
74
74
|
{ size: "small", type: "primary" },
|
|
75
|
-
{ default: () => ["操作",
|
|
75
|
+
{ default: () => ["操作", z(N, () => z(pt))] }
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const w = x.columns.filter((
|
|
83
|
-
title:
|
|
84
|
-
key:
|
|
85
|
-
width:
|
|
86
|
-
fixed:
|
|
87
|
-
render:
|
|
88
|
-
ellipsis:
|
|
81
|
+
}, b = V(() => {
|
|
82
|
+
const w = x.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
89
|
})), k = x.columns.reduce(
|
|
90
|
-
(
|
|
90
|
+
(S, E) => E.key === "action" ? E : S,
|
|
91
91
|
void 0
|
|
92
92
|
)?.action;
|
|
93
93
|
return k && k?.length > 0 || x.onEdit || x.onDelete ? [
|
|
@@ -95,11 +95,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
95
95
|
...w,
|
|
96
96
|
l(k)
|
|
97
97
|
] : [{ type: "selection", fixed: "left" }, ...w];
|
|
98
|
-
}), u = async () => await
|
|
99
|
-
const w =
|
|
98
|
+
}), u = async () => await C(), O = (w) => i([w]), D = () => {
|
|
99
|
+
const w = _();
|
|
100
100
|
i(w);
|
|
101
101
|
}, i = (w) => {
|
|
102
|
-
w && w.length > 0 &&
|
|
102
|
+
w && w.length > 0 && m.warning({
|
|
103
103
|
title: "警告",
|
|
104
104
|
content: "删除数据不可恢复, 确认删除吗?",
|
|
105
105
|
positiveText: "确定",
|
|
@@ -107,34 +107,34 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
107
107
|
onPositiveClick: async () => {
|
|
108
108
|
if (x.onDelete)
|
|
109
109
|
try {
|
|
110
|
-
await x.onDelete(w) ? (
|
|
110
|
+
await x.onDelete(w) ? (C(), d.success("删除成功")) : d.error("删除失败");
|
|
111
111
|
} catch (k) {
|
|
112
112
|
d.error(k.message);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
-
},
|
|
116
|
+
}, _ = () => P.value ? h.value.filter((k) => P.value.includes(k.id)).map((k) => Ce(k)) : [], y = () => _()[0], M = () => Ce(h.value), C = async () => {
|
|
117
117
|
if (!s.value) {
|
|
118
118
|
s.value = !0;
|
|
119
119
|
try {
|
|
120
120
|
if (x.onLoad) {
|
|
121
121
|
var { data: w, total: k } = await x.onLoad(
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
$.value.page,
|
|
123
|
+
$.value.pageSize
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
h.value = w, $.value.itemCount = k;
|
|
126
126
|
}
|
|
127
|
-
} catch (
|
|
128
|
-
d.error(
|
|
127
|
+
} catch (S) {
|
|
128
|
+
d.error(S.message);
|
|
129
129
|
} finally {
|
|
130
130
|
s.value = !1;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
},
|
|
133
|
+
}, T = V(() => {
|
|
134
134
|
const w = a(r);
|
|
135
135
|
if (!w) return;
|
|
136
|
-
const k = w?.$el,
|
|
137
|
-
let q = 12, Z =
|
|
136
|
+
const k = w?.$el, S = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: E } = de(S), I = 48;
|
|
137
|
+
let q = 12, Z = 25;
|
|
138
138
|
const X = k.querySelector(
|
|
139
139
|
".n-data-table__pagination"
|
|
140
140
|
);
|
|
@@ -145,12 +145,12 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
145
145
|
q += 28;
|
|
146
146
|
return E - (I + q + Z);
|
|
147
147
|
}), ee = (w) => !w || !w.getBoundingClientRect ? 0 : w.getBoundingClientRect(), de = (w) => {
|
|
148
|
-
const k = document.documentElement,
|
|
148
|
+
const k = document.documentElement, S = k.scrollLeft, E = k.scrollTop, I = k.clientLeft, q = k.clientTop, Z = window.pageXOffset, X = window.pageYOffset, te = ee(w), {
|
|
149
149
|
left: J,
|
|
150
150
|
top: fe,
|
|
151
151
|
width: ge,
|
|
152
152
|
height: t
|
|
153
|
-
} = te, f = (Z ||
|
|
153
|
+
} = te, f = (Z || S) - (I || 0), p = (X || E) - (q || 0), R = J + Z, K = fe + X, ae = R - f, ne = K - p, ie = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
|
|
154
154
|
return {
|
|
155
155
|
left: ae,
|
|
156
156
|
top: ne,
|
|
@@ -160,16 +160,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
160
160
|
bottomIncludeBody: xe - ne
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
|
-
return Q(async () => await
|
|
163
|
+
return Q(async () => await C()), n({
|
|
164
164
|
getData: M,
|
|
165
|
-
getSelectedRow:
|
|
166
|
-
getSelectedRows:
|
|
167
|
-
refreshData:
|
|
165
|
+
getSelectedRow: y,
|
|
166
|
+
getSelectedRows: _,
|
|
167
|
+
refreshData: C,
|
|
168
168
|
resetPage: () => {
|
|
169
|
-
|
|
169
|
+
$.value.page = 1;
|
|
170
170
|
}
|
|
171
171
|
}), (w, k) => {
|
|
172
|
-
const
|
|
172
|
+
const S = Re, E = _e, I = Me;
|
|
173
173
|
return g(), L(a(Ee), { bordered: !1 }, {
|
|
174
174
|
header: o(() => [
|
|
175
175
|
c(E, {
|
|
@@ -178,10 +178,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
178
178
|
class: "w-full"
|
|
179
179
|
}, {
|
|
180
180
|
default: o(() => [
|
|
181
|
-
|
|
181
|
+
v("span", Tt, j(e.title), 1),
|
|
182
182
|
c(E, null, {
|
|
183
183
|
default: o(() => [
|
|
184
|
-
x.onAdd ? (g(), L(
|
|
184
|
+
x.onAdd ? (g(), L(S, {
|
|
185
185
|
key: 0,
|
|
186
186
|
trigger: "hover"
|
|
187
187
|
}, {
|
|
@@ -198,11 +198,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
198
198
|
}, 8, ["onClick"])
|
|
199
199
|
]),
|
|
200
200
|
default: o(() => [
|
|
201
|
-
k[1] || (k[1] =
|
|
201
|
+
k[1] || (k[1] = v("span", null, "新增", -1))
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
204
|
})) : A("", !0),
|
|
205
|
-
x.onDelete ? (g(), L(
|
|
205
|
+
x.onDelete ? (g(), L(S, {
|
|
206
206
|
key: 1,
|
|
207
207
|
trigger: "hover"
|
|
208
208
|
}, {
|
|
@@ -210,7 +210,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
210
210
|
c(a(N), {
|
|
211
211
|
size: "18",
|
|
212
212
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: D
|
|
214
214
|
}, {
|
|
215
215
|
default: o(() => [
|
|
216
216
|
c(a(Te))
|
|
@@ -219,11 +219,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
219
219
|
})
|
|
220
220
|
]),
|
|
221
221
|
default: o(() => [
|
|
222
|
-
k[2] || (k[2] =
|
|
222
|
+
k[2] || (k[2] = v("span", null, "删除", -1))
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
225
|
})) : A("", !0),
|
|
226
|
-
c(
|
|
226
|
+
c(S, { trigger: "hover" }, {
|
|
227
227
|
trigger: o(() => [
|
|
228
228
|
c(a(N), {
|
|
229
229
|
size: "18",
|
|
@@ -237,7 +237,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
237
237
|
})
|
|
238
238
|
]),
|
|
239
239
|
default: o(() => [
|
|
240
|
-
k[3] || (k[3] =
|
|
240
|
+
k[3] || (k[3] = v("span", null, "刷新", -1))
|
|
241
241
|
]),
|
|
242
242
|
_: 1
|
|
243
243
|
})
|
|
@@ -249,7 +249,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
249
249
|
})
|
|
250
250
|
]),
|
|
251
251
|
default: o(() => [
|
|
252
|
-
|
|
252
|
+
v("div", $t, [
|
|
253
253
|
w.$slots.toolbar ? (g(), H("div", Ot, [
|
|
254
254
|
Y(w.$slots, "toolbar")
|
|
255
255
|
])) : A("", !0),
|
|
@@ -259,13 +259,13 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
259
259
|
ref: r,
|
|
260
260
|
"checked-row-keys": P.value,
|
|
261
261
|
"onUpdate:checkedRowKeys": k[0] || (k[0] = (q) => P.value = q),
|
|
262
|
-
"max-height":
|
|
262
|
+
"max-height": T.value,
|
|
263
263
|
loading: s.value,
|
|
264
264
|
bordered: !1,
|
|
265
265
|
"single-line": !1,
|
|
266
|
-
columns:
|
|
267
|
-
data:
|
|
268
|
-
pagination:
|
|
266
|
+
columns: b.value,
|
|
267
|
+
data: h.value,
|
|
268
|
+
pagination: $.value,
|
|
269
269
|
"row-key": (q) => q[e.idField]
|
|
270
270
|
}, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"])
|
|
271
271
|
])
|
|
@@ -294,39 +294,39 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
294
294
|
return {
|
|
295
295
|
state: e,
|
|
296
296
|
initTabs: (i) => {
|
|
297
|
-
i.sort((
|
|
297
|
+
i.sort((_, y) => (y.meta.affix ? 1 : 0) - (_.meta.affix ? 1 : 0)), e.tabs = i;
|
|
298
298
|
},
|
|
299
299
|
addTab: (i) => Nt.includes(i.name) ? !1 : (e.tabs?.some(
|
|
300
|
-
(
|
|
300
|
+
(y) => y.fullPath == i.fullPath
|
|
301
301
|
) || e.tabs?.push(i), !0),
|
|
302
302
|
closeCurrentTab: (i) => {
|
|
303
|
-
const
|
|
304
|
-
(
|
|
303
|
+
const _ = e.tabs.findIndex(
|
|
304
|
+
(y) => y.fullPath == i.fullPath
|
|
305
305
|
);
|
|
306
|
-
e.tabs.splice(
|
|
306
|
+
e.tabs.splice(_, 1);
|
|
307
307
|
},
|
|
308
308
|
closeAllTabs: () => {
|
|
309
309
|
e.tabs = e.tabs.filter((i) => i?.meta?.affix ?? !1);
|
|
310
310
|
},
|
|
311
311
|
closeOtherTabs: (i) => {
|
|
312
312
|
e.tabs = e.tabs.filter(
|
|
313
|
-
(
|
|
313
|
+
(_) => _.fullPath == i.fullPath || (_?.meta?.affix ?? !1)
|
|
314
314
|
);
|
|
315
315
|
},
|
|
316
316
|
closeLeftTabs: (i) => {
|
|
317
|
-
const
|
|
318
|
-
(
|
|
317
|
+
const _ = e.tabs.findIndex(
|
|
318
|
+
(y) => y.fullPath == i.fullPath
|
|
319
319
|
);
|
|
320
320
|
e.tabs = e.tabs.filter(
|
|
321
|
-
(
|
|
321
|
+
(y, M) => M >= _ || (y?.meta?.affix ?? !1)
|
|
322
322
|
);
|
|
323
323
|
},
|
|
324
324
|
closeRightTabs: (i) => {
|
|
325
|
-
const
|
|
326
|
-
(
|
|
325
|
+
const _ = e.tabs.findIndex(
|
|
326
|
+
(y) => y.fullPath == i.fullPath
|
|
327
327
|
);
|
|
328
328
|
e.tabs = e.tabs.filter(
|
|
329
|
-
(
|
|
329
|
+
(y, M) => M <= _ || (y?.meta?.affix ?? !1)
|
|
330
330
|
);
|
|
331
331
|
},
|
|
332
332
|
collapse: () => {
|
|
@@ -338,8 +338,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
338
338
|
setLogo: (i) => {
|
|
339
339
|
e.logo = i;
|
|
340
340
|
},
|
|
341
|
-
setUser: (i,
|
|
342
|
-
e.uid = i, e.uname =
|
|
341
|
+
setUser: (i, _) => {
|
|
342
|
+
e.uid = i, e.uname = _;
|
|
343
343
|
},
|
|
344
344
|
setSettingPages: (i) => {
|
|
345
345
|
e.settingPages = i;
|
|
@@ -351,28 +351,28 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
351
351
|
e.enableLanguage = i;
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
}),
|
|
354
|
+
}), Bt = { class: "logo" }, zt = /* @__PURE__ */ W({
|
|
355
355
|
__name: "PLogo",
|
|
356
356
|
setup(e) {
|
|
357
357
|
const n = re();
|
|
358
|
-
return (r,
|
|
358
|
+
return (r, m) => (g(), H("div", Bt, [
|
|
359
359
|
c(a(be), {
|
|
360
360
|
color: "var(--color-logo)",
|
|
361
361
|
size: 32,
|
|
362
362
|
src: a(n).state.logo,
|
|
363
363
|
class: oe({ "mr-2": !a(n).state.collapsed })
|
|
364
364
|
}, null, 8, ["src", "class"]),
|
|
365
|
-
|
|
366
|
-
[
|
|
365
|
+
st(v("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, j(a(n).state.title), 513), [
|
|
366
|
+
[lt, !a(n).state.collapsed]
|
|
367
367
|
])
|
|
368
368
|
]));
|
|
369
369
|
}
|
|
370
370
|
}), F = (e, n) => {
|
|
371
371
|
const r = e.__vccOpts || e;
|
|
372
|
-
for (const [
|
|
373
|
-
r[
|
|
372
|
+
for (const [m, d] of n)
|
|
373
|
+
r[m] = d;
|
|
374
374
|
return r;
|
|
375
|
-
}, Dt = /* @__PURE__ */ F(
|
|
375
|
+
}, Dt = /* @__PURE__ */ F(zt, [["__scopeId", "data-v-e48aeefa"]]), At = {
|
|
376
376
|
translationApiUrl: "https://translate.zvo.cn/api",
|
|
377
377
|
defaultLanguage: "chinese",
|
|
378
378
|
currentLanguage: "",
|
|
@@ -381,15 +381,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
381
381
|
selectLanguage: async (e) => {
|
|
382
382
|
}
|
|
383
383
|
}, Mt = ke("language", () => {
|
|
384
|
-
const e =
|
|
384
|
+
const e = B(At), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
|
|
385
385
|
return {
|
|
386
386
|
select: async (l) => {
|
|
387
387
|
if (e.value.currentLanguage === l)
|
|
388
388
|
return;
|
|
389
|
-
const
|
|
389
|
+
const b = (await n()).find(
|
|
390
390
|
(u) => u.key === l
|
|
391
391
|
);
|
|
392
|
-
|
|
392
|
+
b && (e.value.currentLanguage = b.key, e.value.selectLanguage(b));
|
|
393
393
|
},
|
|
394
394
|
selectLanguageCallback: async (l) => {
|
|
395
395
|
e.value.selectLanguage = l;
|
|
@@ -419,28 +419,28 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
419
419
|
const {
|
|
420
420
|
select: n,
|
|
421
421
|
getLanguages: r,
|
|
422
|
-
getCurrentLanguage:
|
|
422
|
+
getCurrentLanguage: m,
|
|
423
423
|
getDefaultLanguage: d,
|
|
424
424
|
getTranslationApiUrl: s
|
|
425
|
-
} = Mt(), P =
|
|
425
|
+
} = Mt(), P = B(), h = B([]), $ = async (l) => await n(l), x = async () => {
|
|
426
426
|
const l = window.translate;
|
|
427
|
-
l && (l.selectLanguageTag.show = !1, l.selectLanguageTag.languages = (await r()).map((
|
|
427
|
+
l && (l.selectLanguageTag.show = !1, l.selectLanguageTag.languages = (await r()).map((b) => b.key).join(","), l.ignore.class.push("ignore-translate-flag"), l.ignore.id.push("ignore-translation"), l.language.setLocal(d()), 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(s()), l.request.listener.start(), l.listener.start(), l.whole.enableAll(), l.execute());
|
|
428
428
|
};
|
|
429
429
|
return Q(async () => {
|
|
430
|
-
await
|
|
431
|
-
}), (l,
|
|
432
|
-
const u = N,
|
|
433
|
-
return
|
|
430
|
+
await se(), await x(), P.value = await m(), h.value = await r();
|
|
431
|
+
}), (l, b) => {
|
|
432
|
+
const u = N, O = ve;
|
|
433
|
+
return h.value.length > 0 ? (g(), L(a(G), {
|
|
434
434
|
key: 0,
|
|
435
435
|
id: "ignore-translation",
|
|
436
436
|
placement: "bottom-start",
|
|
437
437
|
trigger: "hover",
|
|
438
438
|
class: "flex flex-col justify-center h-full ignore",
|
|
439
|
-
onSelect:
|
|
440
|
-
options:
|
|
439
|
+
onSelect: $,
|
|
440
|
+
options: h.value
|
|
441
441
|
}, {
|
|
442
442
|
default: o(() => [
|
|
443
|
-
c(
|
|
443
|
+
c(O, {
|
|
444
444
|
quaternary: "",
|
|
445
445
|
type: "info"
|
|
446
446
|
}, {
|
|
@@ -449,17 +449,17 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
449
449
|
key: 0,
|
|
450
450
|
size: "18"
|
|
451
451
|
}, {
|
|
452
|
-
default: o(() => [...
|
|
453
|
-
|
|
452
|
+
default: o(() => [...b[0] || (b[0] = [
|
|
453
|
+
v("svg", {
|
|
454
454
|
xmlns: "http://www.w3.org/2000/svg",
|
|
455
455
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
456
456
|
viewBox: "0 0 512 512"
|
|
457
457
|
}, [
|
|
458
|
-
|
|
458
|
+
v("path", {
|
|
459
459
|
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",
|
|
460
460
|
fill: "currentColor"
|
|
461
461
|
}),
|
|
462
|
-
|
|
462
|
+
v("path", {
|
|
463
463
|
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",
|
|
464
464
|
fill: "currentColor"
|
|
465
465
|
})
|
|
@@ -481,46 +481,46 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
481
481
|
}, qt = { class: "layout-header-right" }, Ft = {
|
|
482
482
|
key: 0,
|
|
483
483
|
class: "layout-header-trigger-min"
|
|
484
|
-
},
|
|
484
|
+
}, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Vt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */ W({
|
|
485
485
|
__name: "PHeader",
|
|
486
486
|
setup(e) {
|
|
487
|
-
const n = ue(), r = Oe(),
|
|
488
|
-
const
|
|
489
|
-
key:
|
|
490
|
-
label:
|
|
491
|
-
icon:
|
|
492
|
-
meta:
|
|
493
|
-
disabled:
|
|
487
|
+
const n = ue(), r = Oe(), m = re(), d = le(), s = ce(), P = Ne("reloadPage"), h = (i) => d.push({ name: i }), $ = V(() => x(s.matched)), x = (i) => i.map((_) => {
|
|
488
|
+
const y = {
|
|
489
|
+
key: _.name,
|
|
490
|
+
label: _.meta.title,
|
|
491
|
+
icon: _.meta.icon,
|
|
492
|
+
meta: _.meta,
|
|
493
|
+
disabled: _.path === "/",
|
|
494
494
|
children: void 0
|
|
495
495
|
};
|
|
496
|
-
return
|
|
497
|
-
|
|
498
|
-
)),
|
|
499
|
-
}), l =
|
|
496
|
+
return _.children && _.children.length > 0 && (y.children = x(
|
|
497
|
+
_.children
|
|
498
|
+
)), y;
|
|
499
|
+
}), l = B(!1), b = () => {
|
|
500
500
|
document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), l.value = !1) : (document.documentElement.requestFullscreen(), l.value = !0);
|
|
501
|
-
}, u =
|
|
501
|
+
}, u = V(() => {
|
|
502
502
|
const i = [];
|
|
503
503
|
return i.push({
|
|
504
504
|
label: "退出登录",
|
|
505
505
|
key: "logout"
|
|
506
|
-
}),
|
|
506
|
+
}), m.state.settingPages && m.state.settingPages.length > 0 && m.state.settingPages.forEach((_) => {
|
|
507
507
|
i.push({
|
|
508
|
-
label:
|
|
509
|
-
key:
|
|
508
|
+
label: _.title,
|
|
509
|
+
key: _.route
|
|
510
510
|
});
|
|
511
511
|
}), i;
|
|
512
|
-
}),
|
|
513
|
-
i === "logout" ?
|
|
514
|
-
},
|
|
512
|
+
}), O = (i) => {
|
|
513
|
+
i === "logout" ? D() : d.push({ name: i });
|
|
514
|
+
}, D = () => {
|
|
515
515
|
r.info({
|
|
516
516
|
title: "提示",
|
|
517
517
|
content: "您确定要退出登录吗",
|
|
518
518
|
positiveText: "确定",
|
|
519
519
|
negativeText: "取消",
|
|
520
520
|
onPositiveClick: async () => {
|
|
521
|
-
if (
|
|
521
|
+
if (m.state.logout)
|
|
522
522
|
try {
|
|
523
|
-
await
|
|
523
|
+
await m.state.logout(), localStorage.removeItem("TABS-ROUTES"), n.error("退出成功");
|
|
524
524
|
} catch (i) {
|
|
525
525
|
console.error(i), n.error("退出登录失败");
|
|
526
526
|
} finally {
|
|
@@ -533,16 +533,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
533
533
|
}
|
|
534
534
|
});
|
|
535
535
|
};
|
|
536
|
-
return (i,
|
|
537
|
-
const
|
|
536
|
+
return (i, _) => {
|
|
537
|
+
const y = Re, M = We, C = be;
|
|
538
538
|
return g(), H("div", Ht, [
|
|
539
|
-
|
|
540
|
-
|
|
539
|
+
v("div", Wt, [
|
|
540
|
+
v("div", {
|
|
541
541
|
class: "ml-1 layout-header-trigger layout-header-trigger-min",
|
|
542
|
-
onClick:
|
|
543
|
-
(...
|
|
542
|
+
onClick: _[0] || (_[0] = //@ts-ignore
|
|
543
|
+
(...T) => a(m).collapse && a(m).collapse(...T))
|
|
544
544
|
}, [
|
|
545
|
-
a(
|
|
545
|
+
a(m).state.collapsed ? (g(), L(a(N), {
|
|
546
546
|
key: 0,
|
|
547
547
|
size: "18"
|
|
548
548
|
}, {
|
|
@@ -560,10 +560,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
560
560
|
_: 1
|
|
561
561
|
}))
|
|
562
562
|
]),
|
|
563
|
-
|
|
563
|
+
v("div", {
|
|
564
564
|
class: "mr-1 layout-header-trigger layout-header-trigger-min",
|
|
565
|
-
onClick:
|
|
566
|
-
(...
|
|
565
|
+
onClick: _[1] || (_[1] = //@ts-ignore
|
|
566
|
+
(...T) => a(P) && a(P)(...T))
|
|
567
567
|
}, [
|
|
568
568
|
c(a(N), { size: "18" }, {
|
|
569
569
|
default: o(() => [
|
|
@@ -574,26 +574,26 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
574
574
|
]),
|
|
575
575
|
c(a(Ie), null, {
|
|
576
576
|
default: o(() => [
|
|
577
|
-
(g(!0), H(Se, null, ct(
|
|
578
|
-
key:
|
|
577
|
+
(g(!0), H(Se, null, ct($.value, (T) => (g(), H(Se, {
|
|
578
|
+
key: T.label
|
|
579
579
|
}, [
|
|
580
|
-
|
|
580
|
+
T.label ? (g(), L(a(He), { key: 0 }, {
|
|
581
581
|
default: o(() => [
|
|
582
|
-
|
|
582
|
+
T.children && T.children.length ? (g(), L(a(G), {
|
|
583
583
|
key: 0,
|
|
584
|
-
options:
|
|
585
|
-
onSelect:
|
|
584
|
+
options: T.children,
|
|
585
|
+
onSelect: h
|
|
586
586
|
}, {
|
|
587
587
|
default: o(() => [
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
588
|
+
v("span", Ut, [
|
|
589
|
+
T.icon ? (g(), L(he(T.icon), { key: 0 })) : A("", !0),
|
|
590
|
+
v("span", null, j(T.label), 1)
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
_: 2
|
|
594
594
|
}, 1032, ["options"])) : (g(), H("span", jt, [
|
|
595
|
-
|
|
596
|
-
|
|
595
|
+
T.icon ? (g(), L(he(T.icon), { key: 0 })) : A("", !0),
|
|
596
|
+
v("span", null, j(T.label), 1)
|
|
597
597
|
]))
|
|
598
598
|
]),
|
|
599
599
|
_: 2
|
|
@@ -603,16 +603,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
603
603
|
_: 1
|
|
604
604
|
})
|
|
605
605
|
]),
|
|
606
|
-
|
|
607
|
-
a(
|
|
606
|
+
v("div", qt, [
|
|
607
|
+
a(m).state.enableLanguage ? (g(), H("div", Ft, [
|
|
608
608
|
c(Ae)
|
|
609
609
|
])) : A("", !0),
|
|
610
|
-
|
|
611
|
-
c(
|
|
610
|
+
v("div", Kt, [
|
|
611
|
+
c(y, { placement: "bottom" }, {
|
|
612
612
|
trigger: o(() => [
|
|
613
613
|
c(a(N), {
|
|
614
614
|
size: "18",
|
|
615
|
-
onClick: me(
|
|
615
|
+
onClick: me(b, ["stop"])
|
|
616
616
|
}, {
|
|
617
617
|
default: o(() => [
|
|
618
618
|
l.value ? (g(), L(a(bt), { key: 1 })) : (g(), L(a(vt), { key: 0 }))
|
|
@@ -621,24 +621,24 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
621
621
|
})
|
|
622
622
|
]),
|
|
623
623
|
default: o(() => [
|
|
624
|
-
|
|
624
|
+
_[2] || (_[2] = v("span", null, "全屏", -1))
|
|
625
625
|
]),
|
|
626
626
|
_: 1
|
|
627
627
|
})
|
|
628
628
|
]),
|
|
629
|
-
|
|
629
|
+
v("div", Vt, [
|
|
630
630
|
c(a(G), {
|
|
631
631
|
trigger: "hover",
|
|
632
|
-
onSelect:
|
|
632
|
+
onSelect: O,
|
|
633
633
|
options: u.value
|
|
634
634
|
}, {
|
|
635
635
|
default: o(() => [
|
|
636
|
-
|
|
637
|
-
|
|
636
|
+
v("div", Yt, [
|
|
637
|
+
v("span", null, j(a(m).state.uname), 1),
|
|
638
638
|
c(M, { vertical: "" }),
|
|
639
|
-
c(
|
|
639
|
+
c(C, {
|
|
640
640
|
round: "",
|
|
641
|
-
src: a(
|
|
641
|
+
src: a(m).state.avatar
|
|
642
642
|
}, null, 8, ["src"])
|
|
643
643
|
])
|
|
644
644
|
]),
|
|
@@ -656,9 +656,9 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
656
656
|
},
|
|
657
657
|
setup(e) {
|
|
658
658
|
return (n, r) => {
|
|
659
|
-
const
|
|
659
|
+
const m = Be("RouterView");
|
|
660
660
|
return g(), H("div", Zt, [
|
|
661
|
-
e.loading ? A("", !0) : (g(), L(
|
|
661
|
+
e.loading ? A("", !0) : (g(), L(m, { key: 0 }, {
|
|
662
662
|
default: o(({ Component: d, route: s }) => [
|
|
663
663
|
(g(), L(rt, null, [
|
|
664
664
|
(g(), L(he(d), {
|
|
@@ -676,9 +676,9 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
676
676
|
setup(e) {
|
|
677
677
|
it((t) => ({
|
|
678
678
|
v4a1a98ea: r.value,
|
|
679
|
-
v271d846e:
|
|
679
|
+
v271d846e: m.value
|
|
680
680
|
}));
|
|
681
|
-
const n = Ue(), r =
|
|
681
|
+
const n = Ue(), r = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d = ue(), s = ce(), P = le(), h = B(null), $ = B(null), x = B(!1), l = re(), b = V(() => l.state.tabs), u = we({
|
|
682
682
|
activeKey: s.fullPath,
|
|
683
683
|
scrollable: !0,
|
|
684
684
|
dropdownX: 0,
|
|
@@ -686,45 +686,45 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
686
686
|
showDropdown: !1,
|
|
687
687
|
isMultiHeaderFixed: !0,
|
|
688
688
|
multiTabsSetting: !0
|
|
689
|
-
}),
|
|
690
|
-
const { fullPath: f, hash: p, meta: R, name:
|
|
691
|
-
return { fullPath: f, hash: p, meta: R, name:
|
|
692
|
-
}, i =
|
|
689
|
+
}), O = ["Login", "Redirect", "ErrorPage"], D = (t) => {
|
|
690
|
+
const { fullPath: f, hash: p, meta: R, name: K, params: ae, path: ne, query: ie } = t;
|
|
691
|
+
return { fullPath: f, hash: p, meta: R, name: K, params: ae, path: ne, query: ie };
|
|
692
|
+
}, i = V(() => {
|
|
693
693
|
const p = l.state.collapsed ? "64px" : "272px";
|
|
694
694
|
return {
|
|
695
695
|
left: p,
|
|
696
696
|
width: `calc(100% - ${p})`
|
|
697
697
|
};
|
|
698
|
-
}),
|
|
699
|
-
const t =
|
|
698
|
+
}), _ = V(() => {
|
|
699
|
+
const t = b.value.length <= 1;
|
|
700
700
|
return [
|
|
701
701
|
{
|
|
702
702
|
label: "刷新当前",
|
|
703
703
|
key: "1",
|
|
704
|
-
icon: () =>
|
|
704
|
+
icon: () => z(N, null, { default: () => z(Pe) })
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
label: "关闭当前",
|
|
708
708
|
key: "2",
|
|
709
709
|
disabled: x.value || t,
|
|
710
|
-
icon: () =>
|
|
710
|
+
icon: () => z(N, null, { default: () => z($e) })
|
|
711
711
|
},
|
|
712
712
|
{
|
|
713
713
|
label: "关闭其他",
|
|
714
714
|
key: "3",
|
|
715
715
|
disabled: t,
|
|
716
|
-
icon: () =>
|
|
716
|
+
icon: () => z(N, null, { default: () => z(yt) })
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
719
|
label: "关闭全部",
|
|
720
720
|
key: "4",
|
|
721
721
|
disabled: t,
|
|
722
|
-
icon: () =>
|
|
722
|
+
icon: () => z(N, null, { default: () => z(wt) })
|
|
723
723
|
}
|
|
724
724
|
];
|
|
725
|
-
}),
|
|
725
|
+
}), y = () => {
|
|
726
726
|
let t = [];
|
|
727
|
-
const f =
|
|
727
|
+
const f = D(s);
|
|
728
728
|
try {
|
|
729
729
|
if (l.state.cacheTabs) {
|
|
730
730
|
const p = localStorage.getItem("TABS_ROUTES");
|
|
@@ -739,21 +739,21 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
739
739
|
}, M = (t) => {
|
|
740
740
|
const f = P.getRoutes();
|
|
741
741
|
t.forEach((p) => {
|
|
742
|
-
const R = f.find((
|
|
742
|
+
const R = f.find((K) => K.path === p.path);
|
|
743
743
|
R && (p.meta = R.meta || p.meta, p.name = R.name || p.name);
|
|
744
744
|
}), l.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
|
|
745
|
-
},
|
|
746
|
-
const t =
|
|
745
|
+
}, C = () => {
|
|
746
|
+
const t = y();
|
|
747
747
|
M(t), l.initTabs(t);
|
|
748
|
-
},
|
|
749
|
-
if (await
|
|
750
|
-
const f =
|
|
751
|
-
f < p ? (u.scrollable = !0, t && [...
|
|
752
|
-
|
|
748
|
+
}, T = async (t) => {
|
|
749
|
+
if (await se(), !h.value) return;
|
|
750
|
+
const f = h.value.offsetWidth, p = h.value.scrollWidth;
|
|
751
|
+
f < p ? (u.scrollable = !0, t && [...h.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((K) => {
|
|
752
|
+
K.id === `tag${u.activeKey.split("/").join("/")}` && K.scrollIntoView && K.scrollIntoView();
|
|
753
753
|
})) : u.scrollable = !1;
|
|
754
754
|
}, ee = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), de = () => {
|
|
755
755
|
let t;
|
|
756
|
-
t = Ct(), t.listenTo(
|
|
756
|
+
t = Ct(), t.listenTo($.value, () => T(!0));
|
|
757
757
|
}, w = (t) => {
|
|
758
758
|
const { fullPath: f } = t;
|
|
759
759
|
if (f === s.fullPath || (u.activeKey = f, !t))
|
|
@@ -761,10 +761,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
761
761
|
const { replace: p } = P;
|
|
762
762
|
toString.call(t), p(t).catch(console.error);
|
|
763
763
|
}, k = (t, f) => {
|
|
764
|
-
t.preventDefault(), x.value = f.path === "/home", u.showDropdown = !1,
|
|
764
|
+
t.preventDefault(), x.value = f.path === "/home", u.showDropdown = !1, se().then(() => {
|
|
765
765
|
u.showDropdown = !0, u.dropdownX = t.clientX, u.dropdownY = t.clientY;
|
|
766
766
|
});
|
|
767
|
-
},
|
|
767
|
+
}, S = () => {
|
|
768
768
|
if (s.meta.keepAlive) {
|
|
769
769
|
var t = P.currentRoute.value.matched.find(
|
|
770
770
|
(f) => f.name == s.name
|
|
@@ -772,20 +772,20 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
772
772
|
t && t.components?.default?.name;
|
|
773
773
|
}
|
|
774
774
|
}, E = (t) => {
|
|
775
|
-
if (
|
|
775
|
+
if (b.value.length === 1)
|
|
776
776
|
return d.warning("这已经是最后一页,不能再关闭了!");
|
|
777
|
-
if (
|
|
778
|
-
const f =
|
|
777
|
+
if (S(), l.closeCurrentTab(t), u.activeKey === t.fullPath) {
|
|
778
|
+
const f = b.value[Math.max(0, b.value.length - 1)];
|
|
779
779
|
u.activeKey = f.fullPath, P.push(f);
|
|
780
780
|
}
|
|
781
|
-
|
|
781
|
+
T();
|
|
782
782
|
}, I = (t) => {
|
|
783
|
-
const { fullPath: f } = t, p =
|
|
783
|
+
const { fullPath: f } = t, p = b.value.find((R) => R.fullPath == f);
|
|
784
784
|
E(p);
|
|
785
785
|
}, q = (t) => {
|
|
786
|
-
l.closeOtherTabs(t), u.activeKey = t.fullPath, P.replace(t.fullPath),
|
|
786
|
+
l.closeOtherTabs(t), u.activeKey = t.fullPath, P.replace(t.fullPath), T();
|
|
787
787
|
}, Z = () => {
|
|
788
|
-
l.closeAllTabs(),
|
|
788
|
+
l.closeAllTabs(), T();
|
|
789
789
|
}, X = Ne("reloadPage"), te = (t) => {
|
|
790
790
|
switch (t) {
|
|
791
791
|
//刷新
|
|
@@ -805,24 +805,24 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
805
805
|
Z();
|
|
806
806
|
break;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
T(), u.showDropdown = !1;
|
|
809
809
|
}, J = (t, f) => {
|
|
810
|
-
const p =
|
|
811
|
-
if (
|
|
810
|
+
const p = h.value.scrollLeft, R = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
|
|
811
|
+
if (h.value && h.value.scrollTo(R, 0), R !== t)
|
|
812
812
|
return window.requestAnimationFrame(() => J(t, f));
|
|
813
813
|
}, fe = () => {
|
|
814
|
-
const t =
|
|
814
|
+
const t = h.value.offsetWidth, f = h.value.scrollLeft;
|
|
815
815
|
if (!f) return;
|
|
816
816
|
const p = f > t ? f - t : 0;
|
|
817
817
|
J(p, (p - f) / 20);
|
|
818
818
|
}, ge = () => {
|
|
819
|
-
const t =
|
|
819
|
+
const t = h.value.offsetWidth, f = h.value.scrollWidth, p = h.value.scrollLeft;
|
|
820
820
|
if (f - p <= t) return;
|
|
821
821
|
const R = f - p > t * 2 ? p + t : f - t;
|
|
822
822
|
J(R, (R - p) / 20);
|
|
823
823
|
};
|
|
824
824
|
return window.addEventListener("beforeunload", () => {
|
|
825
|
-
localStorage.setItem("TABS_ROUTES", JSON.stringify(
|
|
825
|
+
localStorage.setItem("TABS_ROUTES", JSON.stringify(b.value));
|
|
826
826
|
}), window.addEventListener(
|
|
827
827
|
"scroll",
|
|
828
828
|
(t) => {
|
|
@@ -830,23 +830,23 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
830
830
|
u.isMultiHeaderFixed = f >= 64;
|
|
831
831
|
},
|
|
832
832
|
!0
|
|
833
|
-
),
|
|
833
|
+
), ze(
|
|
834
834
|
() => s.fullPath,
|
|
835
835
|
(t) => {
|
|
836
|
-
|
|
836
|
+
O.includes(s.name) || (u.activeKey = t, l.addTab(D(s)), T(!0));
|
|
837
837
|
},
|
|
838
838
|
{ immediate: !0 }
|
|
839
|
-
),
|
|
839
|
+
), C(), Q(() => de()), (t, f) => (g(), H("div", {
|
|
840
840
|
class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
|
|
841
841
|
style: De(i.value)
|
|
842
842
|
}, [
|
|
843
|
-
|
|
844
|
-
|
|
843
|
+
v("div", Qt, [
|
|
844
|
+
v("div", {
|
|
845
845
|
ref_key: "navWrap",
|
|
846
|
-
ref:
|
|
846
|
+
ref: $,
|
|
847
847
|
class: oe(["tabs-card", { "tabs-card-scrollable": u.scrollable }])
|
|
848
848
|
}, [
|
|
849
|
-
|
|
849
|
+
v("span", {
|
|
850
850
|
class: oe(["tabs-card-prev", { "tabs-card-prev-hide": !u.scrollable }]),
|
|
851
851
|
onClick: fe
|
|
852
852
|
}, [
|
|
@@ -860,7 +860,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
860
860
|
_: 1
|
|
861
861
|
})
|
|
862
862
|
], 2),
|
|
863
|
-
|
|
863
|
+
v("span", {
|
|
864
864
|
class: oe(["tabs-card-next", { "tabs-card-next-hide": !u.scrollable }]),
|
|
865
865
|
onClick: ge
|
|
866
866
|
}, [
|
|
@@ -874,26 +874,26 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
874
874
|
_: 1
|
|
875
875
|
})
|
|
876
876
|
], 2),
|
|
877
|
-
|
|
877
|
+
v("div", {
|
|
878
878
|
ref_key: "navScroll",
|
|
879
|
-
ref:
|
|
879
|
+
ref: h,
|
|
880
880
|
class: "tabs-card-scroll"
|
|
881
881
|
}, [
|
|
882
882
|
c(a(St), {
|
|
883
|
-
list:
|
|
883
|
+
list: b.value,
|
|
884
884
|
animation: "300",
|
|
885
885
|
"item-key": "fullPath",
|
|
886
886
|
class: "flex",
|
|
887
887
|
move: ee
|
|
888
888
|
}, {
|
|
889
889
|
item: o(({ element: p }) => [
|
|
890
|
-
|
|
890
|
+
v("div", {
|
|
891
891
|
id: `tag${p.fullPath.split("/").join("/")}`,
|
|
892
892
|
class: oe(["tabs-card-scroll-item", { "active-item": u.activeKey === p.fullPath }]),
|
|
893
893
|
onClick: me((R) => w(p), ["stop"]),
|
|
894
894
|
onContextmenu: (R) => k(R, p)
|
|
895
895
|
}, [
|
|
896
|
-
|
|
896
|
+
v("span", null, j(p.meta.title), 1),
|
|
897
897
|
p.meta.affix ? A("", !0) : (g(), L(a(N), {
|
|
898
898
|
key: 0,
|
|
899
899
|
size: "14",
|
|
@@ -910,15 +910,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
910
910
|
}, 8, ["list"])
|
|
911
911
|
], 512)
|
|
912
912
|
], 2),
|
|
913
|
-
|
|
913
|
+
v("div", ta, [
|
|
914
914
|
c(a(G), {
|
|
915
915
|
trigger: "hover",
|
|
916
916
|
onSelect: te,
|
|
917
917
|
placement: "bottom-end",
|
|
918
|
-
options:
|
|
918
|
+
options: _.value
|
|
919
919
|
}, {
|
|
920
920
|
default: o(() => [
|
|
921
|
-
|
|
921
|
+
v("div", aa, [
|
|
922
922
|
c(a(N), {
|
|
923
923
|
size: "16",
|
|
924
924
|
color: "#515a6e"
|
|
@@ -940,29 +940,29 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
940
940
|
onClickoutside: f[0] || (f[0] = (p) => u.showDropdown = !1),
|
|
941
941
|
placement: "bottom-start",
|
|
942
942
|
onSelect: te,
|
|
943
|
-
options:
|
|
943
|
+
options: _.value
|
|
944
944
|
}, null, 8, ["show", "x", "y", "options"])
|
|
945
945
|
])
|
|
946
946
|
], 4));
|
|
947
947
|
}
|
|
948
|
-
}), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-e37d2460"]]),
|
|
948
|
+
}), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-e37d2460"]]), sa = /* @__PURE__ */ W({
|
|
949
949
|
__name: "PMenus",
|
|
950
950
|
setup(e) {
|
|
951
|
-
const n = ce(), r =
|
|
951
|
+
const n = ce(), r = le(), m = re(), d = B(n.name), s = B(
|
|
952
952
|
n.matched && n.matched.length ? n.matched.map((u) => u.name) : []
|
|
953
|
-
), P =
|
|
953
|
+
), P = B([]), h = (u) => {
|
|
954
954
|
/http(s)?:/.test(u) ? window.open(u) : r.push({ name: u });
|
|
955
|
-
},
|
|
955
|
+
}, $ = (u) => {
|
|
956
956
|
if (!u) return;
|
|
957
|
-
const
|
|
958
|
-
s.value =
|
|
957
|
+
const O = u.find((D) => s.value.indexOf(D) === -1);
|
|
958
|
+
s.value = O ? [O] : [];
|
|
959
959
|
}, x = () => {
|
|
960
960
|
const u = n.matched;
|
|
961
|
-
s.value = u.map((
|
|
962
|
-
const
|
|
963
|
-
d.value =
|
|
964
|
-
}, l = (u,
|
|
965
|
-
const i = [],
|
|
961
|
+
s.value = u.map((D) => D.name);
|
|
962
|
+
const O = n.meta?.activeMenu || "";
|
|
963
|
+
d.value = O || n.name;
|
|
964
|
+
}, l = (u, O = [], D = !1) => {
|
|
965
|
+
const i = [], _ = [
|
|
966
966
|
"/:path(.*)*",
|
|
967
967
|
"/redirect",
|
|
968
968
|
"/redirect/:path(.*)",
|
|
@@ -971,68 +971,62 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
971
971
|
];
|
|
972
972
|
if (!u || u.length === 0)
|
|
973
973
|
return i;
|
|
974
|
-
u = u.sort((
|
|
975
|
-
let
|
|
976
|
-
return
|
|
974
|
+
u = u.sort((y, M) => {
|
|
975
|
+
let C = (M.children?.length ? 1 : 0) - (y.children?.length ? 1 : 0);
|
|
976
|
+
return C === 0 && (C = (y.meta?.sort ?? 0) - (M.meta?.sort ?? 0)), C;
|
|
977
977
|
});
|
|
978
|
-
for (const
|
|
979
|
-
if (
|
|
980
|
-
|
|
978
|
+
for (const y of u) {
|
|
979
|
+
if (D || y.meta?.hidden || _.includes(y.path.toLowerCase())) {
|
|
980
|
+
O.push(y.name);
|
|
981
981
|
continue;
|
|
982
982
|
}
|
|
983
|
-
const M =
|
|
984
|
-
key:
|
|
985
|
-
label:
|
|
986
|
-
affix:
|
|
987
|
-
sort:
|
|
988
|
-
path:
|
|
989
|
-
redirect:
|
|
990
|
-
icon: M ?
|
|
991
|
-
permissions:
|
|
992
|
-
meta:
|
|
983
|
+
const M = y.meta?.alwaysShow != !0 && y.children?.filter((ee) => !ee.meta?.hidden)?.length === 1, C = M ? y.children[0] : y, T = {
|
|
984
|
+
key: C.name,
|
|
985
|
+
label: C.meta?.title,
|
|
986
|
+
affix: C.meta?.affix,
|
|
987
|
+
sort: C.meta?.sort,
|
|
988
|
+
path: C.path,
|
|
989
|
+
redirect: C.redirect,
|
|
990
|
+
icon: M ? y.meta?.icon : C.meta?.icon,
|
|
991
|
+
permissions: C.meta?.permissions,
|
|
992
|
+
meta: C.meta,
|
|
993
993
|
children: void 0
|
|
994
994
|
};
|
|
995
|
-
|
|
996
|
-
if (i.push(S), $.push(h.name), M) {
|
|
997
|
-
l(h.children, $, B);
|
|
998
|
-
continue;
|
|
999
|
-
}
|
|
1000
|
-
h.children && h.children.length > 0 && (S.children = l(h.children, $, B));
|
|
1001
|
-
}
|
|
995
|
+
O.includes(C.name) || (i.push(T), O.push(C.name)), C.children?.length > 0 && (T.children = l(C.children, O, D));
|
|
1002
996
|
}
|
|
1003
997
|
return i;
|
|
1004
|
-
},
|
|
998
|
+
}, b = () => {
|
|
1005
999
|
const u = r.getRoutes();
|
|
1006
1000
|
P.value = l(u);
|
|
1007
1001
|
};
|
|
1008
|
-
return
|
|
1002
|
+
return ze(
|
|
1009
1003
|
() => n.fullPath,
|
|
1010
1004
|
() => {
|
|
1011
1005
|
x();
|
|
1012
1006
|
}
|
|
1013
1007
|
), Q(() => {
|
|
1014
|
-
|
|
1015
|
-
}), (u,
|
|
1008
|
+
b(), x();
|
|
1009
|
+
}), (u, O) => (g(), L(a(je), {
|
|
1016
1010
|
class: "h-full",
|
|
1017
1011
|
inverted: "",
|
|
1018
1012
|
mode: "vertical",
|
|
1019
1013
|
options: P.value,
|
|
1020
|
-
collapsed: a(
|
|
1014
|
+
collapsed: a(m).state.collapsed,
|
|
1021
1015
|
"collapsed-width": 64,
|
|
1022
1016
|
"collapsed-icon-size": 20,
|
|
1023
1017
|
indent: 24,
|
|
1024
1018
|
"expanded-keys": s.value,
|
|
1025
1019
|
value: d.value,
|
|
1026
|
-
"onUpdate:value":
|
|
1027
|
-
"onUpdate:expandedKeys":
|
|
1020
|
+
"onUpdate:value": h,
|
|
1021
|
+
"onUpdate:expandedKeys": $
|
|
1028
1022
|
}, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
|
|
1029
1023
|
}
|
|
1030
|
-
}),
|
|
1024
|
+
}), la = { class: "layout-content-main layout-content-main-fix" }, ca = { class: "main-view main-view-fix" }, ra = /* @__PURE__ */ W({
|
|
1031
1025
|
__name: "PLayout",
|
|
1032
1026
|
setup(e) {
|
|
1033
|
-
const n = re(), r =
|
|
1027
|
+
const n = re(), r = B(!1);
|
|
1034
1028
|
return ut("reloadPage", () => {
|
|
1035
|
-
r.value = !0,
|
|
1029
|
+
r.value = !0, se(() => r.value = !1);
|
|
1036
1030
|
}), (d, s) => {
|
|
1037
1031
|
const P = Ye;
|
|
1038
1032
|
return g(), L(a(Le), {
|
|
@@ -1059,7 +1053,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1059
1053
|
c(a(Fe), { vertical: "" }, {
|
|
1060
1054
|
default: o(() => [
|
|
1061
1055
|
c(Dt),
|
|
1062
|
-
c(
|
|
1056
|
+
c(sa)
|
|
1063
1057
|
]),
|
|
1064
1058
|
_: 1
|
|
1065
1059
|
})
|
|
@@ -1068,17 +1062,17 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1068
1062
|
}, 8, ["collapsed", "onCollapse", "onExpand"]),
|
|
1069
1063
|
c(a(Le), null, {
|
|
1070
1064
|
default: o(() => [
|
|
1071
|
-
c(a(
|
|
1065
|
+
c(a(Ke), { position: "absolute" }, {
|
|
1072
1066
|
default: o(() => [
|
|
1073
1067
|
c(Jt)
|
|
1074
1068
|
]),
|
|
1075
1069
|
_: 1
|
|
1076
1070
|
}),
|
|
1077
|
-
c(a(
|
|
1071
|
+
c(a(Ve), { class: "layout-content layout-default-background" }, {
|
|
1078
1072
|
default: o(() => [
|
|
1079
|
-
|
|
1073
|
+
v("div", la, [
|
|
1080
1074
|
c(oa),
|
|
1081
|
-
|
|
1075
|
+
v("div", ca, [
|
|
1082
1076
|
c(Gt, { loading: r.value }, null, 8, ["loading"])
|
|
1083
1077
|
])
|
|
1084
1078
|
])
|
|
@@ -1099,7 +1093,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1099
1093
|
}
|
|
1100
1094
|
}), ia = /* @__PURE__ */ F(ra, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
|
|
1101
1095
|
function da(e, n) {
|
|
1102
|
-
const r =
|
|
1096
|
+
const r = Be("router-view");
|
|
1103
1097
|
return g(), L(r);
|
|
1104
1098
|
}
|
|
1105
1099
|
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha = /* @__PURE__ */ W({
|
|
@@ -1120,8 +1114,8 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1120
1114
|
},
|
|
1121
1115
|
setup(e) {
|
|
1122
1116
|
return (n, r) => {
|
|
1123
|
-
const
|
|
1124
|
-
return g(), L(
|
|
1117
|
+
const m = Xe;
|
|
1118
|
+
return g(), L(m, {
|
|
1125
1119
|
locale: a(Ze),
|
|
1126
1120
|
theme: e.theme,
|
|
1127
1121
|
"theme-overrides": e.themeOverrides,
|
|
@@ -1166,22 +1160,22 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1166
1160
|
},
|
|
1167
1161
|
emits: ["update:visible", "update:loading"],
|
|
1168
1162
|
setup(e, { expose: n, emit: r }) {
|
|
1169
|
-
const
|
|
1163
|
+
const m = ue(), d = e, s = r, P = async () => {
|
|
1170
1164
|
s("update:loading", !0);
|
|
1171
1165
|
try {
|
|
1172
|
-
d.onSave && await d.onSave() &&
|
|
1173
|
-
} catch (
|
|
1174
|
-
|
|
1166
|
+
d.onSave && await d.onSave() && h();
|
|
1167
|
+
} catch (b) {
|
|
1168
|
+
m.error(b.message);
|
|
1175
1169
|
} finally {
|
|
1176
1170
|
s("update:loading", !1);
|
|
1177
1171
|
}
|
|
1178
|
-
},
|
|
1172
|
+
}, h = () => {
|
|
1179
1173
|
s("update:visible", !1), s("update:loading", !1);
|
|
1180
|
-
},
|
|
1174
|
+
}, $ = async () => {
|
|
1181
1175
|
try {
|
|
1182
|
-
d.onClose ? await d.onClose() &&
|
|
1183
|
-
} catch (
|
|
1184
|
-
|
|
1176
|
+
d.onClose ? await d.onClose() && h() : h();
|
|
1177
|
+
} catch (b) {
|
|
1178
|
+
m.error(b.message), s("update:loading", !1);
|
|
1185
1179
|
}
|
|
1186
1180
|
};
|
|
1187
1181
|
return n({
|
|
@@ -1191,12 +1185,12 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1191
1185
|
close: () => {
|
|
1192
1186
|
s("update:visible", !1), s("update:loading", !1);
|
|
1193
1187
|
}
|
|
1194
|
-
}), (
|
|
1195
|
-
const
|
|
1188
|
+
}), (b, u) => {
|
|
1189
|
+
const O = at, D = ve, i = _e;
|
|
1196
1190
|
return g(), L(a(tt), dt({
|
|
1197
1191
|
ref: "$modal",
|
|
1198
1192
|
preset: "card"
|
|
1199
|
-
},
|
|
1193
|
+
}, b.$attrs, {
|
|
1200
1194
|
"header-class": "bg-gray-50",
|
|
1201
1195
|
show: d.visible,
|
|
1202
1196
|
draggable: !0,
|
|
@@ -1205,10 +1199,10 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1205
1199
|
"mask-closable": !1,
|
|
1206
1200
|
bordered: !1,
|
|
1207
1201
|
style: { width: `${d.width}px` },
|
|
1208
|
-
onClose:
|
|
1202
|
+
onClose: h
|
|
1209
1203
|
}), {
|
|
1210
1204
|
header: o(() => [
|
|
1211
|
-
|
|
1205
|
+
b.$slots.header ? Y(b.$slots, "header", { key: 0 }) : d.title ? (g(), L(O, { key: 1 }, {
|
|
1212
1206
|
default: o(() => [
|
|
1213
1207
|
pe(j(e.title), 1)
|
|
1214
1208
|
]),
|
|
@@ -1216,23 +1210,23 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1216
1210
|
})) : A("", !0)
|
|
1217
1211
|
]),
|
|
1218
1212
|
"header-extra": o(() => [
|
|
1219
|
-
Y(
|
|
1213
|
+
Y(b.$slots, "header-extra")
|
|
1220
1214
|
]),
|
|
1221
1215
|
default: o(() => [
|
|
1222
|
-
|
|
1216
|
+
v("div", {
|
|
1223
1217
|
class: "overflow-y-auto overflow-hidden mt-5",
|
|
1224
1218
|
style: De({ maxHeight: `${d.height}px` })
|
|
1225
1219
|
}, [
|
|
1226
|
-
Y(
|
|
1220
|
+
Y(b.$slots, "default")
|
|
1227
1221
|
], 4)
|
|
1228
1222
|
]),
|
|
1229
1223
|
footer: o(() => [
|
|
1230
|
-
Y(
|
|
1224
|
+
Y(b.$slots, "footer")
|
|
1231
1225
|
]),
|
|
1232
1226
|
action: o(() => [
|
|
1233
1227
|
c(i, { justify: "end" }, {
|
|
1234
1228
|
default: o(() => [
|
|
1235
|
-
d.hideSaveBtn ? A("", !0) : (g(), L(
|
|
1229
|
+
d.hideSaveBtn ? A("", !0) : (g(), L(D, {
|
|
1236
1230
|
key: 0,
|
|
1237
1231
|
type: "primary",
|
|
1238
1232
|
loading: e.loading,
|
|
@@ -1243,10 +1237,10 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1243
1237
|
]),
|
|
1244
1238
|
_: 1
|
|
1245
1239
|
}, 8, ["loading"])),
|
|
1246
|
-
Y(
|
|
1247
|
-
d.hideCancelBtn ? A("", !0) : (g(), L(
|
|
1240
|
+
Y(b.$slots, "action-extra", { loading: e.loading }),
|
|
1241
|
+
d.hideCancelBtn ? A("", !0) : (g(), L(D, {
|
|
1248
1242
|
key: 1,
|
|
1249
|
-
onClick:
|
|
1243
|
+
onClick: $,
|
|
1250
1244
|
loading: e.loading
|
|
1251
1245
|
}, {
|
|
1252
1246
|
default: o(() => [
|
|
@@ -1265,47 +1259,47 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1265
1259
|
}), va = U(_a), ba = U(Ae), ya = W({
|
|
1266
1260
|
name: "Redirect",
|
|
1267
1261
|
setup() {
|
|
1268
|
-
const e = ce(), n =
|
|
1262
|
+
const e = ce(), n = le();
|
|
1269
1263
|
return ft(() => {
|
|
1270
|
-
const { params: r, query:
|
|
1264
|
+
const { params: r, query: m } = e, { path: d } = r;
|
|
1271
1265
|
n.replace({
|
|
1272
1266
|
path: "/" + (Array.isArray(d) ? d.join("/") : d),
|
|
1273
|
-
query:
|
|
1267
|
+
query: m
|
|
1274
1268
|
});
|
|
1275
1269
|
}), () => /* @__PURE__ */ React.createElement(nt, null);
|
|
1276
1270
|
}
|
|
1277
1271
|
}), wa = U(ya), Pa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ W({
|
|
1278
1272
|
__name: "PIframe",
|
|
1279
1273
|
setup(e) {
|
|
1280
|
-
const n = ce(), r =
|
|
1274
|
+
const n = ce(), r = B(!1), m = B(null), d = B("");
|
|
1281
1275
|
a(n.meta)?.frameSrc && (d.value = a(n.meta)?.frameSrc);
|
|
1282
1276
|
function s() {
|
|
1283
1277
|
r.value = !1;
|
|
1284
1278
|
}
|
|
1285
1279
|
function P() {
|
|
1286
|
-
|
|
1287
|
-
const
|
|
1288
|
-
if (!
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1280
|
+
se(() => {
|
|
1281
|
+
const h = a(m);
|
|
1282
|
+
if (!h) return;
|
|
1283
|
+
const $ = h;
|
|
1284
|
+
$.attachEvent ? $.attachEvent("onload", () => {
|
|
1291
1285
|
s();
|
|
1292
|
-
}) :
|
|
1286
|
+
}) : h.onload = () => {
|
|
1293
1287
|
s();
|
|
1294
1288
|
};
|
|
1295
1289
|
});
|
|
1296
1290
|
}
|
|
1297
1291
|
return Q(() => {
|
|
1298
1292
|
r.value = !0, P();
|
|
1299
|
-
}), (
|
|
1293
|
+
}), (h, $) => {
|
|
1300
1294
|
const x = ot;
|
|
1301
1295
|
return g(), L(x, { show: r.value }, {
|
|
1302
1296
|
default: o(() => [
|
|
1303
|
-
|
|
1304
|
-
|
|
1297
|
+
v("div", Pa, [
|
|
1298
|
+
v("iframe", {
|
|
1305
1299
|
src: d.value,
|
|
1306
1300
|
class: "frame-iframe",
|
|
1307
1301
|
ref_key: "frameRef",
|
|
1308
|
-
ref:
|
|
1302
|
+
ref: m
|
|
1309
1303
|
}, null, 8, ka)
|
|
1310
1304
|
])
|
|
1311
1305
|
]),
|
|
@@ -1322,10 +1316,10 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1322
1316
|
},
|
|
1323
1317
|
setup(e) {
|
|
1324
1318
|
const n = e;
|
|
1325
|
-
return (r,
|
|
1326
|
-
const d = N, s = be, P = _e,
|
|
1319
|
+
return (r, m) => {
|
|
1320
|
+
const d = N, s = be, P = _e, h = Ee;
|
|
1327
1321
|
return g(), H("div", Sa, [
|
|
1328
|
-
n.title ? (g(), L(
|
|
1322
|
+
n.title ? (g(), L(h, {
|
|
1329
1323
|
key: 0,
|
|
1330
1324
|
class: "mb-4",
|
|
1331
1325
|
bordered: !1,
|
|
@@ -1356,9 +1350,9 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1356
1350
|
]),
|
|
1357
1351
|
_: 1
|
|
1358
1352
|
})) : A("", !0),
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1353
|
+
v("div", null, [
|
|
1354
|
+
v("div", Ta, j(n.title), 1),
|
|
1355
|
+
v("div", $a, j(n.subtitle ?? n.title + "主页"), 1)
|
|
1362
1356
|
])
|
|
1363
1357
|
]),
|
|
1364
1358
|
_: 1
|
|
@@ -1369,7 +1363,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1369
1363
|
]),
|
|
1370
1364
|
_: 1
|
|
1371
1365
|
})) : A("", !0),
|
|
1372
|
-
r.$slots.search ? (g(), L(
|
|
1366
|
+
r.$slots.search ? (g(), L(h, {
|
|
1373
1367
|
key: 1,
|
|
1374
1368
|
class: "mb-4",
|
|
1375
1369
|
"content-class": "flex flex-row gap-2",
|
|
@@ -1380,7 +1374,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1380
1374
|
]),
|
|
1381
1375
|
_: 3
|
|
1382
1376
|
})) : A("", !0),
|
|
1383
|
-
r.$slots.default ? (g(), L(
|
|
1377
|
+
r.$slots.default ? (g(), L(h, {
|
|
1384
1378
|
key: 2,
|
|
1385
1379
|
"content-class": "flex flex-row gap-2 p-0!",
|
|
1386
1380
|
bordered: !1
|
|
@@ -1394,7 +1388,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1394
1388
|
};
|
|
1395
1389
|
}
|
|
1396
1390
|
}), Ea = U(Oa), Ra = {}, Na = { class: "flex flex-col justify-center page-container" };
|
|
1397
|
-
function
|
|
1391
|
+
function Ba(e, n) {
|
|
1398
1392
|
const r = ye;
|
|
1399
1393
|
return g(), H("div", Na, [
|
|
1400
1394
|
c(r, {
|
|
@@ -1404,7 +1398,7 @@ function za(e, n) {
|
|
|
1404
1398
|
})
|
|
1405
1399
|
]);
|
|
1406
1400
|
}
|
|
1407
|
-
const
|
|
1401
|
+
const za = /* @__PURE__ */ F(Ra, [["render", Ba], ["__scopeId", "data-v-89cb65c7"]]), Da = {}, Aa = { class: "flex flex-col justify-center page-container" };
|
|
1408
1402
|
function Ma(e, n) {
|
|
1409
1403
|
const r = ye;
|
|
1410
1404
|
return g(), H("div", Aa, [
|
|
@@ -1426,7 +1420,7 @@ function Ua(e, n) {
|
|
|
1426
1420
|
})
|
|
1427
1421
|
]);
|
|
1428
1422
|
}
|
|
1429
|
-
const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16"]]), qa = U(
|
|
1423
|
+
const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16"]]), qa = U(za), Fa = U(Ia), Ka = U(ja), Va = ke("app-oidc", () => {
|
|
1430
1424
|
const e = we({});
|
|
1431
1425
|
return {
|
|
1432
1426
|
setCallback: (s) => e.callback = s,
|
|
@@ -1437,24 +1431,24 @@ const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16
|
|
|
1437
1431
|
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ W({
|
|
1438
1432
|
__name: "POidc",
|
|
1439
1433
|
setup(e) {
|
|
1440
|
-
const n =
|
|
1434
|
+
const n = le(), { callCallback: r, callError: m } = Va();
|
|
1441
1435
|
return Q(async () => {
|
|
1442
1436
|
try {
|
|
1443
1437
|
await r(n);
|
|
1444
1438
|
} catch (d) {
|
|
1445
|
-
await
|
|
1439
|
+
await m(n, d);
|
|
1446
1440
|
}
|
|
1447
1441
|
}), (d, s) => (g(), H("div", Ya, [...s[0] || (s[0] = [
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1442
|
+
v("div", { class: "view-auth-callback-content" }, [
|
|
1443
|
+
v("div", { class: "view-auth-callback-spinner" }, [
|
|
1444
|
+
v("span", null, "正在处理登录回调...")
|
|
1451
1445
|
])
|
|
1452
1446
|
], -1)
|
|
1453
1447
|
])]));
|
|
1454
1448
|
}
|
|
1455
1449
|
}), Ja = /* @__PURE__ */ F(Xa, [["__scopeId", "data-v-167395ae"]]), Za = U(Ja), Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1456
1450
|
__proto__: null,
|
|
1457
|
-
P403:
|
|
1451
|
+
P403: Ka,
|
|
1458
1452
|
P404: Fa,
|
|
1459
1453
|
P500: qa,
|
|
1460
1454
|
PApplication: ma,
|
|
@@ -1473,7 +1467,7 @@ const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16
|
|
|
1473
1467
|
install: Qa
|
|
1474
1468
|
};
|
|
1475
1469
|
export {
|
|
1476
|
-
|
|
1470
|
+
Ka as P403,
|
|
1477
1471
|
Fa as P404,
|
|
1478
1472
|
qa as P500,
|
|
1479
1473
|
ma as PApplication,
|
|
@@ -1490,5 +1484,5 @@ export {
|
|
|
1490
1484
|
Qa as install,
|
|
1491
1485
|
Mt as useLanguageStore,
|
|
1492
1486
|
re as useLayoutStore,
|
|
1493
|
-
|
|
1487
|
+
Va as useOidcStore
|
|
1494
1488
|
};
|