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