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