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