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