@chewel611/naive-ui-plus 0.0.36 → 0.0.38
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 +467 -459
- package/dist/index.umd.cjs +1 -1
- package/es/layout/sider/PMenus.vue.js +45 -43
- package/es/modal/PModal.vue.js +46 -40
- package/es/modal/typing.d.ts +3 -0
- package/lib/layout/sider/PMenus.vue.cjs +1 -1
- package/lib/modal/PModal.vue.cjs +1 -1
- package/lib/modal/typing.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useDialog as
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
import { useDialog as Ee, useMessage as de, NCard as Oe, 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 Ue, NDivider as He, useThemeVars as We, 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 H, ref as A, computed as V, unref as a, onMounted as ee, openBlock as g, createBlock as C, withCtx as o, createElementVNode as v, createElementBlock as U, renderSlot as Y, createCommentVNode as D, createVNode as r, toDisplayString as j, h as B, toRaw as Ce, reactive as we, normalizeClass as se, withDirectives as st, vShow as lt, nextTick as le, inject as Ae, Fragment as Se, renderList as rt, resolveDynamicComponent as he, withModifiers as me, resolveComponent as Ne, KeepAlive as ct, useCssVars as it, watch as Be, normalizeStyle as ze, 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 re, useRoute as ce } from "vue-router";
|
|
6
6
|
import Ct from "element-resize-detector";
|
|
7
7
|
import St from "vuedraggable";
|
|
8
|
-
const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" },
|
|
8
|
+
const Tt = { 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({
|
|
12
12
|
__name: "PTable",
|
|
13
13
|
props: {
|
|
14
14
|
title: {},
|
|
@@ -20,26 +20,26 @@ 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
|
|
23
|
+
const c = A(null), m = Ee(), d = de(), l = A(!1), k = A([]), h = A([]), T = 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
|
+
T.value.page = P, await N();
|
|
31
31
|
},
|
|
32
|
-
onUpdatePageSize: async (
|
|
33
|
-
|
|
32
|
+
onUpdatePageSize: async (P) => {
|
|
33
|
+
T.value.pageSize = P, await N();
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
36
|
-
const
|
|
35
|
+
}), L = e, s = (P) => {
|
|
36
|
+
const x = (S) => {
|
|
37
37
|
const E = [];
|
|
38
|
-
return
|
|
38
|
+
return P && P.forEach((I) => {
|
|
39
39
|
I.key !== "edit" && I.key !== "delete" && E.push({
|
|
40
40
|
label: I.name,
|
|
41
41
|
key: I.key,
|
|
42
|
-
icon: I.icon && (() =>
|
|
42
|
+
icon: I.icon && (() => B(R, null, { default: () => B(I.icon) })),
|
|
43
43
|
props: { onClick: () => I.action(S) }
|
|
44
44
|
});
|
|
45
45
|
}), E;
|
|
@@ -51,91 +51,91 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
51
51
|
fixed: "right",
|
|
52
52
|
render: (S) => {
|
|
53
53
|
let E = [];
|
|
54
|
-
if (
|
|
54
|
+
if (L.onEdit && E.push({
|
|
55
55
|
label: "编辑",
|
|
56
56
|
key: "edit",
|
|
57
|
-
icon: () =>
|
|
58
|
-
props: { onClick: async () => await
|
|
59
|
-
}),
|
|
57
|
+
icon: () => B(R, null, { default: () => B(ht) }),
|
|
58
|
+
props: { onClick: async () => await L.onEdit(S) }
|
|
59
|
+
}), L.onDelete && E.push({
|
|
60
60
|
label: "删除",
|
|
61
61
|
key: "delete",
|
|
62
|
-
icon: () =>
|
|
63
|
-
props: { onClick: () =>
|
|
64
|
-
}), E = [...E, ...
|
|
65
|
-
return
|
|
66
|
-
|
|
62
|
+
icon: () => B(R, null, { default: () => B(Te) }),
|
|
63
|
+
props: { onClick: () => $(S) }
|
|
64
|
+
}), E = [...E, ...x(S)], !(E.length <= 0))
|
|
65
|
+
return B(
|
|
66
|
+
Q,
|
|
67
67
|
{
|
|
68
68
|
options: E,
|
|
69
69
|
placement: "bottom-start"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
default: () =>
|
|
72
|
+
default: () => B(
|
|
73
73
|
ve,
|
|
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
|
|
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
|
-
})),
|
|
89
|
+
})), x = L.columns.reduce(
|
|
90
90
|
(S, E) => E.key === "action" ? E : 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 N(), $ = (P) => i([P]), z = () => {
|
|
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) ? (N(), 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), N = 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(c);
|
|
135
|
+
if (!P) return;
|
|
136
|
+
const x = P?.$el, S = x.querySelector(".n-data-table-thead "), { bottomIncludeBody: E } = 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,101 +143,101 @@ 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 E - (I + q +
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
146
|
+
return E - (I + q + G);
|
|
147
|
+
}), Z = (P) => !P || !P.getBoundingClientRect ? 0 : P.getBoundingClientRect(), te = (P) => {
|
|
148
|
+
const x = document.documentElement, S = x.scrollLeft, E = 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 || E) - (q || 0), O = J + G, K = fe + X, ne = O - 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 N()), n({
|
|
164
164
|
getData: M,
|
|
165
|
-
getSelectedRow:
|
|
165
|
+
getSelectedRow: w,
|
|
166
166
|
getSelectedRows: _,
|
|
167
|
-
refreshData:
|
|
167
|
+
refreshData: N,
|
|
168
168
|
resetPage: () => {
|
|
169
|
-
|
|
169
|
+
T.value.page = 1;
|
|
170
170
|
}
|
|
171
|
-
}), (
|
|
171
|
+
}), (P, x) => {
|
|
172
172
|
const S = Re, E = _e, I = Me;
|
|
173
|
-
return g(),
|
|
173
|
+
return g(), C(a(Oe), { bordered: !1 }, {
|
|
174
174
|
header: o(() => [
|
|
175
|
-
|
|
175
|
+
r(E, {
|
|
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
|
-
|
|
182
|
+
r(E, 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
|
-
|
|
189
|
+
r(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
|
+
r(a(gt))
|
|
196
196
|
]),
|
|
197
197
|
_: 1
|
|
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
|
-
})) :
|
|
205
|
-
|
|
204
|
+
})) : D("", !0),
|
|
205
|
+
L.onDelete ? (g(), C(S, {
|
|
206
206
|
key: 1,
|
|
207
207
|
trigger: "hover"
|
|
208
208
|
}, {
|
|
209
209
|
trigger: o(() => [
|
|
210
|
-
|
|
210
|
+
r(a(R), {
|
|
211
211
|
size: "18",
|
|
212
212
|
class: "mr-1 cursor-pointer hover:text-blue-600",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: z
|
|
214
214
|
}, {
|
|
215
215
|
default: o(() => [
|
|
216
|
-
|
|
216
|
+
r(a(Te))
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
})
|
|
220
220
|
]),
|
|
221
221
|
default: o(() => [
|
|
222
|
-
|
|
222
|
+
x[2] || (x[2] = v("span", null, "删除", -1))
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
|
-
})) :
|
|
226
|
-
|
|
225
|
+
})) : D("", !0),
|
|
226
|
+
r(S, { trigger: "hover" }, {
|
|
227
227
|
trigger: o(() => [
|
|
228
|
-
|
|
228
|
+
r(a(R), {
|
|
229
229
|
size: "18",
|
|
230
230
|
class: "cursor-pointer hover:text-blue-600",
|
|
231
231
|
onClick: u
|
|
232
232
|
}, {
|
|
233
233
|
default: o(() => [
|
|
234
|
-
|
|
234
|
+
r(a(Pe))
|
|
235
235
|
]),
|
|
236
236
|
_: 1
|
|
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(
|
|
255
|
-
])) :
|
|
256
|
-
|
|
253
|
+
P.$slots.toolbar ? (g(), U("div", Et, [
|
|
254
|
+
Y(P.$slots, "toolbar")
|
|
255
|
+
])) : D("", !0),
|
|
256
|
+
r(I, {
|
|
257
257
|
remote: "",
|
|
258
258
|
ref_key: "$table",
|
|
259
|
-
ref:
|
|
260
|
-
"checked-row-keys":
|
|
261
|
-
"onUpdate:checkedRowKeys":
|
|
262
|
-
"max-height":
|
|
263
|
-
loading:
|
|
259
|
+
ref: c,
|
|
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
|
])
|
|
@@ -274,12 +274,12 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
274
274
|
});
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
}),
|
|
277
|
+
}), W = (e) => {
|
|
278
278
|
const n = e;
|
|
279
|
-
return n.install = function(
|
|
280
|
-
|
|
279
|
+
return n.install = function(c) {
|
|
280
|
+
c.component(n.__name, e);
|
|
281
281
|
}, e;
|
|
282
|
-
}, Rt =
|
|
282
|
+
}, Rt = W(Ot), At = ["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
|
-
addTab: (i) =>
|
|
300
|
-
(
|
|
299
|
+
addTab: (i) => At.includes(i.name) ? !1 : (e.tabs?.some(
|
|
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: () => {
|
|
@@ -351,28 +351,28 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
351
351
|
e.enableLanguage = i;
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
}),
|
|
354
|
+
}), Nt = { class: "logo" }, Bt = /* @__PURE__ */ H({
|
|
355
355
|
__name: "PLogo",
|
|
356
356
|
setup(e) {
|
|
357
|
-
const n =
|
|
358
|
-
return (
|
|
359
|
-
|
|
357
|
+
const n = ie();
|
|
358
|
+
return (c, m) => (g(), U("div", Nt, [
|
|
359
|
+
r(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
|
}
|
|
370
370
|
}), F = (e, n) => {
|
|
371
|
-
const
|
|
371
|
+
const c = e.__vccOpts || e;
|
|
372
372
|
for (const [m, d] of n)
|
|
373
|
-
|
|
374
|
-
return
|
|
375
|
-
},
|
|
373
|
+
c[m] = d;
|
|
374
|
+
return c;
|
|
375
|
+
}, zt = /* @__PURE__ */ F(Bt, [["__scopeId", "data-v-e48aeefa"]]), Dt = {
|
|
376
376
|
translationApiUrl: "https://translate.zvo.cn/api",
|
|
377
377
|
defaultLanguage: "chinese",
|
|
378
378
|
currentLanguage: "",
|
|
@@ -381,75 +381,75 @@ 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 = A(Dt), 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
|
-
}), It = { key: 1 },
|
|
416
|
+
}), It = { key: 1 }, De = /* @__PURE__ */ H({
|
|
417
417
|
__name: "PLanguage",
|
|
418
418
|
setup(e) {
|
|
419
419
|
const {
|
|
420
420
|
select: n,
|
|
421
|
-
getLanguages:
|
|
421
|
+
getLanguages: c,
|
|
422
422
|
getCurrentLanguage: m,
|
|
423
423
|
getDefaultLanguage: d,
|
|
424
|
-
getTranslationApiUrl:
|
|
425
|
-
} = Mt(),
|
|
426
|
-
const
|
|
427
|
-
|
|
424
|
+
getTranslationApiUrl: l
|
|
425
|
+
} = Mt(), k = A(), h = A([]), T = async (s) => await n(s), L = async () => {
|
|
426
|
+
const s = window.translate;
|
|
427
|
+
s && (s.selectLanguageTag.show = !1, s.selectLanguageTag.languages = (await c()).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 c();
|
|
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
|
-
|
|
443
|
+
r($, {
|
|
444
444
|
quaternary: "",
|
|
445
445
|
type: "info"
|
|
446
446
|
}, {
|
|
447
447
|
default: o(() => [
|
|
448
|
-
|
|
448
|
+
k.value ? (g(), U("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",
|
|
@@ -472,20 +472,20 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
472
472
|
})
|
|
473
473
|
]),
|
|
474
474
|
_: 1
|
|
475
|
-
}, 8, ["options"])) :
|
|
475
|
+
}, 8, ["options"])) : D("", !0);
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
}),
|
|
478
|
+
}), Ut = { class: "layout-header" }, Ht = { class: "layout-header-left" }, Wt = { class: "link-text" }, jt = {
|
|
479
479
|
key: 1,
|
|
480
480
|
class: "link-text"
|
|
481
481
|
}, qt = { class: "layout-header-right" }, Ft = {
|
|
482
482
|
key: 0,
|
|
483
483
|
class: "layout-header-trigger-min"
|
|
484
|
-
}, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Vt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */
|
|
484
|
+
}, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Vt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */ H({
|
|
485
485
|
__name: "PHeader",
|
|
486
486
|
setup(e) {
|
|
487
|
-
const n =
|
|
488
|
-
const
|
|
487
|
+
const n = de(), c = Ee(), m = ie(), d = re(), l = ce(), k = Ae("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 = A(!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,10 +509,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
509
509
|
key: _.route
|
|
510
510
|
});
|
|
511
511
|
}), i;
|
|
512
|
-
}),
|
|
513
|
-
i === "logout" ?
|
|
514
|
-
},
|
|
515
|
-
|
|
512
|
+
}), $ = (i) => {
|
|
513
|
+
i === "logout" ? z() : d.push({ name: i });
|
|
514
|
+
}, z = () => {
|
|
515
|
+
c.info({
|
|
516
516
|
title: "提示",
|
|
517
517
|
content: "您确定要退出登录吗",
|
|
518
518
|
positiveText: "确定",
|
|
@@ -534,28 +534,28 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
534
534
|
});
|
|
535
535
|
};
|
|
536
536
|
return (i, _) => {
|
|
537
|
-
const
|
|
538
|
-
return g(),
|
|
539
|
-
v("div",
|
|
537
|
+
const w = Re, M = He, N = be;
|
|
538
|
+
return g(), U("div", Ut, [
|
|
539
|
+
v("div", Ht, [
|
|
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
|
}, {
|
|
549
549
|
default: o(() => [
|
|
550
|
-
|
|
550
|
+
r(a(mt))
|
|
551
551
|
]),
|
|
552
552
|
_: 1
|
|
553
|
-
})) : (g(),
|
|
553
|
+
})) : (g(), C(a(R), {
|
|
554
554
|
key: 1,
|
|
555
555
|
size: "18"
|
|
556
556
|
}, {
|
|
557
557
|
default: o(() => [
|
|
558
|
-
|
|
558
|
+
r(a(_t))
|
|
559
559
|
]),
|
|
560
560
|
_: 1
|
|
561
561
|
}))
|
|
@@ -563,59 +563,59 @@ 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
|
-
|
|
568
|
+
r(a(R), { size: "18" }, {
|
|
569
569
|
default: o(() => [
|
|
570
|
-
|
|
570
|
+
r(a(Pe))
|
|
571
571
|
]),
|
|
572
572
|
_: 1
|
|
573
573
|
})
|
|
574
574
|
]),
|
|
575
|
-
|
|
575
|
+
r(a(Ie), null, {
|
|
576
576
|
default: o(() => [
|
|
577
|
-
(g(!0),
|
|
578
|
-
key:
|
|
577
|
+
(g(!0), U(Se, null, rt(T.value, (b) => (g(), U(Se, {
|
|
578
|
+
key: b.label
|
|
579
579
|
}, [
|
|
580
|
-
|
|
580
|
+
b.label ? (g(), C(a(Ue), { 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
|
-
v("span",
|
|
589
|
-
|
|
590
|
-
v("span", null, j(
|
|
588
|
+
v("span", Wt, [
|
|
589
|
+
b.icon ? (g(), C(he(b.icon), { key: 0 })) : D("", !0),
|
|
590
|
+
v("span", null, j(b.label), 1)
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
_: 2
|
|
594
|
-
}, 1032, ["options"])) : (g(),
|
|
595
|
-
|
|
596
|
-
v("span", null, j(
|
|
594
|
+
}, 1032, ["options"])) : (g(), U("span", jt, [
|
|
595
|
+
b.icon ? (g(), C(he(b.icon), { key: 0 })) : D("", !0),
|
|
596
|
+
v("span", null, j(b.label), 1)
|
|
597
597
|
]))
|
|
598
598
|
]),
|
|
599
599
|
_: 2
|
|
600
|
-
}, 1024)) :
|
|
600
|
+
}, 1024)) : D("", !0)
|
|
601
601
|
], 64))), 128))
|
|
602
602
|
]),
|
|
603
603
|
_: 1
|
|
604
604
|
})
|
|
605
605
|
]),
|
|
606
606
|
v("div", qt, [
|
|
607
|
-
a(m).state.enableLanguage ? (g(),
|
|
608
|
-
|
|
609
|
-
])) :
|
|
607
|
+
a(m).state.enableLanguage ? (g(), U("div", Ft, [
|
|
608
|
+
r(De)
|
|
609
|
+
])) : D("", !0),
|
|
610
610
|
v("div", Kt, [
|
|
611
|
-
|
|
611
|
+
r(w, { placement: "bottom" }, {
|
|
612
612
|
trigger: o(() => [
|
|
613
|
-
|
|
613
|
+
r(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
|
-
|
|
630
|
+
r(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
|
-
|
|
639
|
-
|
|
638
|
+
r(M, { vertical: "" }),
|
|
639
|
+
r(N, {
|
|
640
640
|
round: "",
|
|
641
641
|
src: a(m).state.avatar
|
|
642
642
|
}, null, 8, ["src"])
|
|
@@ -649,20 +649,20 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
649
649
|
]);
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
}), Jt = /* @__PURE__ */ F(Xt, [["__scopeId", "data-v-563e4e55"]]), Zt = { class: "mt-1" }, Gt = /* @__PURE__ */
|
|
652
|
+
}), Jt = /* @__PURE__ */ F(Xt, [["__scopeId", "data-v-563e4e55"]]), Zt = { class: "mt-1" }, Gt = /* @__PURE__ */ H({
|
|
653
653
|
__name: "PContent",
|
|
654
654
|
props: {
|
|
655
655
|
loading: { type: Boolean, default: !1 }
|
|
656
656
|
},
|
|
657
657
|
setup(e) {
|
|
658
|
-
return (n,
|
|
659
|
-
const m =
|
|
660
|
-
return g(),
|
|
661
|
-
e.loading ?
|
|
662
|
-
default: o(({ Component: d, route:
|
|
663
|
-
(g(),
|
|
664
|
-
(g(),
|
|
665
|
-
key:
|
|
658
|
+
return (n, c) => {
|
|
659
|
+
const m = Ne("RouterView");
|
|
660
|
+
return g(), U("div", Zt, [
|
|
661
|
+
e.loading ? D("", !0) : (g(), C(m, { key: 0 }, {
|
|
662
|
+
default: o(({ Component: d, route: l }) => [
|
|
663
|
+
(g(), C(ct, null, [
|
|
664
|
+
(g(), C(he(d), {
|
|
665
|
+
key: l.fullPath
|
|
666
666
|
}))
|
|
667
667
|
], 1024))
|
|
668
668
|
]),
|
|
@@ -671,62 +671,62 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
671
671
|
]);
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
|
-
}), Qt = { class: "tabs-view-main" }, ea = ["id", "onClick", "onContextmenu"], ta = { class: "tabs-close" }, aa = { class: "tabs-close-btn" }, na = /* @__PURE__ */
|
|
674
|
+
}), Qt = { class: "tabs-view-main" }, ea = ["id", "onClick", "onContextmenu"], ta = { class: "tabs-close" }, aa = { class: "tabs-close-btn" }, na = /* @__PURE__ */ H({
|
|
675
675
|
__name: "PTabs",
|
|
676
676
|
setup(e) {
|
|
677
677
|
it((t) => ({
|
|
678
|
-
v4a1a98ea:
|
|
678
|
+
v4a1a98ea: c.value,
|
|
679
679
|
v271d846e: m.value
|
|
680
680
|
}));
|
|
681
|
-
const n =
|
|
682
|
-
activeKey:
|
|
681
|
+
const n = We(), c = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d = de(), l = ce(), k = re(), h = A(null), T = A(null), L = A(!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"], z = (t) => {
|
|
690
|
+
const { fullPath: f, hash: p, meta: O, name: K, params: ne, path: oe, query: ue } = t;
|
|
691
|
+
return { fullPath: f, hash: p, meta: O, 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: () =>
|
|
704
|
+
icon: () => B(R, null, { default: () => B(Pe) })
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
label: "关闭当前",
|
|
708
708
|
key: "2",
|
|
709
|
-
disabled:
|
|
710
|
-
icon: () =>
|
|
709
|
+
disabled: L.value || t,
|
|
710
|
+
icon: () => B(R, null, { default: () => B($e) })
|
|
711
711
|
},
|
|
712
712
|
{
|
|
713
713
|
label: "关闭其他",
|
|
714
714
|
key: "3",
|
|
715
715
|
disabled: t,
|
|
716
|
-
icon: () =>
|
|
716
|
+
icon: () => B(R, null, { default: () => B(yt) })
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
719
|
label: "关闭全部",
|
|
720
720
|
key: "4",
|
|
721
721
|
disabled: t,
|
|
722
|
-
icon: () =>
|
|
722
|
+
icon: () => B(R, null, { default: () => B(wt) })
|
|
723
723
|
}
|
|
724
724
|
];
|
|
725
|
-
}),
|
|
725
|
+
}), w = () => {
|
|
726
726
|
let t = [];
|
|
727
|
-
const f =
|
|
727
|
+
const f = z(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 O = f.find((K) => K.path === p.path);
|
|
743
|
+
O && (p.meta = O.meta || p.meta, p.name = O.name || p.name);
|
|
744
|
+
}), s.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
|
|
745
|
+
}, N = () => {
|
|
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
774
|
}, E = (t) => {
|
|
775
|
-
if (
|
|
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 =
|
|
783
|
+
const { fullPath: f } = t, p = y.value.find((O) => O.fullPath == f);
|
|
784
784
|
E(p);
|
|
785
785
|
}, q = (t) => {
|
|
786
|
-
|
|
787
|
-
},
|
|
788
|
-
|
|
789
|
-
}, X =
|
|
786
|
+
s.closeOtherTabs(t), u.activeKey = t.fullPath, k.replace(t.fullPath), b();
|
|
787
|
+
}, G = () => {
|
|
788
|
+
s.closeAllTabs(), b();
|
|
789
|
+
}, X = Ae("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
|
-
E(
|
|
797
|
+
E(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, O = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
|
|
811
|
+
if (h.value && h.value.scrollTo(O, 0), O !== 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 O = f - p > t * 2 ? p + t : f - t;
|
|
822
|
+
J(O, (O - 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) => {
|
|
@@ -830,46 +830,46 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
830
830
|
u.isMultiHeaderFixed = f >= 64;
|
|
831
831
|
},
|
|
832
832
|
!0
|
|
833
|
-
),
|
|
834
|
-
() =>
|
|
833
|
+
), Be(
|
|
834
|
+
() => l.fullPath,
|
|
835
835
|
(t) => {
|
|
836
|
-
|
|
836
|
+
$.includes(l.name) || (u.activeKey = t, s.addTab(z(l)), b(!0));
|
|
837
837
|
},
|
|
838
838
|
{ immediate: !0 }
|
|
839
|
-
),
|
|
839
|
+
), N(), ee(() => te()), (t, f) => (g(), U("div", {
|
|
840
840
|
class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
|
|
841
|
-
style:
|
|
841
|
+
style: ze(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
|
-
|
|
853
|
+
r(a(R), {
|
|
854
854
|
size: "16",
|
|
855
855
|
color: "#515a6e"
|
|
856
856
|
}, {
|
|
857
857
|
default: o(() => [
|
|
858
|
-
|
|
858
|
+
r(a(Pt))
|
|
859
859
|
]),
|
|
860
860
|
_: 1
|
|
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
|
-
|
|
867
|
+
r(a(R), {
|
|
868
868
|
size: "16",
|
|
869
869
|
color: "#515a6e"
|
|
870
870
|
}, {
|
|
871
871
|
default: o(() => [
|
|
872
|
-
|
|
872
|
+
r(a(kt))
|
|
873
873
|
]),
|
|
874
874
|
_: 1
|
|
875
875
|
})
|
|
@@ -879,28 +879,28 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
879
879
|
ref: h,
|
|
880
880
|
class: "tabs-card-scroll"
|
|
881
881
|
}, [
|
|
882
|
-
|
|
883
|
-
list:
|
|
882
|
+
r(a(St), {
|
|
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((O) => P(p), ["stop"]),
|
|
894
|
+
onContextmenu: (O) => x(O, p)
|
|
895
895
|
}, [
|
|
896
896
|
v("span", null, j(p.meta.title), 1),
|
|
897
|
-
p.meta.affix ?
|
|
897
|
+
p.meta.affix ? D("", !0) : (g(), C(a(R), {
|
|
898
898
|
key: 0,
|
|
899
899
|
size: "14",
|
|
900
|
-
onClick: me((
|
|
900
|
+
onClick: me((O) => I(p), ["stop"])
|
|
901
901
|
}, {
|
|
902
902
|
default: o(() => [
|
|
903
|
-
|
|
903
|
+
r(a($e))
|
|
904
904
|
]),
|
|
905
905
|
_: 1
|
|
906
906
|
}, 8, ["onClick"]))
|
|
@@ -911,20 +911,20 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
911
911
|
], 512)
|
|
912
912
|
], 2),
|
|
913
913
|
v("div", ta, [
|
|
914
|
-
|
|
914
|
+
r(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
|
-
|
|
922
|
+
r(a(R), {
|
|
923
923
|
size: "16",
|
|
924
924
|
color: "#515a6e"
|
|
925
925
|
}, {
|
|
926
926
|
default: o(() => [
|
|
927
|
-
|
|
927
|
+
r(a(xt))
|
|
928
928
|
]),
|
|
929
929
|
_: 1
|
|
930
930
|
})
|
|
@@ -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
|
-
|
|
936
|
+
r(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__ */ H({
|
|
949
949
|
__name: "PMenus",
|
|
950
950
|
setup(e) {
|
|
951
|
-
const n = ce(),
|
|
951
|
+
const n = ce(), c = re(), m = ie(), d = A(n.name), l = A(
|
|
952
952
|
n.matched && n.matched.length ? n.matched.map((u) => u.name) : []
|
|
953
|
-
),
|
|
954
|
-
/http(s)?:/.test(u) ? window.open(u) :
|
|
955
|
-
},
|
|
953
|
+
), k = A([]), h = (u) => {
|
|
954
|
+
/http(s)?:/.test(u) ? window.open(u) : c.push({ name: u });
|
|
955
|
+
}, T = (u) => {
|
|
956
956
|
if (!u) return;
|
|
957
|
-
const
|
|
958
|
-
|
|
959
|
-
},
|
|
957
|
+
const $ = u.find((z) => l.value.indexOf(z) === -1);
|
|
958
|
+
l.value = $ ? [$] : [];
|
|
959
|
+
}, L = () => {
|
|
960
960
|
const u = n.matched;
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
d.value =
|
|
964
|
-
},
|
|
961
|
+
l.value = u.map((z) => z.name);
|
|
962
|
+
const $ = n.meta?.activeMenu || "";
|
|
963
|
+
d.value = $ || n.name;
|
|
964
|
+
}, s = (u, $ = [], z = !1) => {
|
|
965
965
|
const i = [], _ = [
|
|
966
966
|
"/:path(.*)*",
|
|
967
967
|
"/redirect",
|
|
@@ -971,71 +971,73 @@ 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 N = (M.children?.length ? 1 : 0) - (w.children?.length ? 1 : 0);
|
|
976
|
+
return N === 0 && (N = (w.meta?.sort ?? 0) - (M.meta?.sort ?? 0)), N;
|
|
977
977
|
});
|
|
978
|
-
for (const
|
|
979
|
-
if (
|
|
980
|
-
|
|
978
|
+
for (const w of u) {
|
|
979
|
+
if (z || 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
|
+
) || [], N = w.meta?.alwaysShow != !0 && M.length === 1, b = N ? M[0] : w, Z = {
|
|
986
|
+
key: b.name,
|
|
987
|
+
label: b.meta?.title,
|
|
988
|
+
affix: b.meta?.affix,
|
|
989
|
+
sort: N ? w.meta?.sort ?? 0 : b.meta?.sort ?? 0,
|
|
990
|
+
path: b.path,
|
|
991
|
+
redirect: b.redirect,
|
|
992
|
+
icon: N ? 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, $, z));
|
|
996
998
|
}
|
|
997
999
|
return i;
|
|
998
|
-
},
|
|
999
|
-
const u =
|
|
1000
|
-
|
|
1000
|
+
}, y = () => {
|
|
1001
|
+
const u = c.getRoutes();
|
|
1002
|
+
k.value = s(u);
|
|
1001
1003
|
};
|
|
1002
|
-
return
|
|
1004
|
+
return Be(
|
|
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" }, ra = { class: "main-view main-view-fix" }, ca = /* @__PURE__ */ H({
|
|
1025
1027
|
__name: "PLayout",
|
|
1026
1028
|
setup(e) {
|
|
1027
|
-
const n =
|
|
1029
|
+
const n = ie(), c = A(!1);
|
|
1028
1030
|
return ut("reloadPage", () => {
|
|
1029
|
-
|
|
1030
|
-
}), (d,
|
|
1031
|
-
const
|
|
1032
|
-
return g(),
|
|
1031
|
+
c.value = !0, le(() => c.value = !1);
|
|
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"
|
|
1036
1038
|
}, {
|
|
1037
1039
|
default: o(() => [
|
|
1038
|
-
|
|
1040
|
+
r(a(qe), {
|
|
1039
1041
|
class: "layout-sider",
|
|
1040
1042
|
inverted: "",
|
|
1041
1043
|
"show-trigger": "bar",
|
|
@@ -1050,36 +1052,36 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1050
1052
|
onExpand: a(n).collapse
|
|
1051
1053
|
}, {
|
|
1052
1054
|
default: o(() => [
|
|
1053
|
-
|
|
1055
|
+
r(a(Fe), { vertical: "" }, {
|
|
1054
1056
|
default: o(() => [
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
+
r(zt),
|
|
1058
|
+
r(sa)
|
|
1057
1059
|
]),
|
|
1058
1060
|
_: 1
|
|
1059
1061
|
})
|
|
1060
1062
|
]),
|
|
1061
1063
|
_: 1
|
|
1062
1064
|
}, 8, ["collapsed", "onCollapse", "onExpand"]),
|
|
1063
|
-
|
|
1065
|
+
r(a(Le), null, {
|
|
1064
1066
|
default: o(() => [
|
|
1065
|
-
|
|
1067
|
+
r(a(Ke), { position: "absolute" }, {
|
|
1066
1068
|
default: o(() => [
|
|
1067
|
-
|
|
1069
|
+
r(Jt)
|
|
1068
1070
|
]),
|
|
1069
1071
|
_: 1
|
|
1070
1072
|
}),
|
|
1071
|
-
|
|
1073
|
+
r(a(Ve), { class: "layout-content layout-default-background" }, {
|
|
1072
1074
|
default: o(() => [
|
|
1073
|
-
v("div",
|
|
1074
|
-
|
|
1075
|
-
v("div",
|
|
1076
|
-
|
|
1075
|
+
v("div", la, [
|
|
1076
|
+
r(oa),
|
|
1077
|
+
v("div", ra, [
|
|
1078
|
+
r(Gt, { loading: c.value }, null, 8, ["loading"])
|
|
1077
1079
|
])
|
|
1078
1080
|
])
|
|
1079
1081
|
]),
|
|
1080
1082
|
_: 1
|
|
1081
1083
|
}),
|
|
1082
|
-
|
|
1084
|
+
r(k, {
|
|
1083
1085
|
right: 20,
|
|
1084
1086
|
class: "z-50"
|
|
1085
1087
|
})
|
|
@@ -1091,12 +1093,12 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
|
|
|
1091
1093
|
});
|
|
1092
1094
|
};
|
|
1093
1095
|
}
|
|
1094
|
-
}), ia = /* @__PURE__ */ F(
|
|
1096
|
+
}), ia = /* @__PURE__ */ F(ca, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
|
|
1095
1097
|
function da(e, n) {
|
|
1096
|
-
const
|
|
1097
|
-
return g(),
|
|
1098
|
+
const c = Ne("router-view");
|
|
1099
|
+
return g(), C(c);
|
|
1098
1100
|
}
|
|
1099
|
-
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga =
|
|
1101
|
+
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ha = /* @__PURE__ */ H({
|
|
1100
1102
|
__name: "PApplication",
|
|
1101
1103
|
props: {
|
|
1102
1104
|
theme: {},
|
|
@@ -1113,20 +1115,20 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1113
1115
|
} }
|
|
1114
1116
|
},
|
|
1115
1117
|
setup(e) {
|
|
1116
|
-
return (n,
|
|
1118
|
+
return (n, c) => {
|
|
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,
|
|
1122
1124
|
"date-locale": a(Je)
|
|
1123
1125
|
}, {
|
|
1124
1126
|
default: o(() => [
|
|
1125
|
-
|
|
1127
|
+
r(a(Ge), null, {
|
|
1126
1128
|
default: o(() => [
|
|
1127
|
-
|
|
1129
|
+
r(a(Qe), null, {
|
|
1128
1130
|
default: o(() => [
|
|
1129
|
-
|
|
1131
|
+
r(a(et), null, {
|
|
1130
1132
|
default: o(() => [
|
|
1131
1133
|
Y(n.$slots, "default")
|
|
1132
1134
|
]),
|
|
@@ -1143,7 +1145,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1143
1145
|
}, 8, ["locale", "theme", "theme-overrides", "date-locale"]);
|
|
1144
1146
|
};
|
|
1145
1147
|
}
|
|
1146
|
-
}), ma =
|
|
1148
|
+
}), ma = W(ha), _a = /* @__PURE__ */ H({
|
|
1147
1149
|
__name: "PModal",
|
|
1148
1150
|
props: {
|
|
1149
1151
|
saveBtnText: { default: "保存" },
|
|
@@ -1156,41 +1158,44 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1156
1158
|
visible: { type: Boolean },
|
|
1157
1159
|
loading: { type: Boolean },
|
|
1158
1160
|
onSave: {},
|
|
1159
|
-
onClose: {}
|
|
1161
|
+
onClose: {},
|
|
1162
|
+
onAfterEnter: {},
|
|
1163
|
+
onAfterLeave: {},
|
|
1164
|
+
onUpdateShow: {}
|
|
1160
1165
|
},
|
|
1161
1166
|
emits: ["update:visible", "update:loading"],
|
|
1162
|
-
setup(e, { expose: n, emit:
|
|
1163
|
-
const m =
|
|
1164
|
-
|
|
1167
|
+
setup(e, { expose: n, emit: c }) {
|
|
1168
|
+
const m = de(), d = e, l = c, k = async () => {
|
|
1169
|
+
l("update:loading", !0);
|
|
1165
1170
|
try {
|
|
1166
1171
|
d.onSave && await d.onSave() && h();
|
|
1167
|
-
} catch (
|
|
1168
|
-
m.error(
|
|
1172
|
+
} catch (y) {
|
|
1173
|
+
m.error(y.message);
|
|
1169
1174
|
} finally {
|
|
1170
|
-
|
|
1175
|
+
l("update:loading", !1);
|
|
1171
1176
|
}
|
|
1172
1177
|
}, h = () => {
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1178
|
+
l("update:visible", !1), l("update:loading", !1);
|
|
1179
|
+
}, T = async () => {
|
|
1175
1180
|
try {
|
|
1176
1181
|
d.onClose ? await d.onClose() && h() : h();
|
|
1177
|
-
} catch (
|
|
1178
|
-
m.error(
|
|
1182
|
+
} catch (y) {
|
|
1183
|
+
m.error(y.message), l("update:loading", !1);
|
|
1179
1184
|
}
|
|
1180
1185
|
};
|
|
1181
1186
|
return n({
|
|
1182
1187
|
open: () => {
|
|
1183
|
-
|
|
1188
|
+
l("update:visible", !0), l("update:loading", !1);
|
|
1184
1189
|
},
|
|
1185
1190
|
close: () => {
|
|
1186
|
-
|
|
1191
|
+
l("update:visible", !1), l("update:loading", !1);
|
|
1187
1192
|
}
|
|
1188
|
-
}), (
|
|
1189
|
-
const
|
|
1190
|
-
return g(),
|
|
1193
|
+
}), (y, u) => {
|
|
1194
|
+
const $ = at, z = ve, i = _e;
|
|
1195
|
+
return g(), C(a(tt), dt({
|
|
1191
1196
|
ref: "$modal",
|
|
1192
1197
|
preset: "card"
|
|
1193
|
-
},
|
|
1198
|
+
}, y.$attrs, {
|
|
1194
1199
|
"header-class": "bg-gray-50",
|
|
1195
1200
|
show: d.visible,
|
|
1196
1201
|
draggable: !0,
|
|
@@ -1199,48 +1204,51 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1199
1204
|
"mask-closable": !1,
|
|
1200
1205
|
bordered: !1,
|
|
1201
1206
|
style: { width: `${d.width}px` },
|
|
1202
|
-
onClose: h
|
|
1207
|
+
onClose: h,
|
|
1208
|
+
onAfterEnter: d.onAfterEnter,
|
|
1209
|
+
onAfterLeave: d.onAfterLeave,
|
|
1210
|
+
onUpdateShow: d.onUpdateShow
|
|
1203
1211
|
}), {
|
|
1204
1212
|
header: o(() => [
|
|
1205
|
-
|
|
1213
|
+
y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : d.title ? (g(), C($, { key: 1 }, {
|
|
1206
1214
|
default: o(() => [
|
|
1207
1215
|
pe(j(e.title), 1)
|
|
1208
1216
|
]),
|
|
1209
1217
|
_: 1
|
|
1210
|
-
})) :
|
|
1218
|
+
})) : D("", !0)
|
|
1211
1219
|
]),
|
|
1212
1220
|
"header-extra": o(() => [
|
|
1213
|
-
Y(
|
|
1221
|
+
Y(y.$slots, "header-extra")
|
|
1214
1222
|
]),
|
|
1215
1223
|
default: o(() => [
|
|
1216
1224
|
v("div", {
|
|
1217
1225
|
class: "overflow-y-auto overflow-hidden mt-5",
|
|
1218
|
-
style:
|
|
1226
|
+
style: ze({ maxHeight: `${d.height}px` })
|
|
1219
1227
|
}, [
|
|
1220
|
-
Y(
|
|
1228
|
+
Y(y.$slots, "default")
|
|
1221
1229
|
], 4)
|
|
1222
1230
|
]),
|
|
1223
1231
|
footer: o(() => [
|
|
1224
|
-
Y(
|
|
1232
|
+
Y(y.$slots, "footer")
|
|
1225
1233
|
]),
|
|
1226
1234
|
action: o(() => [
|
|
1227
|
-
|
|
1235
|
+
r(i, { justify: "end" }, {
|
|
1228
1236
|
default: o(() => [
|
|
1229
|
-
d.hideSaveBtn ?
|
|
1237
|
+
d.hideSaveBtn ? D("", !0) : (g(), C(z, {
|
|
1230
1238
|
key: 0,
|
|
1231
1239
|
type: "primary",
|
|
1232
1240
|
loading: e.loading,
|
|
1233
|
-
onClick:
|
|
1241
|
+
onClick: k
|
|
1234
1242
|
}, {
|
|
1235
1243
|
default: o(() => [
|
|
1236
1244
|
pe(j(e.saveBtnText), 1)
|
|
1237
1245
|
]),
|
|
1238
1246
|
_: 1
|
|
1239
1247
|
}, 8, ["loading"])),
|
|
1240
|
-
Y(
|
|
1241
|
-
d.hideCancelBtn ?
|
|
1248
|
+
Y(y.$slots, "action-extra", { loading: e.loading }),
|
|
1249
|
+
d.hideCancelBtn ? D("", !0) : (g(), C(z, {
|
|
1242
1250
|
key: 1,
|
|
1243
|
-
onClick:
|
|
1251
|
+
onClick: T,
|
|
1244
1252
|
loading: e.loading
|
|
1245
1253
|
}, {
|
|
1246
1254
|
default: o(() => [
|
|
@@ -1253,46 +1261,46 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1253
1261
|
})
|
|
1254
1262
|
]),
|
|
1255
1263
|
_: 3
|
|
1256
|
-
}, 16, ["show", "style"]);
|
|
1264
|
+
}, 16, ["show", "style", "onAfterEnter", "onAfterLeave", "onUpdateShow"]);
|
|
1257
1265
|
};
|
|
1258
1266
|
}
|
|
1259
|
-
}), va =
|
|
1267
|
+
}), va = W(_a), ba = W(De), ya = H({
|
|
1260
1268
|
name: "Redirect",
|
|
1261
1269
|
setup() {
|
|
1262
|
-
const e = ce(), n =
|
|
1270
|
+
const e = ce(), n = re();
|
|
1263
1271
|
return ft(() => {
|
|
1264
|
-
const { params:
|
|
1272
|
+
const { params: c, query: m } = e, { path: d } = c;
|
|
1265
1273
|
n.replace({
|
|
1266
1274
|
path: "/" + (Array.isArray(d) ? d.join("/") : d),
|
|
1267
1275
|
query: m
|
|
1268
1276
|
});
|
|
1269
1277
|
}), () => /* @__PURE__ */ React.createElement(nt, null);
|
|
1270
1278
|
}
|
|
1271
|
-
}), wa =
|
|
1279
|
+
}), wa = W(ya), Pa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ H({
|
|
1272
1280
|
__name: "PIframe",
|
|
1273
1281
|
setup(e) {
|
|
1274
|
-
const n = ce(),
|
|
1282
|
+
const n = ce(), c = A(!1), m = A(null), d = A("");
|
|
1275
1283
|
a(n.meta)?.frameSrc && (d.value = a(n.meta)?.frameSrc);
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1284
|
+
function l() {
|
|
1285
|
+
c.value = !1;
|
|
1278
1286
|
}
|
|
1279
|
-
function
|
|
1287
|
+
function k() {
|
|
1280
1288
|
le(() => {
|
|
1281
1289
|
const h = a(m);
|
|
1282
1290
|
if (!h) return;
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
|
|
1291
|
+
const T = h;
|
|
1292
|
+
T.attachEvent ? T.attachEvent("onload", () => {
|
|
1293
|
+
l();
|
|
1286
1294
|
}) : h.onload = () => {
|
|
1287
|
-
|
|
1295
|
+
l();
|
|
1288
1296
|
};
|
|
1289
1297
|
});
|
|
1290
1298
|
}
|
|
1291
|
-
return
|
|
1292
|
-
|
|
1293
|
-
}), (h,
|
|
1294
|
-
const
|
|
1295
|
-
return g(), L
|
|
1299
|
+
return ee(() => {
|
|
1300
|
+
c.value = !0, k();
|
|
1301
|
+
}), (h, T) => {
|
|
1302
|
+
const L = ot;
|
|
1303
|
+
return g(), C(L, { show: c.value }, {
|
|
1296
1304
|
default: o(() => [
|
|
1297
1305
|
v("div", Pa, [
|
|
1298
1306
|
v("iframe", {
|
|
@@ -1307,7 +1315,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1307
1315
|
}, 8, ["show"]);
|
|
1308
1316
|
};
|
|
1309
1317
|
}
|
|
1310
|
-
}), La = /* @__PURE__ */ F(xa, [["__scopeId", "data-v-161a378e"]]), Ca =
|
|
1318
|
+
}), La = /* @__PURE__ */ F(xa, [["__scopeId", "data-v-161a378e"]]), Ca = W(La), Sa = { class: "border border-gray-100 rounded-lg" }, Ta = { class: "text-xl font-semibold text-gray-800" }, $a = { class: "text-sm text-gray-500 mt-1" }, Ea = /* @__PURE__ */ H({
|
|
1311
1319
|
__name: "PPage",
|
|
1312
1320
|
props: {
|
|
1313
1321
|
icon: { type: Object, required: !1, default: () => Lt },
|
|
@@ -1316,40 +1324,40 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1316
1324
|
},
|
|
1317
1325
|
setup(e) {
|
|
1318
1326
|
const n = e;
|
|
1319
|
-
return (
|
|
1320
|
-
const d =
|
|
1321
|
-
return g(),
|
|
1322
|
-
n.title ? (g(),
|
|
1327
|
+
return (c, m) => {
|
|
1328
|
+
const d = R, l = be, k = _e, h = Oe;
|
|
1329
|
+
return g(), U("div", Sa, [
|
|
1330
|
+
n.title ? (g(), C(h, {
|
|
1323
1331
|
key: 0,
|
|
1324
1332
|
class: "mb-4",
|
|
1325
1333
|
bordered: !1,
|
|
1326
1334
|
"content-class": "py-4"
|
|
1327
1335
|
}, {
|
|
1328
1336
|
default: o(() => [
|
|
1329
|
-
|
|
1337
|
+
r(k, {
|
|
1330
1338
|
align: "center",
|
|
1331
1339
|
justify: "space-between"
|
|
1332
1340
|
}, {
|
|
1333
1341
|
default: o(() => [
|
|
1334
|
-
|
|
1342
|
+
r(k, {
|
|
1335
1343
|
align: "center",
|
|
1336
1344
|
size: 16
|
|
1337
1345
|
}, {
|
|
1338
1346
|
default: o(() => [
|
|
1339
|
-
n.icon ? (g(),
|
|
1347
|
+
n.icon ? (g(), C(l, {
|
|
1340
1348
|
key: 0,
|
|
1341
1349
|
size: 48,
|
|
1342
1350
|
class: "bg-linear-to-br from-blue-500 to-indigo-600"
|
|
1343
1351
|
}, {
|
|
1344
1352
|
default: o(() => [
|
|
1345
|
-
|
|
1353
|
+
r(d, {
|
|
1346
1354
|
size: 24,
|
|
1347
1355
|
component: n.icon,
|
|
1348
1356
|
color: "#fff"
|
|
1349
1357
|
}, null, 8, ["component"])
|
|
1350
1358
|
]),
|
|
1351
1359
|
_: 1
|
|
1352
|
-
})) :
|
|
1360
|
+
})) : D("", !0),
|
|
1353
1361
|
v("div", null, [
|
|
1354
1362
|
v("div", Ta, j(n.title), 1),
|
|
1355
1363
|
v("div", $a, j(n.subtitle ?? n.title + "主页"), 1)
|
|
@@ -1362,83 +1370,83 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
|
|
|
1362
1370
|
})
|
|
1363
1371
|
]),
|
|
1364
1372
|
_: 1
|
|
1365
|
-
})) :
|
|
1366
|
-
|
|
1373
|
+
})) : D("", !0),
|
|
1374
|
+
c.$slots.search ? (g(), C(h, {
|
|
1367
1375
|
key: 1,
|
|
1368
1376
|
class: "mb-4",
|
|
1369
1377
|
"content-class": "flex flex-row gap-2",
|
|
1370
1378
|
bordered: !1
|
|
1371
1379
|
}, {
|
|
1372
1380
|
default: o(() => [
|
|
1373
|
-
Y(
|
|
1381
|
+
Y(c.$slots, "search")
|
|
1374
1382
|
]),
|
|
1375
1383
|
_: 3
|
|
1376
|
-
})) :
|
|
1377
|
-
|
|
1384
|
+
})) : D("", !0),
|
|
1385
|
+
c.$slots.default ? (g(), C(h, {
|
|
1378
1386
|
key: 2,
|
|
1379
1387
|
"content-class": "flex flex-row gap-2 p-0!",
|
|
1380
1388
|
bordered: !1
|
|
1381
1389
|
}, {
|
|
1382
1390
|
default: o(() => [
|
|
1383
|
-
Y(
|
|
1391
|
+
Y(c.$slots, "default")
|
|
1384
1392
|
]),
|
|
1385
1393
|
_: 3
|
|
1386
|
-
})) :
|
|
1394
|
+
})) : D("", !0)
|
|
1387
1395
|
]);
|
|
1388
1396
|
};
|
|
1389
1397
|
}
|
|
1390
|
-
}),
|
|
1391
|
-
function
|
|
1392
|
-
const
|
|
1393
|
-
return g(),
|
|
1394
|
-
c
|
|
1398
|
+
}), Oa = W(Ea), Ra = {}, Aa = { class: "flex flex-col justify-center page-container" };
|
|
1399
|
+
function Na(e, n) {
|
|
1400
|
+
const c = ye;
|
|
1401
|
+
return g(), U("div", Aa, [
|
|
1402
|
+
r(c, {
|
|
1395
1403
|
status: "500",
|
|
1396
1404
|
title: "服务器错误",
|
|
1397
1405
|
description: "抱歉,服务器出错了"
|
|
1398
1406
|
})
|
|
1399
1407
|
]);
|
|
1400
1408
|
}
|
|
1401
|
-
const
|
|
1409
|
+
const Ba = /* @__PURE__ */ F(Ra, [["render", Na], ["__scopeId", "data-v-89cb65c7"]]), za = {}, Da = { class: "flex flex-col justify-center page-container" };
|
|
1402
1410
|
function Ma(e, n) {
|
|
1403
|
-
const
|
|
1404
|
-
return g(),
|
|
1405
|
-
c
|
|
1411
|
+
const c = ye;
|
|
1412
|
+
return g(), U("div", Da, [
|
|
1413
|
+
r(c, {
|
|
1406
1414
|
status: "404",
|
|
1407
1415
|
title: "资源不存在",
|
|
1408
1416
|
description: "抱歉,你访问的页面不存在"
|
|
1409
1417
|
})
|
|
1410
1418
|
]);
|
|
1411
1419
|
}
|
|
1412
|
-
const Ia = /* @__PURE__ */ F(
|
|
1413
|
-
function
|
|
1414
|
-
const
|
|
1415
|
-
return g(),
|
|
1416
|
-
c
|
|
1420
|
+
const Ia = /* @__PURE__ */ F(za, [["render", Ma], ["__scopeId", "data-v-99232671"]]), Ua = {}, Ha = { class: "flex flex-col justify-center page-container" };
|
|
1421
|
+
function Wa(e, n) {
|
|
1422
|
+
const c = ye;
|
|
1423
|
+
return g(), U("div", Ha, [
|
|
1424
|
+
r(c, {
|
|
1417
1425
|
status: "403",
|
|
1418
1426
|
title: "禁止访问",
|
|
1419
1427
|
description: "抱歉,你无权访问该页面"
|
|
1420
1428
|
})
|
|
1421
1429
|
]);
|
|
1422
1430
|
}
|
|
1423
|
-
const ja = /* @__PURE__ */ F(
|
|
1431
|
+
const ja = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16"]]), qa = W(Ba), Fa = W(Ia), Ka = W(ja), Va = ke("app-oidc", () => {
|
|
1424
1432
|
const e = we({});
|
|
1425
1433
|
return {
|
|
1426
|
-
setCallback: (
|
|
1427
|
-
callCallback: async (
|
|
1428
|
-
setError: (
|
|
1429
|
-
callError: async (
|
|
1434
|
+
setCallback: (l) => e.callback = l,
|
|
1435
|
+
callCallback: async (l) => await e.callback?.(l),
|
|
1436
|
+
setError: (l) => e.error = l,
|
|
1437
|
+
callError: async (l, k) => await e.error?.(l, k)
|
|
1430
1438
|
};
|
|
1431
|
-
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */
|
|
1439
|
+
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ H({
|
|
1432
1440
|
__name: "POidc",
|
|
1433
1441
|
setup(e) {
|
|
1434
|
-
const n =
|
|
1435
|
-
return
|
|
1442
|
+
const n = re(), { callCallback: c, callError: m } = Va();
|
|
1443
|
+
return ee(async () => {
|
|
1436
1444
|
try {
|
|
1437
|
-
await
|
|
1445
|
+
await c(n);
|
|
1438
1446
|
} catch (d) {
|
|
1439
1447
|
await m(n, d);
|
|
1440
1448
|
}
|
|
1441
|
-
}), (d,
|
|
1449
|
+
}), (d, l) => (g(), U("div", Ya, [...l[0] || (l[0] = [
|
|
1442
1450
|
v("div", { class: "view-auth-callback-content" }, [
|
|
1443
1451
|
v("div", { class: "view-auth-callback-spinner" }, [
|
|
1444
1452
|
v("span", null, "正在处理登录回调...")
|
|
@@ -1446,7 +1454,7 @@ const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16
|
|
|
1446
1454
|
], -1)
|
|
1447
1455
|
])]));
|
|
1448
1456
|
}
|
|
1449
|
-
}), Ja = /* @__PURE__ */ F(Xa, [["__scopeId", "data-v-167395ae"]]), Za =
|
|
1457
|
+
}), Ja = /* @__PURE__ */ F(Xa, [["__scopeId", "data-v-167395ae"]]), Za = W(Ja), Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1450
1458
|
__proto__: null,
|
|
1451
1459
|
P403: Ka,
|
|
1452
1460
|
P404: Fa,
|
|
@@ -1458,12 +1466,12 @@ const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16
|
|
|
1458
1466
|
PLayout: pa,
|
|
1459
1467
|
PModal: va,
|
|
1460
1468
|
POidc: Za,
|
|
1461
|
-
PPage:
|
|
1469
|
+
PPage: Oa,
|
|
1462
1470
|
PRedirect: wa,
|
|
1463
1471
|
PTable: Rt
|
|
1464
|
-
}, Symbol.toStringTag, { value: "Module" })), Qa = (e, n) => (Object.values(Ga).forEach((
|
|
1465
|
-
|
|
1466
|
-
}), n?.(), e),
|
|
1472
|
+
}, Symbol.toStringTag, { value: "Module" })), Qa = (e, n) => (Object.values(Ga).forEach((c) => {
|
|
1473
|
+
c.install && e.use(c);
|
|
1474
|
+
}), n?.(), e), rn = {
|
|
1467
1475
|
install: Qa
|
|
1468
1476
|
};
|
|
1469
1477
|
export {
|
|
@@ -1477,12 +1485,12 @@ export {
|
|
|
1477
1485
|
pa as PLayout,
|
|
1478
1486
|
va as PModal,
|
|
1479
1487
|
Za as POidc,
|
|
1480
|
-
|
|
1488
|
+
Oa as PPage,
|
|
1481
1489
|
wa as PRedirect,
|
|
1482
1490
|
Rt as PTable,
|
|
1483
|
-
|
|
1491
|
+
rn as default,
|
|
1484
1492
|
Qa as install,
|
|
1485
1493
|
Mt as useLanguageStore,
|
|
1486
|
-
|
|
1494
|
+
ie as useLayoutStore,
|
|
1487
1495
|
Va as useOidcStore
|
|
1488
1496
|
};
|