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