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