@chewel611/naive-ui-plus 0.0.36 → 0.0.37
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 +344 -342
- package/dist/index.umd.cjs +1 -1
- package/es/layout/sider/PMenus.vue.js +45 -43
- package/lib/layout/sider/PMenus.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
|
|
2
|
-
import { defineComponent as W, ref as
|
|
1
|
+
import { useDialog as Oe, useMessage as de, NCard as Ee, NDataTable as Me, NSpace as _e, NTooltip as Re, NIcon as R, NDropdown as Q, 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 N, computed as V, unref as a, onMounted as ee, openBlock as g, createBlock as C, 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 se, withDirectives as st, vShow as lt, nextTick as le, 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 ce, useRoute as re } 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,29 +20,29 @@ 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 = N(null), m = Oe(), d = de(), l = N(!1), k = N([]), h = N([]), T = N({
|
|
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
|
-
|
|
29
|
+
onChange: async (P) => {
|
|
30
|
+
T.value.page = P, await B();
|
|
31
31
|
},
|
|
32
|
-
onUpdatePageSize: async (
|
|
33
|
-
|
|
32
|
+
onUpdatePageSize: async (P) => {
|
|
33
|
+
T.value.pageSize = P, await B();
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
I.key !== "edit" && I.key !== "delete" &&
|
|
35
|
+
}), L = e, s = (P) => {
|
|
36
|
+
const x = (S) => {
|
|
37
|
+
const O = [];
|
|
38
|
+
return P && P.forEach((I) => {
|
|
39
|
+
I.key !== "edit" && I.key !== "delete" && O.push({
|
|
40
40
|
label: I.name,
|
|
41
41
|
key: I.key,
|
|
42
|
-
icon: I.icon && (() => z(
|
|
42
|
+
icon: I.icon && (() => z(R, null, { default: () => z(I.icon) })),
|
|
43
43
|
props: { onClick: () => I.action(S) }
|
|
44
44
|
});
|
|
45
|
-
}),
|
|
45
|
+
}), O;
|
|
46
46
|
};
|
|
47
47
|
return {
|
|
48
48
|
title: "操作",
|
|
@@ -50,92 +50,92 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
50
50
|
width: 100,
|
|
51
51
|
fixed: "right",
|
|
52
52
|
render: (S) => {
|
|
53
|
-
let
|
|
54
|
-
if (
|
|
53
|
+
let O = [];
|
|
54
|
+
if (L.onEdit && O.push({
|
|
55
55
|
label: "编辑",
|
|
56
56
|
key: "edit",
|
|
57
|
-
icon: () => z(
|
|
58
|
-
props: { onClick: async () => await
|
|
59
|
-
}),
|
|
57
|
+
icon: () => z(R, null, { default: () => z(ht) }),
|
|
58
|
+
props: { onClick: async () => await L.onEdit(S) }
|
|
59
|
+
}), L.onDelete && O.push({
|
|
60
60
|
label: "删除",
|
|
61
61
|
key: "delete",
|
|
62
|
-
icon: () => z(
|
|
63
|
-
props: { onClick: () =>
|
|
64
|
-
}),
|
|
62
|
+
icon: () => z(R, null, { default: () => z(Te) }),
|
|
63
|
+
props: { onClick: () => $(S) }
|
|
64
|
+
}), O = [...O, ...x(S)], !(O.length <= 0))
|
|
65
65
|
return z(
|
|
66
|
-
|
|
66
|
+
Q,
|
|
67
67
|
{
|
|
68
|
-
options:
|
|
68
|
+
options: O,
|
|
69
69
|
placement: "bottom-start"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
default: () => z(
|
|
73
73
|
ve,
|
|
74
74
|
{ size: "small", type: "primary" },
|
|
75
|
-
{ default: () => ["操作", z(
|
|
75
|
+
{ default: () => ["操作", z(R, () => z(pt))] }
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const
|
|
81
|
+
}, y = V(() => {
|
|
82
|
+
const P = L.columns.filter((S) => S.key != "action").map((S) => ({
|
|
83
83
|
title: S.title,
|
|
84
84
|
key: S.key,
|
|
85
85
|
width: S.width,
|
|
86
86
|
fixed: S.fixed ?? !1,
|
|
87
87
|
render: S.render,
|
|
88
88
|
ellipsis: S.ellipsis ? { tooltip: !0 } : !1
|
|
89
|
-
})),
|
|
90
|
-
(S,
|
|
89
|
+
})), x = L.columns.reduce(
|
|
90
|
+
(S, O) => O.key === "action" ? O : S,
|
|
91
91
|
void 0
|
|
92
92
|
)?.action;
|
|
93
|
-
return
|
|
93
|
+
return x && x?.length > 0 || L.onEdit || L.onDelete ? [
|
|
94
94
|
{ type: "selection", fixed: "left" },
|
|
95
|
-
...
|
|
96
|
-
|
|
97
|
-
] : [{ type: "selection", fixed: "left" }, ...
|
|
98
|
-
}), u = async () => await
|
|
99
|
-
const
|
|
100
|
-
i(
|
|
101
|
-
}, i = (
|
|
102
|
-
|
|
95
|
+
...P,
|
|
96
|
+
s(x)
|
|
97
|
+
] : [{ type: "selection", fixed: "left" }, ...P];
|
|
98
|
+
}), u = async () => await B(), $ = (P) => i([P]), D = () => {
|
|
99
|
+
const P = _();
|
|
100
|
+
i(P);
|
|
101
|
+
}, i = (P) => {
|
|
102
|
+
P && P.length > 0 && m.warning({
|
|
103
103
|
title: "警告",
|
|
104
104
|
content: "删除数据不可恢复, 确认删除吗?",
|
|
105
105
|
positiveText: "确定",
|
|
106
106
|
negativeText: "取消",
|
|
107
107
|
onPositiveClick: async () => {
|
|
108
|
-
if (
|
|
108
|
+
if (L.onDelete)
|
|
109
109
|
try {
|
|
110
|
-
await
|
|
111
|
-
} catch (
|
|
112
|
-
d.error(
|
|
110
|
+
await L.onDelete(P) ? (B(), d.success("删除成功")) : d.error("删除失败");
|
|
111
|
+
} catch (x) {
|
|
112
|
+
d.error(x.message);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
-
}, _ = () =>
|
|
117
|
-
if (!
|
|
118
|
-
|
|
116
|
+
}, _ = () => k.value ? h.value.filter((x) => k.value.includes(x.id)).map((x) => Ce(x)) : [], w = () => _()[0], M = () => Ce(h.value), B = async () => {
|
|
117
|
+
if (!l.value) {
|
|
118
|
+
l.value = !0;
|
|
119
119
|
try {
|
|
120
|
-
if (
|
|
121
|
-
var { data:
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
if (L.onLoad) {
|
|
121
|
+
var { data: P, total: x } = await L.onLoad(
|
|
122
|
+
T.value.page,
|
|
123
|
+
T.value.pageSize
|
|
124
124
|
);
|
|
125
|
-
h.value =
|
|
125
|
+
h.value = P, T.value.itemCount = x;
|
|
126
126
|
}
|
|
127
127
|
} catch (S) {
|
|
128
128
|
d.error(S.message);
|
|
129
129
|
} finally {
|
|
130
|
-
|
|
130
|
+
l.value = !1;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
},
|
|
134
|
-
const
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
let q = 12,
|
|
138
|
-
const X =
|
|
133
|
+
}, b = V(() => {
|
|
134
|
+
const P = a(r);
|
|
135
|
+
if (!P) return;
|
|
136
|
+
const x = P?.$el, S = x.querySelector(".n-data-table-thead "), { bottomIncludeBody: O } = te(S), I = 48;
|
|
137
|
+
let q = 12, G = 25;
|
|
138
|
+
const X = x.querySelector(
|
|
139
139
|
".n-data-table__pagination"
|
|
140
140
|
);
|
|
141
141
|
if (X) {
|
|
@@ -143,53 +143,53 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
143
143
|
q += J || 0;
|
|
144
144
|
} else
|
|
145
145
|
q += 28;
|
|
146
|
-
return
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
146
|
+
return O - (I + q + G);
|
|
147
|
+
}), Z = (P) => !P || !P.getBoundingClientRect ? 0 : P.getBoundingClientRect(), te = (P) => {
|
|
148
|
+
const x = document.documentElement, S = x.scrollLeft, O = x.scrollTop, I = x.clientLeft, q = x.clientTop, G = window.pageXOffset, X = window.pageYOffset, ae = Z(P), {
|
|
149
149
|
left: J,
|
|
150
150
|
top: fe,
|
|
151
151
|
width: ge,
|
|
152
152
|
height: t
|
|
153
|
-
} =
|
|
153
|
+
} = ae, f = (G || S) - (I || 0), p = (X || O) - (q || 0), E = J + G, K = fe + X, ne = E - f, oe = K - p, ue = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
|
|
154
154
|
return {
|
|
155
|
-
left:
|
|
156
|
-
top:
|
|
157
|
-
right:
|
|
158
|
-
bottom: xe - t -
|
|
159
|
-
rightIncludeBody:
|
|
160
|
-
bottomIncludeBody: xe -
|
|
155
|
+
left: ne,
|
|
156
|
+
top: oe,
|
|
157
|
+
right: ue - ge - ne,
|
|
158
|
+
bottom: xe - t - oe,
|
|
159
|
+
rightIncludeBody: ue - ne,
|
|
160
|
+
bottomIncludeBody: xe - oe
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
|
-
return
|
|
163
|
+
return ee(async () => await B()), n({
|
|
164
164
|
getData: M,
|
|
165
|
-
getSelectedRow:
|
|
165
|
+
getSelectedRow: w,
|
|
166
166
|
getSelectedRows: _,
|
|
167
|
-
refreshData:
|
|
167
|
+
refreshData: B,
|
|
168
168
|
resetPage: () => {
|
|
169
|
-
|
|
169
|
+
T.value.page = 1;
|
|
170
170
|
}
|
|
171
|
-
}), (
|
|
172
|
-
const S = Re,
|
|
173
|
-
return g(),
|
|
171
|
+
}), (P, x) => {
|
|
172
|
+
const S = Re, O = _e, I = Me;
|
|
173
|
+
return g(), C(a(Ee), { bordered: !1 }, {
|
|
174
174
|
header: o(() => [
|
|
175
|
-
c(
|
|
175
|
+
c(O, {
|
|
176
176
|
justify: "space-between",
|
|
177
177
|
align: "center",
|
|
178
178
|
class: "w-full"
|
|
179
179
|
}, {
|
|
180
180
|
default: o(() => [
|
|
181
181
|
v("span", Tt, j(e.title), 1),
|
|
182
|
-
c(
|
|
182
|
+
c(O, null, {
|
|
183
183
|
default: o(() => [
|
|
184
|
-
|
|
184
|
+
L.onAdd ? (g(), C(S, {
|
|
185
185
|
key: 0,
|
|
186
186
|
trigger: "hover"
|
|
187
187
|
}, {
|
|
188
188
|
trigger: o(() => [
|
|
189
|
-
c(a(
|
|
189
|
+
c(a(R), {
|
|
190
190
|
size: "18",
|
|
191
191
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
192
|
-
onClick:
|
|
192
|
+
onClick: L.onAdd
|
|
193
193
|
}, {
|
|
194
194
|
default: o(() => [
|
|
195
195
|
c(a(gt))
|
|
@@ -198,16 +198,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
198
198
|
}, 8, ["onClick"])
|
|
199
199
|
]),
|
|
200
200
|
default: o(() => [
|
|
201
|
-
|
|
201
|
+
x[1] || (x[1] = v("span", null, "新增", -1))
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
204
|
})) : A("", !0),
|
|
205
|
-
|
|
205
|
+
L.onDelete ? (g(), C(S, {
|
|
206
206
|
key: 1,
|
|
207
207
|
trigger: "hover"
|
|
208
208
|
}, {
|
|
209
209
|
trigger: o(() => [
|
|
210
|
-
c(a(
|
|
210
|
+
c(a(R), {
|
|
211
211
|
size: "18",
|
|
212
212
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
213
213
|
onClick: D
|
|
@@ -219,13 +219,13 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
219
219
|
})
|
|
220
220
|
]),
|
|
221
221
|
default: o(() => [
|
|
222
|
-
|
|
222
|
+
x[2] || (x[2] = v("span", null, "删除", -1))
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
225
|
})) : A("", !0),
|
|
226
226
|
c(S, { trigger: "hover" }, {
|
|
227
227
|
trigger: o(() => [
|
|
228
|
-
c(a(
|
|
228
|
+
c(a(R), {
|
|
229
229
|
size: "18",
|
|
230
230
|
class: "cursor-pointer hover:text-blue-600",
|
|
231
231
|
onClick: u
|
|
@@ -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
|
-
|
|
240
|
+
x[3] || (x[3] = v("span", null, "刷新", -1))
|
|
241
241
|
]),
|
|
242
242
|
_: 1
|
|
243
243
|
})
|
|
@@ -250,22 +250,22 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
250
250
|
]),
|
|
251
251
|
default: o(() => [
|
|
252
252
|
v("div", $t, [
|
|
253
|
-
|
|
254
|
-
Y(
|
|
253
|
+
P.$slots.toolbar ? (g(), H("div", Ot, [
|
|
254
|
+
Y(P.$slots, "toolbar")
|
|
255
255
|
])) : A("", !0),
|
|
256
256
|
c(I, {
|
|
257
257
|
remote: "",
|
|
258
258
|
ref_key: "$table",
|
|
259
259
|
ref: r,
|
|
260
|
-
"checked-row-keys":
|
|
261
|
-
"onUpdate:checkedRowKeys":
|
|
262
|
-
"max-height":
|
|
263
|
-
loading:
|
|
260
|
+
"checked-row-keys": k.value,
|
|
261
|
+
"onUpdate:checkedRowKeys": x[0] || (x[0] = (q) => k.value = q),
|
|
262
|
+
"max-height": b.value,
|
|
263
|
+
loading: l.value,
|
|
264
264
|
bordered: !1,
|
|
265
265
|
"single-line": !1,
|
|
266
|
-
columns:
|
|
266
|
+
columns: y.value,
|
|
267
267
|
data: h.value,
|
|
268
|
-
pagination:
|
|
268
|
+
pagination: T.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
|
])
|
|
@@ -279,7 +279,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
279
279
|
return n.install = function(r) {
|
|
280
280
|
r.component(n.__name, e);
|
|
281
281
|
}, e;
|
|
282
|
-
}, Rt = U(Et), Nt = ["Redirect", "RedirectSon", "login"],
|
|
282
|
+
}, Rt = U(Et), Nt = ["Redirect", "RedirectSon", "login"], ie = ke("p-layout", () => {
|
|
283
283
|
const e = we({
|
|
284
284
|
collapsed: !1,
|
|
285
285
|
title: "输入项目名称",
|
|
@@ -294,14 +294,14 @@ 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((_, w) => (w.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
|
+
(w) => w.fullPath == i.fullPath
|
|
301
301
|
) || e.tabs?.push(i), !0),
|
|
302
302
|
closeCurrentTab: (i) => {
|
|
303
303
|
const _ = e.tabs.findIndex(
|
|
304
|
-
(
|
|
304
|
+
(w) => w.fullPath == i.fullPath
|
|
305
305
|
);
|
|
306
306
|
e.tabs.splice(_, 1);
|
|
307
307
|
},
|
|
@@ -315,18 +315,18 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
315
315
|
},
|
|
316
316
|
closeLeftTabs: (i) => {
|
|
317
317
|
const _ = e.tabs.findIndex(
|
|
318
|
-
(
|
|
318
|
+
(w) => w.fullPath == i.fullPath
|
|
319
319
|
);
|
|
320
320
|
e.tabs = e.tabs.filter(
|
|
321
|
-
(
|
|
321
|
+
(w, M) => M >= _ || (w?.meta?.affix ?? !1)
|
|
322
322
|
);
|
|
323
323
|
},
|
|
324
324
|
closeRightTabs: (i) => {
|
|
325
325
|
const _ = e.tabs.findIndex(
|
|
326
|
-
(
|
|
326
|
+
(w) => w.fullPath == i.fullPath
|
|
327
327
|
);
|
|
328
328
|
e.tabs = e.tabs.filter(
|
|
329
|
-
(
|
|
329
|
+
(w, M) => M <= _ || (w?.meta?.affix ?? !1)
|
|
330
330
|
);
|
|
331
331
|
},
|
|
332
332
|
collapse: () => {
|
|
@@ -354,16 +354,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
354
354
|
}), Bt = { class: "logo" }, zt = /* @__PURE__ */ W({
|
|
355
355
|
__name: "PLogo",
|
|
356
356
|
setup(e) {
|
|
357
|
-
const n =
|
|
357
|
+
const n = ie();
|
|
358
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
|
-
class:
|
|
363
|
+
class: se({ "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
|
}
|
|
@@ -381,36 +381,36 @@ 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 = N(At), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
|
|
385
385
|
return {
|
|
386
|
-
select: async (
|
|
387
|
-
if (e.value.currentLanguage ===
|
|
386
|
+
select: async (s) => {
|
|
387
|
+
if (e.value.currentLanguage === s)
|
|
388
388
|
return;
|
|
389
|
-
const
|
|
390
|
-
(u) => u.key ===
|
|
389
|
+
const y = (await n()).find(
|
|
390
|
+
(u) => u.key === s
|
|
391
391
|
);
|
|
392
|
-
|
|
392
|
+
y && (e.value.currentLanguage = y.key, e.value.selectLanguage(y));
|
|
393
393
|
},
|
|
394
|
-
selectLanguageCallback: async (
|
|
395
|
-
e.value.selectLanguage =
|
|
394
|
+
selectLanguageCallback: async (s) => {
|
|
395
|
+
e.value.selectLanguage = s;
|
|
396
396
|
},
|
|
397
|
-
initLanguagesCallback: async (
|
|
398
|
-
e.value.initLanguages =
|
|
397
|
+
initLanguagesCallback: async (s) => {
|
|
398
|
+
e.value.initLanguages = s;
|
|
399
399
|
},
|
|
400
400
|
getLanguages: n,
|
|
401
401
|
getCurrentLanguage: async () => {
|
|
402
402
|
if (e.value.currentLanguage)
|
|
403
403
|
return (await n()).find(
|
|
404
|
-
(
|
|
404
|
+
(s) => s.key === e.value.currentLanguage
|
|
405
405
|
);
|
|
406
406
|
},
|
|
407
|
-
setTranslationApiUrl: (
|
|
408
|
-
e.value.translationApiUrl =
|
|
407
|
+
setTranslationApiUrl: (s) => {
|
|
408
|
+
e.value.translationApiUrl = s;
|
|
409
409
|
},
|
|
410
410
|
getTranslationApiUrl: () => e.value.translationApiUrl,
|
|
411
411
|
getDefaultLanguage: () => e.value.defaultLanguage ? e.value.defaultLanguage : "chinese_simplified",
|
|
412
|
-
setDefaultLanguage: (
|
|
413
|
-
(
|
|
412
|
+
setDefaultLanguage: (s) => {
|
|
413
|
+
(s === "Chinese" || s === "chinese") && (s = "chinese_simplified"), e.value.defaultLanguage = s;
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
}), It = { key: 1 }, Ae = /* @__PURE__ */ W({
|
|
@@ -421,35 +421,35 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
421
421
|
getLanguages: r,
|
|
422
422
|
getCurrentLanguage: m,
|
|
423
423
|
getDefaultLanguage: d,
|
|
424
|
-
getTranslationApiUrl:
|
|
425
|
-
} = Mt(),
|
|
426
|
-
const
|
|
427
|
-
|
|
424
|
+
getTranslationApiUrl: l
|
|
425
|
+
} = Mt(), k = N(), h = N([]), T = async (s) => await n(s), L = async () => {
|
|
426
|
+
const s = window.translate;
|
|
427
|
+
s && (s.selectLanguageTag.show = !1, s.selectLanguageTag.languages = (await r()).map((y) => y.key).join(","), s.ignore.class.push("ignore-translate-flag"), s.ignore.id.push("ignore-translation"), s.language.setLocal(d()), s.request.api.translate = "api/v1/translation", s.request.api.connectTest = "api/v1/translation/connect-test", s.request.api.init = "api/v1/translation/init", s.request.api.language = "api/v1/translation/language", s.request.setHost(l()), s.request.listener.start(), s.listener.start(), s.whole.enableAll(), s.execute());
|
|
428
428
|
};
|
|
429
|
-
return
|
|
430
|
-
await le(), await
|
|
431
|
-
}), (
|
|
432
|
-
const u =
|
|
433
|
-
return h.value.length > 0 ? (g(),
|
|
429
|
+
return ee(async () => {
|
|
430
|
+
await le(), await L(), k.value = await m(), h.value = await r();
|
|
431
|
+
}), (s, y) => {
|
|
432
|
+
const u = R, $ = ve;
|
|
433
|
+
return h.value.length > 0 ? (g(), C(a(Q), {
|
|
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:
|
|
439
|
+
onSelect: T,
|
|
440
440
|
options: h.value
|
|
441
441
|
}, {
|
|
442
442
|
default: o(() => [
|
|
443
|
-
c(
|
|
443
|
+
c($, {
|
|
444
444
|
quaternary: "",
|
|
445
445
|
type: "info"
|
|
446
446
|
}, {
|
|
447
447
|
default: o(() => [
|
|
448
|
-
|
|
448
|
+
k.value ? (g(), H("label", It, j(k.value?.label), 1)) : (g(), C(u, {
|
|
449
449
|
key: 0,
|
|
450
450
|
size: "18"
|
|
451
451
|
}, {
|
|
452
|
-
default: o(() => [...
|
|
452
|
+
default: o(() => [...y[0] || (y[0] = [
|
|
453
453
|
v("svg", {
|
|
454
454
|
xmlns: "http://www.w3.org/2000/svg",
|
|
455
455
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -484,8 +484,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
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 =
|
|
488
|
-
const
|
|
487
|
+
const n = de(), r = Oe(), m = ie(), d = ce(), l = re(), k = Ne("reloadPage"), h = (i) => d.push({ name: i }), T = V(() => L(l.matched)), L = (i) => i.map((_) => {
|
|
488
|
+
const w = {
|
|
489
489
|
key: _.name,
|
|
490
490
|
label: _.meta.title,
|
|
491
491
|
icon: _.meta.icon,
|
|
@@ -493,11 +493,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
493
493
|
disabled: _.path === "/",
|
|
494
494
|
children: void 0
|
|
495
495
|
};
|
|
496
|
-
return _.children && _.children.length > 0 && (
|
|
496
|
+
return _.children && _.children.length > 0 && (w.children = L(
|
|
497
497
|
_.children
|
|
498
|
-
)),
|
|
499
|
-
}),
|
|
500
|
-
document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(),
|
|
498
|
+
)), w;
|
|
499
|
+
}), s = N(!1), y = () => {
|
|
500
|
+
document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), s.value = !1) : (document.documentElement.requestFullscreen(), s.value = !0);
|
|
501
501
|
}, u = V(() => {
|
|
502
502
|
const i = [];
|
|
503
503
|
return i.push({
|
|
@@ -509,7 +509,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
509
509
|
key: _.route
|
|
510
510
|
});
|
|
511
511
|
}), i;
|
|
512
|
-
}),
|
|
512
|
+
}), $ = (i) => {
|
|
513
513
|
i === "logout" ? D() : d.push({ name: i });
|
|
514
514
|
}, D = () => {
|
|
515
515
|
r.info({
|
|
@@ -534,15 +534,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
534
534
|
});
|
|
535
535
|
};
|
|
536
536
|
return (i, _) => {
|
|
537
|
-
const
|
|
537
|
+
const w = Re, M = We, B = be;
|
|
538
538
|
return g(), H("div", Ht, [
|
|
539
539
|
v("div", Wt, [
|
|
540
540
|
v("div", {
|
|
541
541
|
class: "ml-1 layout-header-trigger layout-header-trigger-min",
|
|
542
542
|
onClick: _[0] || (_[0] = //@ts-ignore
|
|
543
|
-
(...
|
|
543
|
+
(...b) => a(m).collapse && a(m).collapse(...b))
|
|
544
544
|
}, [
|
|
545
|
-
a(m).state.collapsed ? (g(),
|
|
545
|
+
a(m).state.collapsed ? (g(), C(a(R), {
|
|
546
546
|
key: 0,
|
|
547
547
|
size: "18"
|
|
548
548
|
}, {
|
|
@@ -550,7 +550,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
550
550
|
c(a(mt))
|
|
551
551
|
]),
|
|
552
552
|
_: 1
|
|
553
|
-
})) : (g(),
|
|
553
|
+
})) : (g(), C(a(R), {
|
|
554
554
|
key: 1,
|
|
555
555
|
size: "18"
|
|
556
556
|
}, {
|
|
@@ -563,9 +563,9 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
563
563
|
v("div", {
|
|
564
564
|
class: "mr-1 layout-header-trigger layout-header-trigger-min",
|
|
565
565
|
onClick: _[1] || (_[1] = //@ts-ignore
|
|
566
|
-
(...
|
|
566
|
+
(...b) => a(k) && a(k)(...b))
|
|
567
567
|
}, [
|
|
568
|
-
c(a(
|
|
568
|
+
c(a(R), { size: "18" }, {
|
|
569
569
|
default: o(() => [
|
|
570
570
|
c(a(Pe))
|
|
571
571
|
]),
|
|
@@ -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(T.value, (b) => (g(), H(Se, {
|
|
578
|
+
key: b.label
|
|
579
579
|
}, [
|
|
580
|
-
|
|
580
|
+
b.label ? (g(), C(a(He), { key: 0 }, {
|
|
581
581
|
default: o(() => [
|
|
582
|
-
|
|
582
|
+
b.children && b.children.length ? (g(), C(a(Q), {
|
|
583
583
|
key: 0,
|
|
584
|
-
options:
|
|
584
|
+
options: b.children,
|
|
585
585
|
onSelect: h
|
|
586
586
|
}, {
|
|
587
587
|
default: o(() => [
|
|
588
588
|
v("span", Ut, [
|
|
589
|
-
|
|
590
|
-
v("span", null, j(
|
|
589
|
+
b.icon ? (g(), C(he(b.icon), { key: 0 })) : A("", !0),
|
|
590
|
+
v("span", null, j(b.label), 1)
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
_: 2
|
|
594
594
|
}, 1032, ["options"])) : (g(), H("span", jt, [
|
|
595
|
-
|
|
596
|
-
v("span", null, j(
|
|
595
|
+
b.icon ? (g(), C(he(b.icon), { key: 0 })) : A("", !0),
|
|
596
|
+
v("span", null, j(b.label), 1)
|
|
597
597
|
]))
|
|
598
598
|
]),
|
|
599
599
|
_: 2
|
|
@@ -608,14 +608,14 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
608
608
|
c(Ae)
|
|
609
609
|
])) : A("", !0),
|
|
610
610
|
v("div", Kt, [
|
|
611
|
-
c(
|
|
611
|
+
c(w, { placement: "bottom" }, {
|
|
612
612
|
trigger: o(() => [
|
|
613
|
-
c(a(
|
|
613
|
+
c(a(R), {
|
|
614
614
|
size: "18",
|
|
615
|
-
onClick: me(
|
|
615
|
+
onClick: me(y, ["stop"])
|
|
616
616
|
}, {
|
|
617
617
|
default: o(() => [
|
|
618
|
-
|
|
618
|
+
s.value ? (g(), C(a(bt), { key: 1 })) : (g(), C(a(vt), { key: 0 }))
|
|
619
619
|
]),
|
|
620
620
|
_: 1
|
|
621
621
|
})
|
|
@@ -627,16 +627,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
627
627
|
})
|
|
628
628
|
]),
|
|
629
629
|
v("div", Vt, [
|
|
630
|
-
c(a(
|
|
630
|
+
c(a(Q), {
|
|
631
631
|
trigger: "hover",
|
|
632
|
-
onSelect:
|
|
632
|
+
onSelect: $,
|
|
633
633
|
options: u.value
|
|
634
634
|
}, {
|
|
635
635
|
default: o(() => [
|
|
636
636
|
v("div", Yt, [
|
|
637
637
|
v("span", null, j(a(m).state.uname), 1),
|
|
638
638
|
c(M, { vertical: "" }),
|
|
639
|
-
c(
|
|
639
|
+
c(B, {
|
|
640
640
|
round: "",
|
|
641
641
|
src: a(m).state.avatar
|
|
642
642
|
}, null, 8, ["src"])
|
|
@@ -658,11 +658,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
658
658
|
return (n, r) => {
|
|
659
659
|
const m = Be("RouterView");
|
|
660
660
|
return g(), H("div", Zt, [
|
|
661
|
-
e.loading ? A("", !0) : (g(),
|
|
662
|
-
default: o(({ Component: d, route:
|
|
663
|
-
(g(),
|
|
664
|
-
(g(),
|
|
665
|
-
key:
|
|
661
|
+
e.loading ? A("", !0) : (g(), C(m, { key: 0 }, {
|
|
662
|
+
default: o(({ Component: d, route: l }) => [
|
|
663
|
+
(g(), C(rt, null, [
|
|
664
|
+
(g(), C(he(d), {
|
|
665
|
+
key: l.fullPath
|
|
666
666
|
}))
|
|
667
667
|
], 1024))
|
|
668
668
|
]),
|
|
@@ -678,55 +678,55 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
678
678
|
v4a1a98ea: r.value,
|
|
679
679
|
v271d846e: m.value
|
|
680
680
|
}));
|
|
681
|
-
const n = Ue(), r = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d =
|
|
682
|
-
activeKey:
|
|
681
|
+
const n = Ue(), r = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d = de(), l = re(), k = ce(), h = N(null), T = N(null), L = N(!1), s = ie(), y = V(() => s.state.tabs), u = we({
|
|
682
|
+
activeKey: l.fullPath,
|
|
683
683
|
scrollable: !0,
|
|
684
684
|
dropdownX: 0,
|
|
685
685
|
dropdownY: 0,
|
|
686
686
|
showDropdown: !1,
|
|
687
687
|
isMultiHeaderFixed: !0,
|
|
688
688
|
multiTabsSetting: !0
|
|
689
|
-
}),
|
|
690
|
-
const { fullPath: f, hash: p, meta:
|
|
691
|
-
return { fullPath: f, hash: p, meta:
|
|
689
|
+
}), $ = ["Login", "Redirect", "ErrorPage"], D = (t) => {
|
|
690
|
+
const { fullPath: f, hash: p, meta: E, name: K, params: ne, path: oe, query: ue } = t;
|
|
691
|
+
return { fullPath: f, hash: p, meta: E, name: K, params: ne, path: oe, query: ue };
|
|
692
692
|
}, i = V(() => {
|
|
693
|
-
const p =
|
|
693
|
+
const p = s.state.collapsed ? "64px" : "272px";
|
|
694
694
|
return {
|
|
695
695
|
left: p,
|
|
696
696
|
width: `calc(100% - ${p})`
|
|
697
697
|
};
|
|
698
698
|
}), _ = V(() => {
|
|
699
|
-
const t =
|
|
699
|
+
const t = y.value.length <= 1;
|
|
700
700
|
return [
|
|
701
701
|
{
|
|
702
702
|
label: "刷新当前",
|
|
703
703
|
key: "1",
|
|
704
|
-
icon: () => z(
|
|
704
|
+
icon: () => z(R, null, { default: () => z(Pe) })
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
label: "关闭当前",
|
|
708
708
|
key: "2",
|
|
709
|
-
disabled:
|
|
710
|
-
icon: () => z(
|
|
709
|
+
disabled: L.value || t,
|
|
710
|
+
icon: () => z(R, null, { default: () => z($e) })
|
|
711
711
|
},
|
|
712
712
|
{
|
|
713
713
|
label: "关闭其他",
|
|
714
714
|
key: "3",
|
|
715
715
|
disabled: t,
|
|
716
|
-
icon: () => z(
|
|
716
|
+
icon: () => z(R, null, { default: () => z(yt) })
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
719
|
label: "关闭全部",
|
|
720
720
|
key: "4",
|
|
721
721
|
disabled: t,
|
|
722
|
-
icon: () => z(
|
|
722
|
+
icon: () => z(R, null, { default: () => z(wt) })
|
|
723
723
|
}
|
|
724
724
|
];
|
|
725
|
-
}),
|
|
725
|
+
}), w = () => {
|
|
726
726
|
let t = [];
|
|
727
|
-
const f = D(
|
|
727
|
+
const f = D(l);
|
|
728
728
|
try {
|
|
729
|
-
if (
|
|
729
|
+
if (s.state.cacheTabs) {
|
|
730
730
|
const p = localStorage.getItem("TABS_ROUTES");
|
|
731
731
|
t = p ? JSON.parse(p) : [f];
|
|
732
732
|
} else
|
|
@@ -737,56 +737,56 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
737
737
|
return t;
|
|
738
738
|
}
|
|
739
739
|
}, M = (t) => {
|
|
740
|
-
const f =
|
|
740
|
+
const f = k.getRoutes();
|
|
741
741
|
t.forEach((p) => {
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
}),
|
|
745
|
-
},
|
|
746
|
-
const t =
|
|
747
|
-
M(t),
|
|
748
|
-
},
|
|
742
|
+
const E = f.find((K) => K.path === p.path);
|
|
743
|
+
E && (p.meta = E.meta || p.meta, p.name = E.name || p.name);
|
|
744
|
+
}), s.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
|
|
745
|
+
}, B = () => {
|
|
746
|
+
const t = w();
|
|
747
|
+
M(t), s.initTabs(t);
|
|
748
|
+
}, b = async (t) => {
|
|
749
749
|
if (await le(), !h.value) return;
|
|
750
750
|
const f = h.value.offsetWidth, p = h.value.scrollWidth;
|
|
751
751
|
f < p ? (u.scrollable = !0, t && [...h.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((K) => {
|
|
752
752
|
K.id === `tag${u.activeKey.split("/").join("/")}` && K.scrollIntoView && K.scrollIntoView();
|
|
753
753
|
})) : u.scrollable = !1;
|
|
754
|
-
},
|
|
754
|
+
}, Z = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), te = () => {
|
|
755
755
|
let t;
|
|
756
|
-
t = Ct(), t.listenTo(
|
|
757
|
-
},
|
|
756
|
+
t = Ct(), t.listenTo(T.value, () => b(!0));
|
|
757
|
+
}, P = (t) => {
|
|
758
758
|
const { fullPath: f } = t;
|
|
759
|
-
if (f ===
|
|
759
|
+
if (f === l.fullPath || (u.activeKey = f, !t))
|
|
760
760
|
return;
|
|
761
|
-
const { replace: p } =
|
|
761
|
+
const { replace: p } = k;
|
|
762
762
|
toString.call(t), p(t).catch(console.error);
|
|
763
|
-
},
|
|
764
|
-
t.preventDefault(),
|
|
763
|
+
}, x = (t, f) => {
|
|
764
|
+
t.preventDefault(), L.value = f.path === "/home", u.showDropdown = !1, le().then(() => {
|
|
765
765
|
u.showDropdown = !0, u.dropdownX = t.clientX, u.dropdownY = t.clientY;
|
|
766
766
|
});
|
|
767
767
|
}, S = () => {
|
|
768
|
-
if (
|
|
769
|
-
var t =
|
|
770
|
-
(f) => f.name ==
|
|
768
|
+
if (l.meta.keepAlive) {
|
|
769
|
+
var t = k.currentRoute.value.matched.find(
|
|
770
|
+
(f) => f.name == l.name
|
|
771
771
|
);
|
|
772
772
|
t && t.components?.default?.name;
|
|
773
773
|
}
|
|
774
|
-
},
|
|
775
|
-
if (
|
|
774
|
+
}, O = (t) => {
|
|
775
|
+
if (y.value.length === 1)
|
|
776
776
|
return d.warning("这已经是最后一页,不能再关闭了!");
|
|
777
|
-
if (S(),
|
|
778
|
-
const f =
|
|
779
|
-
u.activeKey = f.fullPath,
|
|
777
|
+
if (S(), s.closeCurrentTab(t), u.activeKey === t.fullPath) {
|
|
778
|
+
const f = y.value[Math.max(0, y.value.length - 1)];
|
|
779
|
+
u.activeKey = f.fullPath, k.push(f);
|
|
780
780
|
}
|
|
781
|
-
|
|
781
|
+
b();
|
|
782
782
|
}, I = (t) => {
|
|
783
|
-
const { fullPath: f } = t, p =
|
|
784
|
-
|
|
783
|
+
const { fullPath: f } = t, p = y.value.find((E) => E.fullPath == f);
|
|
784
|
+
O(p);
|
|
785
785
|
}, q = (t) => {
|
|
786
|
-
|
|
787
|
-
},
|
|
788
|
-
|
|
789
|
-
}, X = Ne("reloadPage"),
|
|
786
|
+
s.closeOtherTabs(t), u.activeKey = t.fullPath, k.replace(t.fullPath), b();
|
|
787
|
+
}, G = () => {
|
|
788
|
+
s.closeAllTabs(), b();
|
|
789
|
+
}, X = Ne("reloadPage"), ae = (t) => {
|
|
790
790
|
switch (t) {
|
|
791
791
|
//刷新
|
|
792
792
|
case "1":
|
|
@@ -794,21 +794,21 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
794
794
|
break;
|
|
795
795
|
//关闭
|
|
796
796
|
case "2":
|
|
797
|
-
|
|
797
|
+
O(l);
|
|
798
798
|
break;
|
|
799
799
|
//关闭其他
|
|
800
800
|
case "3":
|
|
801
|
-
q(
|
|
801
|
+
q(l);
|
|
802
802
|
break;
|
|
803
803
|
//关闭所有
|
|
804
804
|
case "4":
|
|
805
|
-
|
|
805
|
+
G();
|
|
806
806
|
break;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
b(), u.showDropdown = !1;
|
|
809
809
|
}, J = (t, f) => {
|
|
810
|
-
const p = h.value.scrollLeft,
|
|
811
|
-
if (h.value && h.value.scrollTo(
|
|
810
|
+
const p = h.value.scrollLeft, E = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
|
|
811
|
+
if (h.value && h.value.scrollTo(E, 0), E !== t)
|
|
812
812
|
return window.requestAnimationFrame(() => J(t, f));
|
|
813
813
|
}, fe = () => {
|
|
814
814
|
const t = h.value.offsetWidth, f = h.value.scrollLeft;
|
|
@@ -818,11 +818,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
818
818
|
}, ge = () => {
|
|
819
819
|
const t = h.value.offsetWidth, f = h.value.scrollWidth, p = h.value.scrollLeft;
|
|
820
820
|
if (f - p <= t) return;
|
|
821
|
-
const
|
|
822
|
-
J(
|
|
821
|
+
const E = f - p > t * 2 ? p + t : f - t;
|
|
822
|
+
J(E, (E - p) / 20);
|
|
823
823
|
};
|
|
824
824
|
return window.addEventListener("beforeunload", () => {
|
|
825
|
-
localStorage.setItem("TABS_ROUTES", JSON.stringify(
|
|
825
|
+
localStorage.setItem("TABS_ROUTES", JSON.stringify(y.value));
|
|
826
826
|
}), window.addEventListener(
|
|
827
827
|
"scroll",
|
|
828
828
|
(t) => {
|
|
@@ -831,26 +831,26 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
831
831
|
},
|
|
832
832
|
!0
|
|
833
833
|
), ze(
|
|
834
|
-
() =>
|
|
834
|
+
() => l.fullPath,
|
|
835
835
|
(t) => {
|
|
836
|
-
|
|
836
|
+
$.includes(l.name) || (u.activeKey = t, s.addTab(D(l)), b(!0));
|
|
837
837
|
},
|
|
838
838
|
{ immediate: !0 }
|
|
839
|
-
),
|
|
839
|
+
), B(), ee(() => te()), (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
843
|
v("div", Qt, [
|
|
844
844
|
v("div", {
|
|
845
845
|
ref_key: "navWrap",
|
|
846
|
-
ref:
|
|
847
|
-
class:
|
|
846
|
+
ref: T,
|
|
847
|
+
class: se(["tabs-card", { "tabs-card-scrollable": u.scrollable }])
|
|
848
848
|
}, [
|
|
849
849
|
v("span", {
|
|
850
|
-
class:
|
|
850
|
+
class: se(["tabs-card-prev", { "tabs-card-prev-hide": !u.scrollable }]),
|
|
851
851
|
onClick: fe
|
|
852
852
|
}, [
|
|
853
|
-
c(a(
|
|
853
|
+
c(a(R), {
|
|
854
854
|
size: "16",
|
|
855
855
|
color: "#515a6e"
|
|
856
856
|
}, {
|
|
@@ -861,10 +861,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
861
861
|
})
|
|
862
862
|
], 2),
|
|
863
863
|
v("span", {
|
|
864
|
-
class:
|
|
864
|
+
class: se(["tabs-card-next", { "tabs-card-next-hide": !u.scrollable }]),
|
|
865
865
|
onClick: ge
|
|
866
866
|
}, [
|
|
867
|
-
c(a(
|
|
867
|
+
c(a(R), {
|
|
868
868
|
size: "16",
|
|
869
869
|
color: "#515a6e"
|
|
870
870
|
}, {
|
|
@@ -880,24 +880,24 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
880
880
|
class: "tabs-card-scroll"
|
|
881
881
|
}, [
|
|
882
882
|
c(a(St), {
|
|
883
|
-
list:
|
|
883
|
+
list: y.value,
|
|
884
884
|
animation: "300",
|
|
885
885
|
"item-key": "fullPath",
|
|
886
886
|
class: "flex",
|
|
887
|
-
move:
|
|
887
|
+
move: Z
|
|
888
888
|
}, {
|
|
889
889
|
item: o(({ element: p }) => [
|
|
890
890
|
v("div", {
|
|
891
891
|
id: `tag${p.fullPath.split("/").join("/")}`,
|
|
892
|
-
class:
|
|
893
|
-
onClick: me((
|
|
894
|
-
onContextmenu: (
|
|
892
|
+
class: se(["tabs-card-scroll-item", { "active-item": u.activeKey === p.fullPath }]),
|
|
893
|
+
onClick: me((E) => P(p), ["stop"]),
|
|
894
|
+
onContextmenu: (E) => x(E, p)
|
|
895
895
|
}, [
|
|
896
896
|
v("span", null, j(p.meta.title), 1),
|
|
897
|
-
p.meta.affix ? A("", !0) : (g(),
|
|
897
|
+
p.meta.affix ? A("", !0) : (g(), C(a(R), {
|
|
898
898
|
key: 0,
|
|
899
899
|
size: "14",
|
|
900
|
-
onClick: me((
|
|
900
|
+
onClick: me((E) => I(p), ["stop"])
|
|
901
901
|
}, {
|
|
902
902
|
default: o(() => [
|
|
903
903
|
c(a($e))
|
|
@@ -911,15 +911,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
911
911
|
], 512)
|
|
912
912
|
], 2),
|
|
913
913
|
v("div", ta, [
|
|
914
|
-
c(a(
|
|
914
|
+
c(a(Q), {
|
|
915
915
|
trigger: "hover",
|
|
916
|
-
onSelect:
|
|
916
|
+
onSelect: ae,
|
|
917
917
|
placement: "bottom-end",
|
|
918
918
|
options: _.value
|
|
919
919
|
}, {
|
|
920
920
|
default: o(() => [
|
|
921
921
|
v("div", aa, [
|
|
922
|
-
c(a(
|
|
922
|
+
c(a(R), {
|
|
923
923
|
size: "16",
|
|
924
924
|
color: "#515a6e"
|
|
925
925
|
}, {
|
|
@@ -933,35 +933,35 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
933
933
|
_: 1
|
|
934
934
|
}, 8, ["options"])
|
|
935
935
|
]),
|
|
936
|
-
c(a(
|
|
936
|
+
c(a(Q), {
|
|
937
937
|
show: u.showDropdown,
|
|
938
938
|
x: u.dropdownX,
|
|
939
939
|
y: u.dropdownY,
|
|
940
940
|
onClickoutside: f[0] || (f[0] = (p) => u.showDropdown = !1),
|
|
941
941
|
placement: "bottom-start",
|
|
942
|
-
onSelect:
|
|
942
|
+
onSelect: ae,
|
|
943
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 =
|
|
951
|
+
const n = re(), r = ce(), m = ie(), d = N(n.name), l = N(
|
|
952
952
|
n.matched && n.matched.length ? n.matched.map((u) => u.name) : []
|
|
953
|
-
),
|
|
953
|
+
), k = N([]), h = (u) => {
|
|
954
954
|
/http(s)?:/.test(u) ? window.open(u) : r.push({ name: u });
|
|
955
|
-
},
|
|
955
|
+
}, T = (u) => {
|
|
956
956
|
if (!u) return;
|
|
957
|
-
const
|
|
958
|
-
|
|
959
|
-
},
|
|
957
|
+
const $ = u.find((D) => l.value.indexOf(D) === -1);
|
|
958
|
+
l.value = $ ? [$] : [];
|
|
959
|
+
}, L = () => {
|
|
960
960
|
const u = n.matched;
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
d.value =
|
|
964
|
-
},
|
|
961
|
+
l.value = u.map((D) => D.name);
|
|
962
|
+
const $ = n.meta?.activeMenu || "";
|
|
963
|
+
d.value = $ || n.name;
|
|
964
|
+
}, s = (u, $ = [], D = !1) => {
|
|
965
965
|
const i = [], _ = [
|
|
966
966
|
"/:path(.*)*",
|
|
967
967
|
"/redirect",
|
|
@@ -971,65 +971,67 @@ 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((w, M) => {
|
|
975
|
+
let B = (M.children?.length ? 1 : 0) - (w.children?.length ? 1 : 0);
|
|
976
|
+
return B === 0 && (B = (w.meta?.sort ?? 0) - (M.meta?.sort ?? 0)), B;
|
|
977
977
|
});
|
|
978
|
-
for (const
|
|
979
|
-
if (D ||
|
|
980
|
-
|
|
978
|
+
for (const w of u) {
|
|
979
|
+
if (D || w.meta?.hidden || _.includes(w.path.toLowerCase())) {
|
|
980
|
+
$.push(w.name), s(w.children || [], $, !0);
|
|
981
981
|
continue;
|
|
982
982
|
}
|
|
983
|
-
const M =
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
meta:
|
|
983
|
+
const M = w.children?.filter(
|
|
984
|
+
(te) => !te.meta?.hidden
|
|
985
|
+
) || [], B = w.meta?.alwaysShow != !0 && M.length === 1, b = B ? M[0] : w, Z = {
|
|
986
|
+
key: b.name,
|
|
987
|
+
label: b.meta?.title,
|
|
988
|
+
affix: b.meta?.affix,
|
|
989
|
+
sort: B ? w.meta?.sort ?? 0 : b.meta?.sort ?? 0,
|
|
990
|
+
path: b.path,
|
|
991
|
+
redirect: b.redirect,
|
|
992
|
+
icon: B ? w.meta?.icon : b.meta?.icon,
|
|
993
|
+
permissions: b.meta?.permissions,
|
|
994
|
+
meta: b.meta,
|
|
993
995
|
children: void 0
|
|
994
996
|
};
|
|
995
|
-
|
|
997
|
+
$.includes(b.name) || (i.push(Z), $.push(b.name)), b.children?.length > 0 && (Z.children = s(b.children, $, D));
|
|
996
998
|
}
|
|
997
999
|
return i;
|
|
998
|
-
},
|
|
1000
|
+
}, y = () => {
|
|
999
1001
|
const u = r.getRoutes();
|
|
1000
|
-
|
|
1002
|
+
k.value = s(u);
|
|
1001
1003
|
};
|
|
1002
1004
|
return ze(
|
|
1003
1005
|
() => n.fullPath,
|
|
1004
1006
|
() => {
|
|
1005
|
-
|
|
1007
|
+
L();
|
|
1006
1008
|
}
|
|
1007
|
-
),
|
|
1008
|
-
|
|
1009
|
-
}), (u,
|
|
1009
|
+
), ee(() => {
|
|
1010
|
+
y(), L();
|
|
1011
|
+
}), (u, $) => (g(), C(a(je), {
|
|
1010
1012
|
class: "h-full",
|
|
1011
1013
|
inverted: "",
|
|
1012
1014
|
mode: "vertical",
|
|
1013
|
-
options:
|
|
1015
|
+
options: k.value,
|
|
1014
1016
|
collapsed: a(m).state.collapsed,
|
|
1015
1017
|
"collapsed-width": 64,
|
|
1016
1018
|
"collapsed-icon-size": 20,
|
|
1017
1019
|
indent: 24,
|
|
1018
|
-
"expanded-keys":
|
|
1020
|
+
"expanded-keys": l.value,
|
|
1019
1021
|
value: d.value,
|
|
1020
1022
|
"onUpdate:value": h,
|
|
1021
|
-
"onUpdate:expandedKeys":
|
|
1023
|
+
"onUpdate:expandedKeys": T
|
|
1022
1024
|
}, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
|
|
1023
1025
|
}
|
|
1024
|
-
}),
|
|
1026
|
+
}), la = { class: "layout-content-main layout-content-main-fix" }, ca = { class: "main-view main-view-fix" }, ra = /* @__PURE__ */ W({
|
|
1025
1027
|
__name: "PLayout",
|
|
1026
1028
|
setup(e) {
|
|
1027
|
-
const n =
|
|
1029
|
+
const n = ie(), r = N(!1);
|
|
1028
1030
|
return ut("reloadPage", () => {
|
|
1029
1031
|
r.value = !0, le(() => r.value = !1);
|
|
1030
|
-
}), (d,
|
|
1031
|
-
const
|
|
1032
|
-
return g(),
|
|
1032
|
+
}), (d, l) => {
|
|
1033
|
+
const k = Ye;
|
|
1034
|
+
return g(), C(a(Le), {
|
|
1033
1035
|
"has-sider": "",
|
|
1034
1036
|
class: "layout",
|
|
1035
1037
|
position: "absolute"
|
|
@@ -1053,7 +1055,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1053
1055
|
c(a(Fe), { vertical: "" }, {
|
|
1054
1056
|
default: o(() => [
|
|
1055
1057
|
c(Dt),
|
|
1056
|
-
c(
|
|
1058
|
+
c(sa)
|
|
1057
1059
|
]),
|
|
1058
1060
|
_: 1
|
|
1059
1061
|
})
|
|
@@ -1070,7 +1072,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1070
1072
|
}),
|
|
1071
1073
|
c(a(Ve), { class: "layout-content layout-default-background" }, {
|
|
1072
1074
|
default: o(() => [
|
|
1073
|
-
v("div",
|
|
1075
|
+
v("div", la, [
|
|
1074
1076
|
c(oa),
|
|
1075
1077
|
v("div", ca, [
|
|
1076
1078
|
c(Gt, { loading: r.value }, null, 8, ["loading"])
|
|
@@ -1079,7 +1081,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1079
1081
|
]),
|
|
1080
1082
|
_: 1
|
|
1081
1083
|
}),
|
|
1082
|
-
c(
|
|
1084
|
+
c(k, {
|
|
1083
1085
|
right: 20,
|
|
1084
1086
|
class: "z-50"
|
|
1085
1087
|
})
|
|
@@ -1094,7 +1096,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1094
1096
|
}), ia = /* @__PURE__ */ F(ra, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
|
|
1095
1097
|
function da(e, n) {
|
|
1096
1098
|
const r = Be("router-view");
|
|
1097
|
-
return g(),
|
|
1099
|
+
return g(), C(r);
|
|
1098
1100
|
}
|
|
1099
1101
|
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha = /* @__PURE__ */ W({
|
|
1100
1102
|
__name: "PApplication",
|
|
@@ -1115,7 +1117,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1115
1117
|
setup(e) {
|
|
1116
1118
|
return (n, r) => {
|
|
1117
1119
|
const m = Xe;
|
|
1118
|
-
return g(),
|
|
1120
|
+
return g(), C(m, {
|
|
1119
1121
|
locale: a(Ze),
|
|
1120
1122
|
theme: e.theme,
|
|
1121
1123
|
"theme-overrides": e.themeOverrides,
|
|
@@ -1160,37 +1162,37 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1160
1162
|
},
|
|
1161
1163
|
emits: ["update:visible", "update:loading"],
|
|
1162
1164
|
setup(e, { expose: n, emit: r }) {
|
|
1163
|
-
const m =
|
|
1164
|
-
|
|
1165
|
+
const m = de(), d = e, l = r, k = async () => {
|
|
1166
|
+
l("update:loading", !0);
|
|
1165
1167
|
try {
|
|
1166
1168
|
d.onSave && await d.onSave() && h();
|
|
1167
|
-
} catch (
|
|
1168
|
-
m.error(
|
|
1169
|
+
} catch (y) {
|
|
1170
|
+
m.error(y.message);
|
|
1169
1171
|
} finally {
|
|
1170
|
-
|
|
1172
|
+
l("update:loading", !1);
|
|
1171
1173
|
}
|
|
1172
1174
|
}, h = () => {
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1175
|
+
l("update:visible", !1), l("update:loading", !1);
|
|
1176
|
+
}, T = async () => {
|
|
1175
1177
|
try {
|
|
1176
1178
|
d.onClose ? await d.onClose() && h() : h();
|
|
1177
|
-
} catch (
|
|
1178
|
-
m.error(
|
|
1179
|
+
} catch (y) {
|
|
1180
|
+
m.error(y.message), l("update:loading", !1);
|
|
1179
1181
|
}
|
|
1180
1182
|
};
|
|
1181
1183
|
return n({
|
|
1182
1184
|
open: () => {
|
|
1183
|
-
|
|
1185
|
+
l("update:visible", !0), l("update:loading", !1);
|
|
1184
1186
|
},
|
|
1185
1187
|
close: () => {
|
|
1186
|
-
|
|
1188
|
+
l("update:visible", !1), l("update:loading", !1);
|
|
1187
1189
|
}
|
|
1188
|
-
}), (
|
|
1189
|
-
const
|
|
1190
|
-
return g(),
|
|
1190
|
+
}), (y, u) => {
|
|
1191
|
+
const $ = at, D = ve, i = _e;
|
|
1192
|
+
return g(), C(a(tt), dt({
|
|
1191
1193
|
ref: "$modal",
|
|
1192
1194
|
preset: "card"
|
|
1193
|
-
},
|
|
1195
|
+
}, y.$attrs, {
|
|
1194
1196
|
"header-class": "bg-gray-50",
|
|
1195
1197
|
show: d.visible,
|
|
1196
1198
|
draggable: !0,
|
|
@@ -1202,7 +1204,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1202
1204
|
onClose: h
|
|
1203
1205
|
}), {
|
|
1204
1206
|
header: o(() => [
|
|
1205
|
-
|
|
1207
|
+
y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : d.title ? (g(), C($, { key: 1 }, {
|
|
1206
1208
|
default: o(() => [
|
|
1207
1209
|
pe(j(e.title), 1)
|
|
1208
1210
|
]),
|
|
@@ -1210,37 +1212,37 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1210
1212
|
})) : A("", !0)
|
|
1211
1213
|
]),
|
|
1212
1214
|
"header-extra": o(() => [
|
|
1213
|
-
Y(
|
|
1215
|
+
Y(y.$slots, "header-extra")
|
|
1214
1216
|
]),
|
|
1215
1217
|
default: o(() => [
|
|
1216
1218
|
v("div", {
|
|
1217
1219
|
class: "overflow-y-auto overflow-hidden mt-5",
|
|
1218
1220
|
style: De({ maxHeight: `${d.height}px` })
|
|
1219
1221
|
}, [
|
|
1220
|
-
Y(
|
|
1222
|
+
Y(y.$slots, "default")
|
|
1221
1223
|
], 4)
|
|
1222
1224
|
]),
|
|
1223
1225
|
footer: o(() => [
|
|
1224
|
-
Y(
|
|
1226
|
+
Y(y.$slots, "footer")
|
|
1225
1227
|
]),
|
|
1226
1228
|
action: o(() => [
|
|
1227
1229
|
c(i, { justify: "end" }, {
|
|
1228
1230
|
default: o(() => [
|
|
1229
|
-
d.hideSaveBtn ? A("", !0) : (g(),
|
|
1231
|
+
d.hideSaveBtn ? A("", !0) : (g(), C(D, {
|
|
1230
1232
|
key: 0,
|
|
1231
1233
|
type: "primary",
|
|
1232
1234
|
loading: e.loading,
|
|
1233
|
-
onClick:
|
|
1235
|
+
onClick: k
|
|
1234
1236
|
}, {
|
|
1235
1237
|
default: o(() => [
|
|
1236
1238
|
pe(j(e.saveBtnText), 1)
|
|
1237
1239
|
]),
|
|
1238
1240
|
_: 1
|
|
1239
1241
|
}, 8, ["loading"])),
|
|
1240
|
-
Y(
|
|
1241
|
-
d.hideCancelBtn ? A("", !0) : (g(),
|
|
1242
|
+
Y(y.$slots, "action-extra", { loading: e.loading }),
|
|
1243
|
+
d.hideCancelBtn ? A("", !0) : (g(), C(D, {
|
|
1242
1244
|
key: 1,
|
|
1243
|
-
onClick:
|
|
1245
|
+
onClick: T,
|
|
1244
1246
|
loading: e.loading
|
|
1245
1247
|
}, {
|
|
1246
1248
|
default: o(() => [
|
|
@@ -1259,7 +1261,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1259
1261
|
}), va = U(_a), ba = U(Ae), ya = W({
|
|
1260
1262
|
name: "Redirect",
|
|
1261
1263
|
setup() {
|
|
1262
|
-
const e =
|
|
1264
|
+
const e = re(), n = ce();
|
|
1263
1265
|
return ft(() => {
|
|
1264
1266
|
const { params: r, query: m } = e, { path: d } = r;
|
|
1265
1267
|
n.replace({
|
|
@@ -1271,28 +1273,28 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1271
1273
|
}), wa = U(ya), Pa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ W({
|
|
1272
1274
|
__name: "PIframe",
|
|
1273
1275
|
setup(e) {
|
|
1274
|
-
const n =
|
|
1276
|
+
const n = re(), r = N(!1), m = N(null), d = N("");
|
|
1275
1277
|
a(n.meta)?.frameSrc && (d.value = a(n.meta)?.frameSrc);
|
|
1276
|
-
function
|
|
1278
|
+
function l() {
|
|
1277
1279
|
r.value = !1;
|
|
1278
1280
|
}
|
|
1279
|
-
function
|
|
1281
|
+
function k() {
|
|
1280
1282
|
le(() => {
|
|
1281
1283
|
const h = a(m);
|
|
1282
1284
|
if (!h) return;
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
|
|
1285
|
+
const T = h;
|
|
1286
|
+
T.attachEvent ? T.attachEvent("onload", () => {
|
|
1287
|
+
l();
|
|
1286
1288
|
}) : h.onload = () => {
|
|
1287
|
-
|
|
1289
|
+
l();
|
|
1288
1290
|
};
|
|
1289
1291
|
});
|
|
1290
1292
|
}
|
|
1291
|
-
return
|
|
1292
|
-
r.value = !0,
|
|
1293
|
-
}), (h,
|
|
1294
|
-
const
|
|
1295
|
-
return g(), L
|
|
1293
|
+
return ee(() => {
|
|
1294
|
+
r.value = !0, k();
|
|
1295
|
+
}), (h, T) => {
|
|
1296
|
+
const L = ot;
|
|
1297
|
+
return g(), C(L, { show: r.value }, {
|
|
1296
1298
|
default: o(() => [
|
|
1297
1299
|
v("div", Pa, [
|
|
1298
1300
|
v("iframe", {
|
|
@@ -1317,26 +1319,26 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1317
1319
|
setup(e) {
|
|
1318
1320
|
const n = e;
|
|
1319
1321
|
return (r, m) => {
|
|
1320
|
-
const d =
|
|
1322
|
+
const d = R, l = be, k = _e, h = Ee;
|
|
1321
1323
|
return g(), H("div", Sa, [
|
|
1322
|
-
n.title ? (g(),
|
|
1324
|
+
n.title ? (g(), C(h, {
|
|
1323
1325
|
key: 0,
|
|
1324
1326
|
class: "mb-4",
|
|
1325
1327
|
bordered: !1,
|
|
1326
1328
|
"content-class": "py-4"
|
|
1327
1329
|
}, {
|
|
1328
1330
|
default: o(() => [
|
|
1329
|
-
c(
|
|
1331
|
+
c(k, {
|
|
1330
1332
|
align: "center",
|
|
1331
1333
|
justify: "space-between"
|
|
1332
1334
|
}, {
|
|
1333
1335
|
default: o(() => [
|
|
1334
|
-
c(
|
|
1336
|
+
c(k, {
|
|
1335
1337
|
align: "center",
|
|
1336
1338
|
size: 16
|
|
1337
1339
|
}, {
|
|
1338
1340
|
default: o(() => [
|
|
1339
|
-
n.icon ? (g(),
|
|
1341
|
+
n.icon ? (g(), C(l, {
|
|
1340
1342
|
key: 0,
|
|
1341
1343
|
size: 48,
|
|
1342
1344
|
class: "bg-linear-to-br from-blue-500 to-indigo-600"
|
|
@@ -1363,7 +1365,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1363
1365
|
]),
|
|
1364
1366
|
_: 1
|
|
1365
1367
|
})) : A("", !0),
|
|
1366
|
-
r.$slots.search ? (g(),
|
|
1368
|
+
r.$slots.search ? (g(), C(h, {
|
|
1367
1369
|
key: 1,
|
|
1368
1370
|
class: "mb-4",
|
|
1369
1371
|
"content-class": "flex flex-row gap-2",
|
|
@@ -1374,7 +1376,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1374
1376
|
]),
|
|
1375
1377
|
_: 3
|
|
1376
1378
|
})) : A("", !0),
|
|
1377
|
-
r.$slots.default ? (g(),
|
|
1379
|
+
r.$slots.default ? (g(), C(h, {
|
|
1378
1380
|
key: 2,
|
|
1379
1381
|
"content-class": "flex flex-row gap-2 p-0!",
|
|
1380
1382
|
bordered: !1
|
|
@@ -1423,22 +1425,22 @@ function Ua(e, n) {
|
|
|
1423
1425
|
const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16"]]), qa = U(za), Fa = U(Ia), Ka = U(ja), Va = ke("app-oidc", () => {
|
|
1424
1426
|
const e = we({});
|
|
1425
1427
|
return {
|
|
1426
|
-
setCallback: (
|
|
1427
|
-
callCallback: async (
|
|
1428
|
-
setError: (
|
|
1429
|
-
callError: async (
|
|
1428
|
+
setCallback: (l) => e.callback = l,
|
|
1429
|
+
callCallback: async (l) => await e.callback?.(l),
|
|
1430
|
+
setError: (l) => e.error = l,
|
|
1431
|
+
callError: async (l, k) => await e.error?.(l, k)
|
|
1430
1432
|
};
|
|
1431
1433
|
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ W({
|
|
1432
1434
|
__name: "POidc",
|
|
1433
1435
|
setup(e) {
|
|
1434
|
-
const n =
|
|
1435
|
-
return
|
|
1436
|
+
const n = ce(), { callCallback: r, callError: m } = Va();
|
|
1437
|
+
return ee(async () => {
|
|
1436
1438
|
try {
|
|
1437
1439
|
await r(n);
|
|
1438
1440
|
} catch (d) {
|
|
1439
1441
|
await m(n, d);
|
|
1440
1442
|
}
|
|
1441
|
-
}), (d,
|
|
1443
|
+
}), (d, l) => (g(), H("div", Ya, [...l[0] || (l[0] = [
|
|
1442
1444
|
v("div", { class: "view-auth-callback-content" }, [
|
|
1443
1445
|
v("div", { class: "view-auth-callback-spinner" }, [
|
|
1444
1446
|
v("span", null, "正在处理登录回调...")
|
|
@@ -1483,6 +1485,6 @@ export {
|
|
|
1483
1485
|
cn as default,
|
|
1484
1486
|
Qa as install,
|
|
1485
1487
|
Mt as useLanguageStore,
|
|
1486
|
-
|
|
1488
|
+
ie as useLayoutStore,
|
|
1487
1489
|
Va as useOidcStore
|
|
1488
1490
|
};
|