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