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