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