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