@chewel611/naive-ui-plus 0.0.48 → 0.0.49
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 +145 -145
- package/dist/index.umd.cjs +1 -1
- package/es/application/index.js +1 -1
- package/es/error/index.js +4 -4
- package/es/iframe/index.js +1 -1
- package/es/languages/index.js +4 -4
- package/es/layout/index.js +3 -3
- package/es/modal/index.js +2 -2
- package/es/oidc/index.js +2 -2
- package/es/page/index.js +1 -1
- package/es/redirect/index.js +2 -2
- package/es/table/index.js +2 -2
- package/es/utils/install.d.ts +1 -1
- package/es/utils/install.js +5 -5
- package/lib/application/index.cjs +1 -1
- package/lib/error/index.cjs +1 -1
- package/lib/iframe/index.cjs +1 -1
- package/lib/languages/index.cjs +1 -1
- package/lib/layout/index.cjs +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/oidc/index.cjs +1 -1
- package/lib/page/index.cjs +1 -1
- package/lib/redirect/index.cjs +1 -1
- package/lib/table/index.cjs +1 -1
- package/lib/utils/install.cjs +1 -1
- package/lib/utils/install.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,8 +19,8 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
19
19
|
onAdd: {},
|
|
20
20
|
onEdit: {}
|
|
21
21
|
},
|
|
22
|
-
setup(e, { expose:
|
|
23
|
-
const
|
|
22
|
+
setup(e, { expose: n }) {
|
|
23
|
+
const o = M(null), m = Ee(), v = ce(), u = M(!1), y = M([]), i = M([]), E = M({
|
|
24
24
|
page: 1,
|
|
25
25
|
itemCount: 0,
|
|
26
26
|
pageSize: 10,
|
|
@@ -130,8 +130,8 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
130
130
|
u.value = !1;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
},
|
|
134
|
-
const w = a(
|
|
133
|
+
}, s = K(() => {
|
|
134
|
+
const w = a(o);
|
|
135
135
|
if (!w) return;
|
|
136
136
|
const k = w?.$el, S = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: N } = ae(S), I = 48;
|
|
137
137
|
let V = 12, G = 25;
|
|
@@ -160,7 +160,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
160
160
|
bottomIncludeBody: xe - fe
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
|
-
return ee(async () => await h()),
|
|
163
|
+
return ee(async () => await h()), n({
|
|
164
164
|
getData: g,
|
|
165
165
|
getSelectedRow: R,
|
|
166
166
|
getSelectedRows: x,
|
|
@@ -256,10 +256,10 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
256
256
|
c(I, {
|
|
257
257
|
remote: "",
|
|
258
258
|
ref_key: "$table",
|
|
259
|
-
ref:
|
|
259
|
+
ref: o,
|
|
260
260
|
"checked-row-keys": y.value,
|
|
261
261
|
"onUpdate:checkedRowKeys": k[0] || (k[0] = (V) => y.value = V),
|
|
262
|
-
"max-height":
|
|
262
|
+
"max-height": s.value,
|
|
263
263
|
loading: u.value,
|
|
264
264
|
bordered: !1,
|
|
265
265
|
"single-line": !1,
|
|
@@ -274,12 +274,12 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
274
274
|
});
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
}), W = (e) => {
|
|
278
|
-
const
|
|
279
|
-
return
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
}, Nt = W(Ot), Rt = ["Redirect", "RedirectSon", "login"], re = we(
|
|
277
|
+
}), W = (e, n) => {
|
|
278
|
+
const o = n;
|
|
279
|
+
return o.install = function(m) {
|
|
280
|
+
m.component(e, n);
|
|
281
|
+
}, n;
|
|
282
|
+
}, Nt = W("PTable", Ot), Rt = ["Redirect", "RedirectSon", "login"], re = we(
|
|
283
283
|
"p-layout",
|
|
284
284
|
() => {
|
|
285
285
|
const e = ye({
|
|
@@ -297,14 +297,14 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
297
297
|
return {
|
|
298
298
|
state: e,
|
|
299
299
|
initMenus: (g) => {
|
|
300
|
-
g.sort((h,
|
|
300
|
+
g.sort((h, s) => h.affix && !s.affix ? -1 : !h.affix && s.affix ? 1 : Number(s.sort ?? 0) - Number(h.sort ?? 0)), e.menus = g;
|
|
301
301
|
},
|
|
302
302
|
getMenus: () => e.menus,
|
|
303
303
|
initTabs: (g) => {
|
|
304
|
-
g.sort((h,
|
|
304
|
+
g.sort((h, s) => h.meta.affix && !s.meta.affix ? -1 : !h.meta.affix && s.meta.affix ? 1 : Number(s.meta.sort ?? 0) - Number(h.meta.sort ?? 0)), e.tabs = g;
|
|
305
305
|
},
|
|
306
306
|
addTab: (g) => Rt.includes(g.name) ? !1 : (e.tabs?.some(
|
|
307
|
-
(
|
|
307
|
+
(s) => s.fullPath == g.fullPath
|
|
308
308
|
) || e.tabs?.push(g), !0),
|
|
309
309
|
getCurrentTab: () => {
|
|
310
310
|
const g = te();
|
|
@@ -312,7 +312,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
312
312
|
},
|
|
313
313
|
closeCurrentTab: (g) => {
|
|
314
314
|
const h = e.tabs.findIndex(
|
|
315
|
-
(
|
|
315
|
+
(s) => s.fullPath == g.fullPath
|
|
316
316
|
);
|
|
317
317
|
e.tabs.splice(h, 1);
|
|
318
318
|
},
|
|
@@ -326,18 +326,18 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
326
326
|
},
|
|
327
327
|
closeLeftTabs: (g) => {
|
|
328
328
|
const h = e.tabs.findIndex(
|
|
329
|
-
(
|
|
329
|
+
(s) => s.fullPath == g.fullPath
|
|
330
330
|
);
|
|
331
331
|
e.tabs = e.tabs.filter(
|
|
332
|
-
(
|
|
332
|
+
(s, q) => q >= h || (s?.meta?.affix ?? !1)
|
|
333
333
|
);
|
|
334
334
|
},
|
|
335
335
|
closeRightTabs: (g) => {
|
|
336
336
|
const h = e.tabs.findIndex(
|
|
337
|
-
(
|
|
337
|
+
(s) => s.fullPath == g.fullPath
|
|
338
338
|
);
|
|
339
339
|
e.tabs = e.tabs.filter(
|
|
340
|
-
(
|
|
340
|
+
(s, q) => q <= h || (s?.meta?.affix ?? !1)
|
|
341
341
|
);
|
|
342
342
|
},
|
|
343
343
|
collapse: () => {
|
|
@@ -366,24 +366,24 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
366
366
|
), At = { class: "logo" }, Mt = /* @__PURE__ */ H({
|
|
367
367
|
__name: "PLogo",
|
|
368
368
|
setup(e) {
|
|
369
|
-
const
|
|
370
|
-
return (
|
|
369
|
+
const n = re();
|
|
370
|
+
return (o, m) => (p(), U("div", At, [
|
|
371
371
|
c(a(ve), {
|
|
372
372
|
color: "var(--color-logo)",
|
|
373
373
|
size: 32,
|
|
374
|
-
src: a(
|
|
375
|
-
class: oe({ "mr-2": !a(
|
|
374
|
+
src: a(n).state.logo,
|
|
375
|
+
class: oe({ "mr-2": !a(n).state.collapsed })
|
|
376
376
|
}, null, 8, ["src", "class"]),
|
|
377
|
-
st(_("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, j(a(
|
|
378
|
-
[lt, !a(
|
|
377
|
+
st(_("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, j(a(n).state.title), 513), [
|
|
378
|
+
[lt, !a(n).state.collapsed]
|
|
379
379
|
])
|
|
380
380
|
]));
|
|
381
381
|
}
|
|
382
|
-
}), F = (e,
|
|
383
|
-
const
|
|
384
|
-
for (const [m, v] of
|
|
385
|
-
|
|
386
|
-
return
|
|
382
|
+
}), F = (e, n) => {
|
|
383
|
+
const o = e.__vccOpts || e;
|
|
384
|
+
for (const [m, v] of n)
|
|
385
|
+
o[m] = v;
|
|
386
|
+
return o;
|
|
387
387
|
}, zt = /* @__PURE__ */ F(Mt, [["__scopeId", "data-v-e48aeefa"]]), Bt = {
|
|
388
388
|
translationApiUrl: "https://translate.zvo.cn/api",
|
|
389
389
|
defaultLanguage: "chinese",
|
|
@@ -393,12 +393,12 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
393
393
|
selectLanguage: async (e) => {
|
|
394
394
|
}
|
|
395
395
|
}, Dt = we("language", () => {
|
|
396
|
-
const e = M(Bt),
|
|
396
|
+
const e = M(Bt), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
|
|
397
397
|
return {
|
|
398
398
|
select: async (r) => {
|
|
399
399
|
if (e.value.currentLanguage === r)
|
|
400
400
|
return;
|
|
401
|
-
const $ = (await
|
|
401
|
+
const $ = (await n()).find(
|
|
402
402
|
(d) => d.key === r
|
|
403
403
|
);
|
|
404
404
|
$ && (e.value.currentLanguage = $.key, e.value.selectLanguage($));
|
|
@@ -409,10 +409,10 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
409
409
|
initLanguagesCallback: async (r) => {
|
|
410
410
|
e.value.initLanguages = r;
|
|
411
411
|
},
|
|
412
|
-
getLanguages:
|
|
412
|
+
getLanguages: n,
|
|
413
413
|
getCurrentLanguage: async () => {
|
|
414
414
|
if (e.value.currentLanguage)
|
|
415
|
-
return (await
|
|
415
|
+
return (await n()).find(
|
|
416
416
|
(r) => r.key === e.value.currentLanguage
|
|
417
417
|
);
|
|
418
418
|
},
|
|
@@ -429,17 +429,17 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
429
429
|
__name: "PLanguage",
|
|
430
430
|
setup(e) {
|
|
431
431
|
const {
|
|
432
|
-
select:
|
|
433
|
-
getLanguages:
|
|
432
|
+
select: n,
|
|
433
|
+
getLanguages: o,
|
|
434
434
|
getCurrentLanguage: m,
|
|
435
435
|
getDefaultLanguage: v,
|
|
436
436
|
getTranslationApiUrl: u
|
|
437
|
-
} = Dt(), y = M(), i = M([]), E = async (r) => await
|
|
437
|
+
} = Dt(), y = M(), i = M([]), E = async (r) => await n(r), P = async () => {
|
|
438
438
|
const r = window.translate;
|
|
439
|
-
r && (r.selectLanguageTag.show = !1, r.selectLanguageTag.languages = (await
|
|
439
|
+
r && (r.selectLanguageTag.show = !1, r.selectLanguageTag.languages = (await o()).map(($) => $.key).join(","), r.ignore.class.push("ignore-translate-flag"), r.ignore.id.push("ignore-translation"), r.language.setLocal(v()), r.request.api.translate = "api/v1/translation", r.request.api.connectTest = "api/v1/translation/connect-test", r.request.api.init = "api/v1/translation/init", r.request.api.language = "api/v1/translation/language", r.request.setHost(u()), r.request.listener.start(), r.listener.start(), r.whole.enableAll(), r.execute());
|
|
440
440
|
};
|
|
441
441
|
return ee(async () => {
|
|
442
|
-
await se(), await P(), y.value = await m(), i.value = await
|
|
442
|
+
await se(), await P(), y.value = await m(), i.value = await o();
|
|
443
443
|
}), (r, $) => {
|
|
444
444
|
const d = A, L = _e;
|
|
445
445
|
return i.value.length > 0 ? (p(), C(a(Q), {
|
|
@@ -496,7 +496,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
496
496
|
}, Ft = { class: "layout-header-trigger layout-header-trigger-min" }, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */ H({
|
|
497
497
|
__name: "PHeader",
|
|
498
498
|
setup(e) {
|
|
499
|
-
const
|
|
499
|
+
const n = ce(), o = Ee(), m = re(), v = le(), u = te(), y = Re("reloadPage"), i = (T) => v.push({ name: T }), E = K(() => P(u.matched)), P = (T) => T.map((x) => {
|
|
500
500
|
const R = {
|
|
501
501
|
key: x.name,
|
|
502
502
|
label: x.meta.title,
|
|
@@ -524,7 +524,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
524
524
|
}), L = (T) => {
|
|
525
525
|
T === "logout" ? O() : v.push({ name: T });
|
|
526
526
|
}, O = () => {
|
|
527
|
-
|
|
527
|
+
o.info({
|
|
528
528
|
title: "提示",
|
|
529
529
|
content: "您确定要退出登录吗",
|
|
530
530
|
positiveText: "确定",
|
|
@@ -532,14 +532,14 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
532
532
|
onPositiveClick: async () => {
|
|
533
533
|
if (m.state.logout)
|
|
534
534
|
try {
|
|
535
|
-
await m.state.logout(), localStorage.removeItem("TABS-ROUTES"),
|
|
535
|
+
await m.state.logout(), localStorage.removeItem("TABS-ROUTES"), n.error("退出成功");
|
|
536
536
|
} catch (T) {
|
|
537
|
-
console.error(T),
|
|
537
|
+
console.error(T), n.error("退出登录失败");
|
|
538
538
|
} finally {
|
|
539
539
|
location.reload();
|
|
540
540
|
}
|
|
541
541
|
else
|
|
542
|
-
|
|
542
|
+
n.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
|
|
543
543
|
},
|
|
544
544
|
onNegativeClick: () => {
|
|
545
545
|
}
|
|
@@ -552,7 +552,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
552
552
|
_("div", {
|
|
553
553
|
class: "ml-1 layout-header-trigger layout-header-trigger-min",
|
|
554
554
|
onClick: x[0] || (x[0] = //@ts-ignore
|
|
555
|
-
(...
|
|
555
|
+
(...s) => a(m).collapse && a(m).collapse(...s))
|
|
556
556
|
}, [
|
|
557
557
|
a(m).state.collapsed ? (p(), C(a(A), {
|
|
558
558
|
key: 0,
|
|
@@ -575,7 +575,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
575
575
|
_("div", {
|
|
576
576
|
class: "mr-1 layout-header-trigger layout-header-trigger-min",
|
|
577
577
|
onClick: x[1] || (x[1] = //@ts-ignore
|
|
578
|
-
(...
|
|
578
|
+
(...s) => a(y) && a(y)(...s))
|
|
579
579
|
}, [
|
|
580
580
|
c(a(A), { size: "18" }, {
|
|
581
581
|
default: l(() => [
|
|
@@ -586,26 +586,26 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
586
586
|
]),
|
|
587
587
|
c(a(Ie), null, {
|
|
588
588
|
default: l(() => [
|
|
589
|
-
(p(!0), U(Te, null, rt(E.value, (
|
|
590
|
-
key:
|
|
589
|
+
(p(!0), U(Te, null, rt(E.value, (s) => (p(), U(Te, {
|
|
590
|
+
key: s.label
|
|
591
591
|
}, [
|
|
592
|
-
|
|
592
|
+
s.label ? (p(), C(a(Ue), { key: 0 }, {
|
|
593
593
|
default: l(() => [
|
|
594
|
-
|
|
594
|
+
s.children && s.children.length ? (p(), C(a(Q), {
|
|
595
595
|
key: 0,
|
|
596
|
-
options:
|
|
596
|
+
options: s.children,
|
|
597
597
|
onSelect: i
|
|
598
598
|
}, {
|
|
599
599
|
default: l(() => [
|
|
600
600
|
_("span", Wt, [
|
|
601
|
-
|
|
602
|
-
_("span", null, j(
|
|
601
|
+
s.icon ? (p(), C(pe(s.icon), { key: 0 })) : D("", !0),
|
|
602
|
+
_("span", null, j(s.label), 1)
|
|
603
603
|
])
|
|
604
604
|
]),
|
|
605
605
|
_: 2
|
|
606
606
|
}, 1032, ["options"])) : (p(), U("span", qt, [
|
|
607
|
-
|
|
608
|
-
_("span", null, j(
|
|
607
|
+
s.icon ? (p(), C(pe(s.icon), { key: 0 })) : D("", !0),
|
|
608
|
+
_("span", null, j(s.label), 1)
|
|
609
609
|
]))
|
|
610
610
|
]),
|
|
611
611
|
_: 2
|
|
@@ -667,7 +667,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
667
667
|
loading: { type: Boolean, default: !1 }
|
|
668
668
|
},
|
|
669
669
|
setup(e) {
|
|
670
|
-
return (
|
|
670
|
+
return (n, o) => {
|
|
671
671
|
const m = Ae("RouterView");
|
|
672
672
|
return p(), U("div", Zt, [
|
|
673
673
|
e.loading ? D("", !0) : (p(), C(m, { key: 0 }, {
|
|
@@ -687,10 +687,10 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
687
687
|
__name: "PTabs",
|
|
688
688
|
setup(e) {
|
|
689
689
|
it((t) => ({
|
|
690
|
-
v4f917f8c:
|
|
690
|
+
v4f917f8c: o.value,
|
|
691
691
|
v1c2fb72a: m.value
|
|
692
692
|
}));
|
|
693
|
-
const
|
|
693
|
+
const n = We(), o = K(() => n.value.cardColor), m = K(() => n.value.textColor1), v = ce(), u = te(), y = le(), i = M(null), E = M(null), P = M(!1), r = re(), $ = K(() => r.state.tabs), d = ye({
|
|
694
694
|
activeKey: u.fullPath,
|
|
695
695
|
scrollable: !0,
|
|
696
696
|
dropdownX: 0,
|
|
@@ -762,7 +762,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
762
762
|
}, h = () => {
|
|
763
763
|
const t = R();
|
|
764
764
|
g(t), r.initTabs(t);
|
|
765
|
-
},
|
|
765
|
+
}, s = async (t) => {
|
|
766
766
|
if (await se(), !i.value) return;
|
|
767
767
|
const f = i.value.offsetWidth, b = i.value.scrollWidth;
|
|
768
768
|
f < b ? (d.scrollable = !0, t && [...i.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((Z) => {
|
|
@@ -770,7 +770,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
770
770
|
})) : d.scrollable = !1;
|
|
771
771
|
}, q = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), ae = () => {
|
|
772
772
|
let t;
|
|
773
|
-
t = Ct(), t.listenTo(E.value, () =>
|
|
773
|
+
t = Ct(), t.listenTo(E.value, () => s(!0));
|
|
774
774
|
}, w = (t) => {
|
|
775
775
|
if (!t || t.fullPath === u.fullPath) return;
|
|
776
776
|
if (d.activeKey = t.fullPath, toString.call(t) === "[object String]") {
|
|
@@ -797,14 +797,14 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
797
797
|
const f = $.value[Math.max(0, $.value.length - 1)];
|
|
798
798
|
d.activeKey = f.fullPath, y.push(f);
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
s();
|
|
801
801
|
}, I = (t) => {
|
|
802
802
|
const f = $.value.find((b) => b.fullPath == t.fullPath);
|
|
803
803
|
f && N(f);
|
|
804
804
|
}, V = (t) => {
|
|
805
|
-
r.closeOtherTabs(t), d.activeKey = t.fullPath,
|
|
805
|
+
r.closeOtherTabs(t), d.activeKey = t.fullPath, s();
|
|
806
806
|
}, G = () => {
|
|
807
|
-
r.closeAllTabs(),
|
|
807
|
+
r.closeAllTabs(), s();
|
|
808
808
|
}, X = Re("reloadPage"), ne = (t) => {
|
|
809
809
|
switch (t) {
|
|
810
810
|
//刷新
|
|
@@ -824,7 +824,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
824
824
|
G();
|
|
825
825
|
break;
|
|
826
826
|
}
|
|
827
|
-
|
|
827
|
+
s(), d.showDropdown = !1;
|
|
828
828
|
}, J = (t, f) => {
|
|
829
829
|
const b = i.value.scrollLeft, z = f > 0 && b + f >= t || f < 0 && b + f <= t ? t : b + f;
|
|
830
830
|
if (i.value && i.value.scrollTo(z, 0), z !== t)
|
|
@@ -852,7 +852,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
852
852
|
), Me(
|
|
853
853
|
() => u.fullPath,
|
|
854
854
|
(t) => {
|
|
855
|
-
L.includes(u.name) || (d.activeKey = t, r.addTab(O(u)),
|
|
855
|
+
L.includes(u.name) || (d.activeKey = t, r.addTab(O(u)), s(!0));
|
|
856
856
|
},
|
|
857
857
|
{ immediate: !0 }
|
|
858
858
|
), h(), ee(() => ae()), (t, f) => (p(), U("div", {
|
|
@@ -967,19 +967,19 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
967
967
|
}), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-50f5202c"]]), sa = /* @__PURE__ */ H({
|
|
968
968
|
__name: "PMenus",
|
|
969
969
|
setup(e) {
|
|
970
|
-
const
|
|
971
|
-
|
|
970
|
+
const n = M([]), o = te(), m = le(), v = re(), u = M(o.name), y = M(
|
|
971
|
+
o.matched && o.matched.length ? o.matched.map((L) => L.name) : []
|
|
972
972
|
), i = (L) => {
|
|
973
|
-
|
|
973
|
+
o.name !== L && (/http(s)?:/.test(L) ? window.open(L) : m.push({ name: L }));
|
|
974
974
|
}, E = (L) => {
|
|
975
975
|
if (!L) return;
|
|
976
976
|
const O = L.find((T) => y.value.indexOf(T) === -1);
|
|
977
977
|
y.value = O ? [O] : [];
|
|
978
978
|
}, P = () => {
|
|
979
|
-
const L =
|
|
979
|
+
const L = o.matched;
|
|
980
980
|
y.value = L.map((T) => T.name);
|
|
981
|
-
const O =
|
|
982
|
-
u.value = O ||
|
|
981
|
+
const O = o.meta?.activeMenu || "";
|
|
982
|
+
u.value = O || o.name;
|
|
983
983
|
}, r = [
|
|
984
984
|
"/:path(.*)*",
|
|
985
985
|
"/redirect",
|
|
@@ -999,31 +999,31 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
999
999
|
O.push(R.name), $(R.children || [], O, !0);
|
|
1000
1000
|
continue;
|
|
1001
1001
|
}
|
|
1002
|
-
const g = R.children?.filter((ae) => !ae.meta?.hidden) || [], h = g.length === 1,
|
|
1003
|
-
key:
|
|
1004
|
-
label:
|
|
1005
|
-
affix:
|
|
1006
|
-
sort: Number(h ? R.meta?.sort ?? 0 :
|
|
1007
|
-
path:
|
|
1008
|
-
redirect:
|
|
1009
|
-
icon: h ? R.meta?.icon :
|
|
1010
|
-
permission:
|
|
1011
|
-
meta:
|
|
1002
|
+
const g = R.children?.filter((ae) => !ae.meta?.hidden) || [], h = g.length === 1, s = h ? g[0] : R, q = {
|
|
1003
|
+
key: s.name,
|
|
1004
|
+
label: s.meta?.title,
|
|
1005
|
+
affix: s.meta?.affix,
|
|
1006
|
+
sort: Number(h ? R.meta?.sort ?? 0 : s.meta?.sort ?? 0),
|
|
1007
|
+
path: s.path,
|
|
1008
|
+
redirect: s.redirect,
|
|
1009
|
+
icon: h ? R.meta?.icon : s.meta?.icon,
|
|
1010
|
+
permission: s.meta?.permission,
|
|
1011
|
+
meta: s.meta,
|
|
1012
1012
|
children: void 0
|
|
1013
1013
|
};
|
|
1014
|
-
if (
|
|
1015
|
-
O.push(
|
|
1014
|
+
if (s.children && s.children.length > 0 && (q.children = $(s.children, O, T), !h && (!q.children || q.children.length === 0))) {
|
|
1015
|
+
O.push(s.name);
|
|
1016
1016
|
continue;
|
|
1017
1017
|
}
|
|
1018
|
-
O.includes(
|
|
1018
|
+
O.includes(s.name) || (x.push(q), O.push(s.name));
|
|
1019
1019
|
}
|
|
1020
1020
|
return x;
|
|
1021
1021
|
}, d = () => {
|
|
1022
1022
|
const L = m.getRoutes();
|
|
1023
|
-
|
|
1023
|
+
n.value = $(L);
|
|
1024
1024
|
};
|
|
1025
1025
|
return Me(
|
|
1026
|
-
() =>
|
|
1026
|
+
() => o.fullPath,
|
|
1027
1027
|
() => {
|
|
1028
1028
|
P();
|
|
1029
1029
|
}
|
|
@@ -1033,7 +1033,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1033
1033
|
class: "h-full",
|
|
1034
1034
|
inverted: "",
|
|
1035
1035
|
mode: "vertical",
|
|
1036
|
-
options:
|
|
1036
|
+
options: n.value,
|
|
1037
1037
|
collapsed: a(v).state.collapsed,
|
|
1038
1038
|
"collapsed-width": 64,
|
|
1039
1039
|
"collapsed-icon-size": 20,
|
|
@@ -1047,9 +1047,9 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1047
1047
|
}), la = { class: "layout-content-main layout-content-main-fix" }, ra = { class: "main-view main-view-fix" }, ca = /* @__PURE__ */ H({
|
|
1048
1048
|
__name: "PLayout",
|
|
1049
1049
|
setup(e) {
|
|
1050
|
-
const
|
|
1050
|
+
const n = re(), o = M(!1);
|
|
1051
1051
|
return ut("reloadPage", () => {
|
|
1052
|
-
|
|
1052
|
+
o.value = !0, se(() => o.value = !1);
|
|
1053
1053
|
}), (v, u) => {
|
|
1054
1054
|
const y = Ye;
|
|
1055
1055
|
return p(), C(a(Le), {
|
|
@@ -1066,11 +1066,11 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1066
1066
|
"collapse-mode": "width",
|
|
1067
1067
|
"trigger-class": "!-right-5",
|
|
1068
1068
|
"collapsed-trigger-class": "!-right-5",
|
|
1069
|
-
collapsed: a(
|
|
1069
|
+
collapsed: a(n).state.collapsed,
|
|
1070
1070
|
"native-scrollbar": !1,
|
|
1071
1071
|
"collapsed-width": 64,
|
|
1072
|
-
onCollapse: a(
|
|
1073
|
-
onExpand: a(
|
|
1072
|
+
onCollapse: a(n).collapse,
|
|
1073
|
+
onExpand: a(n).collapse
|
|
1074
1074
|
}, {
|
|
1075
1075
|
default: l(() => [
|
|
1076
1076
|
c(a(Ve), { vertical: "" }, {
|
|
@@ -1096,7 +1096,7 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1096
1096
|
_("div", la, [
|
|
1097
1097
|
c(oa),
|
|
1098
1098
|
_("div", ra, [
|
|
1099
|
-
c(Gt, { loading:
|
|
1099
|
+
c(Gt, { loading: o.value }, null, 8, ["loading"])
|
|
1100
1100
|
])
|
|
1101
1101
|
])
|
|
1102
1102
|
]),
|
|
@@ -1115,11 +1115,11 @@ const St = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Et = {
|
|
|
1115
1115
|
};
|
|
1116
1116
|
}
|
|
1117
1117
|
}), ia = /* @__PURE__ */ F(ca, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
|
|
1118
|
-
function da(e,
|
|
1119
|
-
const
|
|
1120
|
-
return p(), C(
|
|
1118
|
+
function da(e, n) {
|
|
1119
|
+
const o = Ae("router-view");
|
|
1120
|
+
return p(), C(o);
|
|
1121
1121
|
}
|
|
1122
|
-
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma = /* @__PURE__ */ H({
|
|
1122
|
+
const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W("PEmptyLayout", fa), pa = W("PLayout", ia), ma = /* @__PURE__ */ H({
|
|
1123
1123
|
__name: "PApplication",
|
|
1124
1124
|
props: {
|
|
1125
1125
|
theme: {},
|
|
@@ -1136,7 +1136,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1136
1136
|
} }
|
|
1137
1137
|
},
|
|
1138
1138
|
setup(e) {
|
|
1139
|
-
return (
|
|
1139
|
+
return (n, o) => {
|
|
1140
1140
|
const m = Xe;
|
|
1141
1141
|
return p(), C(m, {
|
|
1142
1142
|
locale: a(Ze),
|
|
@@ -1151,7 +1151,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1151
1151
|
default: l(() => [
|
|
1152
1152
|
c(a(et), null, {
|
|
1153
1153
|
default: l(() => [
|
|
1154
|
-
Y(
|
|
1154
|
+
Y(n.$slots, "default")
|
|
1155
1155
|
]),
|
|
1156
1156
|
_: 3
|
|
1157
1157
|
})
|
|
@@ -1166,7 +1166,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1166
1166
|
}, 8, ["locale", "theme", "theme-overrides", "date-locale"]);
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
|
-
}), ha = W(ma), _a = /* @__PURE__ */ H({
|
|
1169
|
+
}), ha = W("PApplication", ma), _a = /* @__PURE__ */ H({
|
|
1170
1170
|
__name: "PModal",
|
|
1171
1171
|
props: {
|
|
1172
1172
|
saveBtnText: { default: "保存" },
|
|
@@ -1184,8 +1184,8 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1184
1184
|
onUpdateVisible: {}
|
|
1185
1185
|
},
|
|
1186
1186
|
emits: ["update:visible", "update:loading"],
|
|
1187
|
-
setup(e, { expose:
|
|
1188
|
-
const m = ce(), v = M(!1), u = M(!1), y =
|
|
1187
|
+
setup(e, { expose: n, emit: o }) {
|
|
1188
|
+
const m = ce(), v = M(!1), u = M(!1), y = o, i = e, E = async () => {
|
|
1189
1189
|
try {
|
|
1190
1190
|
v.value = !0, i.onSave && await i.onSave() && P();
|
|
1191
1191
|
} catch (d) {
|
|
@@ -1204,7 +1204,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1204
1204
|
u.value = !1;
|
|
1205
1205
|
}
|
|
1206
1206
|
};
|
|
1207
|
-
return
|
|
1207
|
+
return n({
|
|
1208
1208
|
open: () => {
|
|
1209
1209
|
v.value = !1, u.value = !1, y("update:visible", !0);
|
|
1210
1210
|
},
|
|
@@ -1283,25 +1283,25 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1283
1283
|
}, 16, ["show", "style", "onAfterEnter", "onAfterLeave", "onUpdateVisible"]);
|
|
1284
1284
|
};
|
|
1285
1285
|
}
|
|
1286
|
-
}), va = W(_a), ba = W(Be), ya = H({
|
|
1286
|
+
}), va = W("PModal", _a), ba = W("PLanguage", Be), ya = H({
|
|
1287
1287
|
name: "Redirect",
|
|
1288
1288
|
setup() {
|
|
1289
|
-
const e = te(),
|
|
1289
|
+
const e = te(), n = le();
|
|
1290
1290
|
return ft(() => {
|
|
1291
|
-
const { params:
|
|
1292
|
-
|
|
1291
|
+
const { params: o, query: m } = e, { path: v } = o;
|
|
1292
|
+
n.replace({
|
|
1293
1293
|
path: "/" + (Array.isArray(v) ? v.join("/") : v),
|
|
1294
1294
|
query: m
|
|
1295
1295
|
});
|
|
1296
1296
|
}), () => /* @__PURE__ */ React.createElement(nt, null);
|
|
1297
1297
|
}
|
|
1298
|
-
}), Pa = W(ya), wa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ H({
|
|
1298
|
+
}), Pa = W("PRedirect", ya), wa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ H({
|
|
1299
1299
|
__name: "PIframe",
|
|
1300
1300
|
setup(e) {
|
|
1301
|
-
const
|
|
1302
|
-
a(
|
|
1301
|
+
const n = te(), o = M(!1), m = M(null), v = M("");
|
|
1302
|
+
a(n.meta)?.frameSrc && (v.value = a(n.meta)?.frameSrc);
|
|
1303
1303
|
function u() {
|
|
1304
|
-
|
|
1304
|
+
o.value = !1;
|
|
1305
1305
|
}
|
|
1306
1306
|
function y() {
|
|
1307
1307
|
se(() => {
|
|
@@ -1316,10 +1316,10 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
1318
|
return ee(() => {
|
|
1319
|
-
|
|
1319
|
+
o.value = !0, y();
|
|
1320
1320
|
}), (i, E) => {
|
|
1321
1321
|
const P = ot;
|
|
1322
|
-
return p(), C(P, { show:
|
|
1322
|
+
return p(), C(P, { show: o.value }, {
|
|
1323
1323
|
default: l(() => [
|
|
1324
1324
|
_("div", wa, [
|
|
1325
1325
|
_("iframe", {
|
|
@@ -1334,7 +1334,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1334
1334
|
}, 8, ["show"]);
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
|
-
}), La = /* @__PURE__ */ F(xa, [["__scopeId", "data-v-161a378e"]]), Ca = W(La), Ta = { class: "border border-gray-100 rounded-lg" }, Sa = { class: "text-xl font-semibold text-gray-800" }, $a = { class: "text-sm text-gray-500 mt-1" }, Ea = /* @__PURE__ */ H({
|
|
1337
|
+
}), La = /* @__PURE__ */ F(xa, [["__scopeId", "data-v-161a378e"]]), Ca = W("PIframe", La), Ta = { class: "border border-gray-100 rounded-lg" }, Sa = { class: "text-xl font-semibold text-gray-800" }, $a = { class: "text-sm text-gray-500 mt-1" }, Ea = /* @__PURE__ */ H({
|
|
1338
1338
|
__name: "PPage",
|
|
1339
1339
|
props: {
|
|
1340
1340
|
icon: { type: Object, required: !1, default: () => Lt },
|
|
@@ -1342,11 +1342,11 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1342
1342
|
subtitle: { type: String, required: !1 }
|
|
1343
1343
|
},
|
|
1344
1344
|
setup(e) {
|
|
1345
|
-
const
|
|
1346
|
-
return (
|
|
1345
|
+
const n = e;
|
|
1346
|
+
return (o, m) => {
|
|
1347
1347
|
const v = A, u = ve, y = he, i = Oe;
|
|
1348
1348
|
return p(), U("div", Ta, [
|
|
1349
|
-
|
|
1349
|
+
n.title ? (p(), C(i, {
|
|
1350
1350
|
key: 0,
|
|
1351
1351
|
class: "mb-4",
|
|
1352
1352
|
bordered: !1,
|
|
@@ -1363,7 +1363,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1363
1363
|
size: 16
|
|
1364
1364
|
}, {
|
|
1365
1365
|
default: l(() => [
|
|
1366
|
-
|
|
1366
|
+
n.icon ? (p(), C(u, {
|
|
1367
1367
|
key: 0,
|
|
1368
1368
|
size: 48,
|
|
1369
1369
|
class: "bg-linear-to-br from-blue-500 to-indigo-600"
|
|
@@ -1371,15 +1371,15 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1371
1371
|
default: l(() => [
|
|
1372
1372
|
c(v, {
|
|
1373
1373
|
size: 24,
|
|
1374
|
-
component:
|
|
1374
|
+
component: n.icon,
|
|
1375
1375
|
color: "#fff"
|
|
1376
1376
|
}, null, 8, ["component"])
|
|
1377
1377
|
]),
|
|
1378
1378
|
_: 1
|
|
1379
1379
|
})) : D("", !0),
|
|
1380
1380
|
_("div", null, [
|
|
1381
|
-
_("div", Sa, j(
|
|
1382
|
-
_("div", $a, j(
|
|
1381
|
+
_("div", Sa, j(n.title), 1),
|
|
1382
|
+
_("div", $a, j(n.subtitle ?? n.title + "主页"), 1)
|
|
1383
1383
|
])
|
|
1384
1384
|
]),
|
|
1385
1385
|
_: 1
|
|
@@ -1390,35 +1390,35 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = W(fa), pa = W(ia), ma =
|
|
|
1390
1390
|
]),
|
|
1391
1391
|
_: 1
|
|
1392
1392
|
})) : D("", !0),
|
|
1393
|
-
|
|
1393
|
+
o.$slots.search ? (p(), C(i, {
|
|
1394
1394
|
key: 1,
|
|
1395
1395
|
class: "mb-4",
|
|
1396
1396
|
"content-class": "flex flex-row gap-2",
|
|
1397
1397
|
bordered: !1
|
|
1398
1398
|
}, {
|
|
1399
1399
|
default: l(() => [
|
|
1400
|
-
Y(
|
|
1400
|
+
Y(o.$slots, "search")
|
|
1401
1401
|
]),
|
|
1402
1402
|
_: 3
|
|
1403
1403
|
})) : D("", !0),
|
|
1404
|
-
|
|
1404
|
+
o.$slots.default ? (p(), C(i, {
|
|
1405
1405
|
key: 2,
|
|
1406
1406
|
"content-class": "flex flex-row gap-2 p-0!",
|
|
1407
1407
|
bordered: !1
|
|
1408
1408
|
}, {
|
|
1409
1409
|
default: l(() => [
|
|
1410
|
-
Y(
|
|
1410
|
+
Y(o.$slots, "default")
|
|
1411
1411
|
]),
|
|
1412
1412
|
_: 3
|
|
1413
1413
|
})) : D("", !0)
|
|
1414
1414
|
]);
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
1417
|
-
}), Oa = W(Ea), Na = {}, Ra = { class: "flex flex-col justify-center page-container" };
|
|
1418
|
-
function Aa(e,
|
|
1419
|
-
const
|
|
1417
|
+
}), Oa = W("PPage", Ea), Na = {}, Ra = { class: "flex flex-col justify-center page-container" };
|
|
1418
|
+
function Aa(e, n) {
|
|
1419
|
+
const o = be;
|
|
1420
1420
|
return p(), U("div", Ra, [
|
|
1421
|
-
c(
|
|
1421
|
+
c(o, {
|
|
1422
1422
|
status: "500",
|
|
1423
1423
|
title: "服务器错误",
|
|
1424
1424
|
description: "抱歉,服务器出错了"
|
|
@@ -1426,10 +1426,10 @@ function Aa(e, s) {
|
|
|
1426
1426
|
]);
|
|
1427
1427
|
}
|
|
1428
1428
|
const Ma = /* @__PURE__ */ F(Na, [["render", Aa], ["__scopeId", "data-v-89cb65c7"]]), za = {}, Ba = { class: "flex flex-col justify-center page-container" };
|
|
1429
|
-
function Da(e,
|
|
1430
|
-
const
|
|
1429
|
+
function Da(e, n) {
|
|
1430
|
+
const o = be;
|
|
1431
1431
|
return p(), U("div", Ba, [
|
|
1432
|
-
c(
|
|
1432
|
+
c(o, {
|
|
1433
1433
|
status: "404",
|
|
1434
1434
|
title: "资源不存在",
|
|
1435
1435
|
description: "抱歉,你访问的页面不存在"
|
|
@@ -1437,17 +1437,17 @@ function Da(e, s) {
|
|
|
1437
1437
|
]);
|
|
1438
1438
|
}
|
|
1439
1439
|
const Ia = /* @__PURE__ */ F(za, [["render", Da], ["__scopeId", "data-v-99232671"]]), Ua = {}, Ha = { class: "flex flex-col justify-center page-container" };
|
|
1440
|
-
function Wa(e,
|
|
1441
|
-
const
|
|
1440
|
+
function Wa(e, n) {
|
|
1441
|
+
const o = be;
|
|
1442
1442
|
return p(), U("div", Ha, [
|
|
1443
|
-
c(
|
|
1443
|
+
c(o, {
|
|
1444
1444
|
status: "403",
|
|
1445
1445
|
title: "禁止访问",
|
|
1446
1446
|
description: "抱歉,你无权访问该页面"
|
|
1447
1447
|
})
|
|
1448
1448
|
]);
|
|
1449
1449
|
}
|
|
1450
|
-
const qa = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16"]]), ja = W(Ma), Va = W(Ia), Fa = W(qa), Ka = we("app-oidc", () => {
|
|
1450
|
+
const qa = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16"]]), ja = W("P500", Ma), Va = W("P404", Ia), Fa = W("P403", qa), Ka = we("app-oidc", () => {
|
|
1451
1451
|
const e = ye({});
|
|
1452
1452
|
return {
|
|
1453
1453
|
setCallback: (u) => e.callback = u,
|
|
@@ -1458,12 +1458,12 @@ const qa = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16
|
|
|
1458
1458
|
}), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ H({
|
|
1459
1459
|
__name: "POidc",
|
|
1460
1460
|
setup(e) {
|
|
1461
|
-
const
|
|
1461
|
+
const n = le(), { callCallback: o, callError: m } = Ka();
|
|
1462
1462
|
return ee(async () => {
|
|
1463
1463
|
try {
|
|
1464
|
-
await n
|
|
1464
|
+
await o(n);
|
|
1465
1465
|
} catch (v) {
|
|
1466
|
-
await m(
|
|
1466
|
+
await m(n, v);
|
|
1467
1467
|
}
|
|
1468
1468
|
}), (v, u) => (p(), U("div", Ya, [...u[0] || (u[0] = [
|
|
1469
1469
|
_("div", { class: "view-auth-callback-content" }, [
|
|
@@ -1473,7 +1473,7 @@ const qa = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16
|
|
|
1473
1473
|
], -1)
|
|
1474
1474
|
])]));
|
|
1475
1475
|
}
|
|
1476
|
-
}), Ja = /* @__PURE__ */ F(Xa, [["__scopeId", "data-v-167395ae"]]), Za = W(Ja), Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1476
|
+
}), Ja = /* @__PURE__ */ F(Xa, [["__scopeId", "data-v-167395ae"]]), Za = W("POidc", Ja), Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1477
1477
|
__proto__: null,
|
|
1478
1478
|
P403: Fa,
|
|
1479
1479
|
P404: Va,
|
|
@@ -1488,9 +1488,9 @@ const qa = /* @__PURE__ */ F(Ua, [["render", Wa], ["__scopeId", "data-v-3baa9c16
|
|
|
1488
1488
|
PPage: Oa,
|
|
1489
1489
|
PRedirect: Pa,
|
|
1490
1490
|
PTable: Nt
|
|
1491
|
-
}, Symbol.toStringTag, { value: "Module" })), Qa = (e,
|
|
1492
|
-
|
|
1493
|
-
}),
|
|
1491
|
+
}, Symbol.toStringTag, { value: "Module" })), Qa = (e, n) => (Object.values(Ga).forEach((o) => {
|
|
1492
|
+
o.install && e.use(o);
|
|
1493
|
+
}), n?.(), e), rn = {
|
|
1494
1494
|
install: Qa
|
|
1495
1495
|
};
|
|
1496
1496
|
export {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(N,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],n):(N=typeof globalThis<"u"?globalThis:N||self,n(N.naiveplus={},N.naiveUi,N.Vue,N.antd,N.pinia,N.vueRouter,N.elementResizeDetectorMaker,N.Draggable))})(this,(function(N,n,e,T,Y,M,he,_e){"use strict";const ye={class:"text-lg font-medium"},be={id:"data-content"},ke={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},we=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:s}){const a=e.ref(null),m=n.useDialog(),g=n.useMessage(),i=e.ref(!1),_=e.ref([]),c=e.ref([]),B=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async b=>{B.value.page=b,await u()},onUpdatePageSize:async b=>{B.value.pageSize=b,await u()}}),y=t,r=b=>{const k=P=>{const L=[];return b&&b.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&L.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(n.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(P)}})}),L};return{title:"操作",key:"actions",width:100,fixed:"right",render:P=>{let L=[];if(y.onEdit&&L.push({label:"编辑",key:"edit",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.EditOutlined)}),props:{onClick:async()=>await y.onEdit(P)}}),y.onDelete&&L.push({label:"删除",key:"delete",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.DeleteOutlined)}),props:{onClick:()=>C(P)}}),L=[...L,...k(P)],!(L.length<=0))return e.h(n.NDropdown,{options:L,placement:"bottom-start"},{default:()=>e.h(n.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(n.NIcon,()=>e.h(T.MoreOutlined))]})})}}},V=e.computed(()=>{const b=y.columns.filter(P=>P.key!="action").map(P=>({title:P.title,key:P.key,width:P.width,fixed:P.fixed??!1,render:P.render,ellipsis:P.ellipsis?{tooltip:!0}:!1})),k=y.columns.reduce((P,L)=>L.key==="action"?L:P,void 0)?.action;return k&&k?.length>0||y.onEdit||y.onDelete?[{type:"selection",fixed:"left"},...b,r(k)]:[{type:"selection",fixed:"left"},...b]}),d=async()=>await u(),C=b=>x([b]),S=()=>{const b=w();x(b)},x=b=>{b&&b.length>0&&m.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(y.onDelete)try{await y.onDelete(b)?(u(),g.success("删除成功")):g.error("删除失败")}catch(k){g.error(k.message)}}})},w=()=>_.value?c.value.filter(k=>_.value.includes(k.id)).map(k=>e.toRaw(k)):[],E=()=>w()[0],p=()=>e.toRaw(c.value),u=async()=>{if(!i.value){i.value=!0;try{if(y.onLoad){var{items:b,totalCount:k}=await y.onLoad(B.value.page,B.value.pageSize);c.value=b,B.value.itemCount=k}}catch(P){g.error(P.message)}finally{i.value=!1}}},l=e.computed(()=>{const b=e.unref(a);if(!b)return;const k=b?.$el,P=k.querySelector(".n-data-table-thead "),{bottomIncludeBody:L}=F(P),O=48;let R=12,W=25;const z=k.querySelector(".n-data-table__pagination");if(z){const q=z.offsetHeight;R+=q||0}else R+=28;return L-(O+R+W)}),I=b=>!b||!b.getBoundingClientRect?0:b.getBoundingClientRect(),F=b=>{const k=document.documentElement,P=k.scrollLeft,L=k.scrollTop,O=k.clientLeft,R=k.clientTop,W=window.pageXOffset,z=window.pageYOffset,K=I(b),{left:q,top:X,width:J,height:o}=K,f=(W||P)-(O||0),h=(z||L)-(R||0),$=q+W,j=X+z,Z=$-f,G=j-h,ue=window.document.documentElement.clientWidth,ge=window.document.documentElement.clientHeight;return{left:Z,top:G,right:ue-J-Z,bottom:ge-o-G,rightIncludeBody:ue-Z,bottomIncludeBody:ge-G}};return e.onMounted(async()=>await u()),s({getData:p,getSelectedRow:E,getSelectedRows:w,refreshData:u,resetPage:()=>{B.value.page=1}}),(b,k)=>{const P=n.NTooltip,L=n.NSpace,O=n.NDataTable;return e.openBlock(),e.createBlock(e.unref(n.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(L,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(L,null,{default:e.withCtx(()=>[y.onAdd?(e.openBlock(),e.createBlock(P,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:y.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(T.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[k[1]||(k[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),y.onDelete?(e.openBlock(),e.createBlock(P,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[k[2]||(k[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(P,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:d},{default:e.withCtx(()=>[e.createVNode(e.unref(T.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[k[3]||(k[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",be,[b.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(b.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:a,"checked-row-keys":_.value,"onUpdate:checkedRowKeys":k[0]||(k[0]=R=>_.value=R),"max-height":l.value,loading:i.value,bordered:!1,"single-line":!1,columns:V.value,data:c.value,pagination:B.value,"row-key":R=>R[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=t=>{const s=t;return s.install=function(a){a.component(s.__name,t)},t},Q=D(we),Ne=["Redirect","RedirectSon","login"],H=Y.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],menus:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initMenus:p=>{p.sort((u,l)=>u.affix&&!l.affix?-1:!u.affix&&l.affix?1:Number(l.sort??0)-Number(u.sort??0)),t.menus=p},getMenus:()=>t.menus,initTabs:p=>{p.sort((u,l)=>u.meta.affix&&!l.meta.affix?-1:!u.meta.affix&&l.meta.affix?1:Number(l.meta.sort??0)-Number(u.meta.sort??0)),t.tabs=p},addTab:p=>Ne.includes(p.name)?!1:(t.tabs?.some(l=>l.fullPath==p.fullPath)||t.tabs?.push(p),!0),getCurrentTab:()=>{const p=M.useRoute();return t.tabs.find(u=>u.fullPath==p.fullPath)},closeCurrentTab:p=>{const u=t.tabs.findIndex(l=>l.fullPath==p.fullPath);t.tabs.splice(u,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(p=>p?.meta?.affix??!1)},closeOtherTabs:p=>{t.tabs=t.tabs.filter(u=>u.fullPath==p.fullPath||(u?.meta?.affix??!1))},closeLeftTabs:p=>{const u=t.tabs.findIndex(l=>l.fullPath==p.fullPath);t.tabs=t.tabs.filter((l,I)=>I>=u||(l?.meta?.affix??!1))},closeRightTabs:p=>{const u=t.tabs.findIndex(l=>l.fullPath==p.fullPath);t.tabs=t.tabs.filter((l,I)=>I<=u||(l?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:p=>{t.title=p},setLogo:p=>{t.logo=p},setUser:(p,u)=>{t.uid=p,t.uname=u},setSettingPages:p=>{t.settingPages=p},setLogout:p=>{t.logout=p},enableLanguage:p=>{t.enableLanguage=p}}}),Ce={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const s=H();return(a,m)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(e.unref(n.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(s).state.logo,class:e.normalizeClass({"mr-2":!e.unref(s).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(s).state.title),513),[[e.vShow,!e.unref(s).state.collapsed]])]))}}),A=(t,s)=>{const a=t.__vccOpts||t;for(const[m,g]of s)a[m]=g;return a},Pe=A(xe,[["__scopeId","data-v-e48aeefa"]]),Ve={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},U=Y.defineStore("language",()=>{const t=e.ref(Ve),s=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async r=>{if(t.value.currentLanguage===r)return;const V=(await s()).find(d=>d.key===r);V&&(t.value.currentLanguage=V.key,t.value.selectLanguage(V))},selectLanguageCallback:async r=>{t.value.selectLanguage=r},initLanguagesCallback:async r=>{t.value.initLanguages=r},getLanguages:s,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await s()).find(r=>r.key===t.value.currentLanguage)},setTranslationApiUrl:r=>{t.value.translationApiUrl=r},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:r=>{(r==="Chinese"||r==="chinese")&&(r="chinese_simplified"),t.value.defaultLanguage=r}}}),Be={key:1},v=e.defineComponent({__name:"PLanguage",setup(t){const{select:s,getLanguages:a,getCurrentLanguage:m,getDefaultLanguage:g,getTranslationApiUrl:i}=U(),_=e.ref(),c=e.ref([]),B=async r=>await s(r),y=async()=>{const r=window.translate;r&&(r.selectLanguageTag.show=!1,r.selectLanguageTag.languages=(await a()).map(V=>V.key).join(","),r.ignore.class.push("ignore-translate-flag"),r.ignore.id.push("ignore-translation"),r.language.setLocal(g()),r.request.api.translate="api/v1/translation",r.request.api.connectTest="api/v1/translation/connect-test",r.request.api.init="api/v1/translation/init",r.request.api.language="api/v1/translation/language",r.request.setHost(i()),r.request.listener.start(),r.listener.start(),r.whole.enableAll(),r.execute())};return e.onMounted(async()=>{await e.nextTick(),await y(),_.value=await m(),c.value=await a()}),(r,V)=>{const d=n.NIcon,C=n.NButton;return c.value.length>0?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:B,options:c.value},{default:e.withCtx(()=>[e.createVNode(C,{quaternary:"",type:"info"},{default:e.withCtx(()=>[_.value?(e.openBlock(),e.createElementBlock("label",Be,e.toDisplayString(_.value?.label),1)):(e.openBlock(),e.createBlock(d,{key:0,size:"18"},{default:e.withCtx(()=>[...V[0]||(V[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{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",fill:"currentColor"}),e.createElementVNode("path",{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",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Se={class:"layout-header"},Le={class:"layout-header-left"},Ee={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Me={class:"avatar"},Re=A(e.defineComponent({__name:"PHeader",setup(t){const s=n.useMessage(),a=n.useDialog(),m=H(),g=M.useRouter(),i=M.useRoute(),_=e.inject("reloadPage"),c=x=>g.push({name:x}),B=e.computed(()=>y(i.matched)),y=x=>x.map(w=>{const E={key:w.name,label:w.meta.title,icon:w.meta.icon,meta:w.meta,disabled:w.path==="/",children:void 0};return w.children&&w.children.length>0&&(E.children=y(w.children)),E}),r=e.ref(!1),V=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),r.value=!1):(document.documentElement.requestFullscreen(),r.value=!0)},d=e.computed(()=>{const x=[];return x.push({label:"退出登录",key:"logout"}),m.state.settingPages&&m.state.settingPages.length>0&&m.state.settingPages.forEach(w=>{x.push({label:w.title,key:w.route})}),x}),C=x=>{x==="logout"?S():g.push({name:x})},S=()=>{a.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(m.state.logout)try{await m.state.logout(),localStorage.removeItem("TABS-ROUTES"),s.error("退出成功")}catch(x){console.error(x),s.error("退出登录失败")}finally{location.reload()}else s.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(x,w)=>{const E=n.NTooltip,p=n.NDivider,u=n.NAvatar;return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Le,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:w[0]||(w[0]=(...l)=>e.unref(m).collapse&&e.unref(m).collapse(...l))},[e.unref(m).state.collapsed?(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:w[1]||(w[1]=(...l)=>e.unref(_)&&e.unref(_)(...l))},[e.createVNode(e.unref(n.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(n.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.label},[l.label?(e.openBlock(),e.createBlock(e.unref(n.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[l.children&&l.children.length?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,options:l.children,onSelect:c},{default:e.withCtx(()=>[e.createElementVNode("span",Ee,[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(m).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(v)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(E,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",onClick:e.withModifiers(V,["stop"])},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(e.unref(T.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(T.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[w[2]||(w[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",onSelect:C,options:d.value},{default:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createElementVNode("span",null,e.toDisplayString(e.unref(m).state.uname),1),e.createVNode(p,{vertical:""}),e.createVNode(u,{round:"",src:e.unref(m).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),Ae={class:"mt-1"},ze=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(s,a)=>{const m=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ae,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(({Component:g,route:i})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g),{key:i.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=A(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(o=>({v4f917f8c:a.value,v1c2fb72a:m.value}));const s=n.useThemeVars(),a=e.computed(()=>s.value.cardColor),m=e.computed(()=>s.value.textColor1),g=n.useMessage(),i=M.useRoute(),_=M.useRouter(),c=e.ref(null),B=e.ref(null),y=e.ref(!1),r=H(),V=e.computed(()=>r.state.tabs),d=e.reactive({activeKey:i.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),C=["Login","Redirect","ErrorPage"],S=o=>({meta:o.meta,name:o.name,fullPath:o.fullPath??o.path,path:o.path,hash:o.hash??"",query:o.query??{},params:o.params??{}}),x=e.computed(()=>{const h=r.state.collapsed?"64px":"272px";return{left:h,width:`calc(100% - ${h})`}}),w=e.computed(()=>{const o=V.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:y.value||o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.MinusOutlined)})}]}),E=()=>{let o=[S(i)];_.getRoutes().filter(f=>f.meta.affix).forEach(f=>{const h=S(f);o.every($=>$.name!==h.name)&&o.push(h)});try{if(r.state.cacheTabs){const f=localStorage.getItem("TABS_ROUTES");o=f?JSON.parse(f):o}}finally{return o}},p=o=>{const f=_.getRoutes();o.forEach(h=>{const $=f.find(j=>j.path===h.path);$&&(h.meta=$.meta||h.meta,h.name=$.name||h.name)}),r.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(o))},u=()=>{const o=E();p(o),r.initTabs(o)},l=async o=>{if(await e.nextTick(),!c.value)return;const f=c.value.offsetWidth,h=c.value.scrollWidth;f<h?(d.scrollable=!0,o&&[...c.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(j=>{j.id===`tag${d.activeKey.split("/").join("/")}`&&j.scrollIntoView&&j.scrollIntoView()})):d.scrollable=!1},I=o=>!(o.draggedContext.element.meta.affix||o.relatedContext.element.meta.affix),F=()=>{let o;o=he(),o.listenTo(B.value,()=>l(!0))},b=o=>{if(!o||o.fullPath===i.fullPath)return;if(d.activeKey=o.fullPath,toString.call(o)==="[object String]"){_.replace(o).catch(console.error);return}const f=o;_.replace(f).catch(console.error)},k=(o,f)=>{o.preventDefault(),y.value=f.path==="/home",d.showDropdown=!1,e.nextTick().then(()=>{d.showDropdown=!0,d.dropdownX=o.clientX,d.dropdownY=o.clientY})},P=()=>{if(i.meta.keepAlive){var o=_.currentRoute.value.matched.find(f=>f.name==i.name);o&&o.components?.default?.name}},L=o=>{if(V.value.length===1)return g.warning("这已经是最后一页,不能再关闭了!");if(P(),r.closeCurrentTab(o),d.activeKey===o.fullPath){const f=V.value[Math.max(0,V.value.length-1)];d.activeKey=f.fullPath,_.push(f)}l()},O=o=>{const f=V.value.find(h=>h.fullPath==o.fullPath);f&&L(f)},R=o=>{r.closeOtherTabs(o),d.activeKey=o.fullPath,l()},W=()=>{r.closeAllTabs(),l()},z=e.inject("reloadPage"),K=o=>{switch(o){case"1":z();break;case"2":L(i);break;case"3":R(i);break;case"4":W();break}l(),d.showDropdown=!1},q=(o,f)=>{const h=c.value.scrollLeft,$=f>0&&h+f>=o||f<0&&h+f<=o?o:h+f;if(c.value&&c.value.scrollTo($,0),$!==o)return window.requestAnimationFrame(()=>q(o,f))},X=()=>{const o=c.value.offsetWidth,f=c.value.scrollLeft;if(!f)return;const h=f>o?f-o:0;q(h,(h-f)/20)},J=()=>{const o=c.value.offsetWidth,f=c.value.scrollWidth,h=c.value.scrollLeft;if(f-h<=o)return;const $=f-h>o*2?h+o:f-o;q($,($-h)/20)};return window.addEventListener("beforeunload",()=>{r.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(V.value))}),window.addEventListener("scroll",o=>{let f=o.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;d.isMultiHeaderFixed=f>=64},!0),e.watch(()=>i.fullPath,o=>{C.includes(i.name)||(d.activeKey=o,r.addTab(S(i)),l(!0))},{immediate:!0}),u(),e.onMounted(()=>F()),(o,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(x.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:B,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":d.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!d.scrollable}]),onClick:X},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!d.scrollable}]),onClick:J},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:c,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{animation:"300","item-key":"fullPath",class:"flex",list:V.value,move:I},{item:e.withCtx(({element:h})=>[e.createElementVNode("div",{class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":d.activeKey===h.fullPath}]),id:`tag${h.fullPath.split("/").join("/")}`,onClick:e.withModifiers($=>b(h),["stop"]),onContextmenu:$=>k($,h)},[e.createElementVNode("span",null,e.toDisplayString(h.meta.title),1),h.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"14",onClick:e.withModifiers($=>O(h),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(T.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",placement:"bottom-end",options:w.value,onSelect:K},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(n.NDropdown),{placement:"bottom-start",show:d.showDropdown,x:d.dropdownX,y:d.dropdownY,options:w.value,onClickoutside:f[0]||(f[0]=h=>d.showDropdown=!1),onSelect:K},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-50f5202c"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const s=e.ref([]),a=M.useRoute(),m=M.useRouter(),g=H(),i=e.ref(a.name),_=e.ref(a.matched&&a.matched.length?a.matched.map(C=>C.name):[]),c=C=>{a.name!==C&&(/http(s)?:/.test(C)?window.open(C):m.push({name:C}))},B=C=>{if(!C)return;const S=C.find(x=>_.value.indexOf(x)===-1);_.value=S?[S]:[]},y=()=>{const C=a.matched;_.value=C.map(x=>x.name);const S=a.meta?.activeMenu||"";i.value=S||a.name},r=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"],V=(C,S=[],x=!1)=>{const w=[];if(!C||C.length===0)return w;C=C.sort((E,p)=>{let u=(p.children?.length?1:0)-(E.children?.length?1:0);return u===0&&(u=Number(E.meta?.sort??0)-Number(p.meta?.sort??0)),u});for(const E of C){if(x||E.meta?.hidden||r.includes(E.path.toLowerCase())){S.push(E.name),V(E.children||[],S,!0);continue}const p=E.children?.filter(F=>!F.meta?.hidden)||[],u=p.length===1,l=u?p[0]:E,I={key:l.name,label:l.meta?.title,affix:l.meta?.affix,sort:Number(u?E.meta?.sort??0:l.meta?.sort??0),path:l.path,redirect:l.redirect,icon:u?E.meta?.icon:l.meta?.icon,permission:l.meta?.permission,meta:l.meta,children:void 0};if(l.children&&l.children.length>0&&(I.children=V(l.children,S,x),!u&&(!I.children||I.children.length===0))){S.push(l.name);continue}S.includes(l.name)||(w.push(I),S.push(l.name))}return w},d=()=>{const C=m.getRoutes();s.value=V(C)};return e.watch(()=>a.fullPath,()=>{y()}),e.onMounted(()=>{d(),y()}),(C,S)=>(e.openBlock(),e.createBlock(e.unref(n.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:s.value,collapsed:e.unref(g).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":_.value,value:i.value,"onUpdate:value":c,"onUpdate:expandedKeys":B},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=A(e.defineComponent({__name:"PLayout",setup(t){const s=H(),a=e.ref(!1),m=()=>{a.value=!0,e.nextTick(()=>a.value=!1)};return e.provide("reloadPage",m),(g,i)=>{const _=n.NBackTop;return e.openBlock(),e.createBlock(e.unref(n.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(s).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(s).collapse,onExpand:e.unref(s).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(n.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Re)]),_:1}),e.createVNode(e.unref(n.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(ze,{loading:a.value},null,8,["loading"])])])]),_:1}),e.createVNode(_,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,s){const a=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(a)}const ee=D(A(Ze,[["render",Ge]])),te=D(Je),oe=D(e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(s,a)=>{const m=n.NConfigProvider;return e.openBlock(),e.createBlock(m,{locale:e.unref(n.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(n.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ne=D(e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},onSave:{},onClose:{},onAfterEnter:{},onAfterLeave:{},onUpdateVisible:{}},emits:["update:visible","update:loading"],setup(t,{expose:s,emit:a}){const m=n.useMessage(),g=e.ref(!1),i=e.ref(!1),_=a,c=t,B=async()=>{try{g.value=!0,c.onSave&&await c.onSave()&&y()}catch(d){d instanceof Error&&m.error(d.message),console.error(d)}finally{g.value=!1}},y=()=>{g.value=!1,i.value=!1,_("update:visible",!1)},r=async()=>{try{i.value=!0,c.onClose?await c.onClose()&&y():y()}catch(d){m.error(d.message)}finally{i.value=!1}};return s({open:()=>{g.value=!1,i.value=!1,_("update:visible",!0)},close:y}),(d,C)=>{const S=n.NText,x=n.NButton,w=n.NSpace;return e.openBlock(),e.createBlock(e.unref(n.NModal),e.mergeProps({ref:"$modal",preset:"card"},d.$attrs,{"header-class":"bg-gray-50",show:c.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${c.width}px`},onClose:y,onAfterEnter:c.onAfterEnter,onAfterLeave:c.onAfterLeave,onUpdateVisible:c.onUpdateVisible}),{header:e.withCtx(()=>[d.$slots.header?e.renderSlot(d.$slots,"header",{key:0}):c.title?(e.openBlock(),e.createBlock(S,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(d.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${c.height}px`})},[e.renderSlot(d.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(d.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(w,{justify:"end"},{default:e.withCtx(()=>[c.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,type:"primary",loading:g.value,onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(d.$slots,"action-extra"),c.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:1,loading:i.value,onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style","onAfterEnter","onAfterLeave","onUpdateVisible"])}}})),ae=D(v),Qe=e.defineComponent({name:"Redirect",setup(){const t=M.useRoute(),s=M.useRouter();return e.onBeforeMount(()=>{const{params:a,query:m}=t,{path:g}=a;s.replace({path:"/"+(Array.isArray(g)?g.join("/"):g),query:m})}),()=>React.createElement(n.NEmpty,null)}}),le=D(Qe),Ue={class:"frame"},ve=["src"],se=D(A(e.defineComponent({__name:"PIframe",setup(t){const s=M.useRoute(),a=e.ref(!1),m=e.ref(null),g=e.ref("");e.unref(s.meta)?.frameSrc&&(g.value=e.unref(s.meta)?.frameSrc);function i(){a.value=!1}function _(){e.nextTick(()=>{const c=e.unref(m);if(!c)return;const B=c;B.attachEvent?B.attachEvent("onload",()=>{i()}):c.onload=()=>{i()}})}return e.onMounted(()=>{a.value=!0,_()}),(c,B)=>{const y=n.NSpin;return e.openBlock(),e.createBlock(y,{show:a.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:g.value,class:"frame-iframe",ref_key:"frameRef",ref:m},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D(e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>T.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const s=t;return(a,m)=>{const g=n.NIcon,i=n.NAvatar,_=n.NSpace,c=n.NCard;return e.openBlock(),e.createElementBlock("div",et,[s.title?(e.openBlock(),e.createBlock(c,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(_,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(_,{align:"center",size:16},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(i,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(g,{size:24,component:s.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(s.title),1),e.createElementVNode("div",ot,e.toDisplayString(s.subtitle??s.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),a.$slots.search?(e.openBlock(),e.createBlock(c,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"search")]),_:3})):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createBlock(c,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,s){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(a,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=A(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),rt={},ct={class:"flex flex-col justify-center page-container"};function it(t,s){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(a,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=A(rt,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,s){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(a,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const ut=A(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ce=D(st),ie=D(dt),de=D(ut),fe=Y.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:i=>t.callback=i,callCallback:async i=>await t.callback?.(i),setError:i=>t.error=i,callError:async(i,_)=>await t.error?.(i,_)}}),gt={class:"view-auth-callback"},pe=D(A(e.defineComponent({__name:"POidc",setup(t){const s=M.useRouter(),{callCallback:a,callError:m}=fe();return e.onMounted(async()=>{try{await a(s)}catch(g){await m(s,g)}}),(g,i)=>(e.openBlock(),e.createElementBlock("div",gt,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ht=Object.freeze(Object.defineProperty({__proto__:null,P403:de,P404:ie,P500:ce,PApplication:oe,PEmptyLayout:ee,PIframe:se,PLanguage:ae,PLayout:te,PModal:ne,POidc:pe,PPage:re,PRedirect:le,PTable:Q},Symbol.toStringTag,{value:"Module"})),me=(t,s)=>(Object.values(ht).forEach(a=>{a.install&&t.use(a)}),s?.(),t),_t={install:me};N.P403=de,N.P404=ie,N.P500=ce,N.PApplication=oe,N.PEmptyLayout=ee,N.PIframe=se,N.PLanguage=ae,N.PLayout=te,N.PModal=ne,N.POidc=pe,N.PPage=re,N.PRedirect=le,N.PTable=Q,N.default=_t,N.install=me,N.useLanguageStore=U,N.useLayoutStore=H,N.useOidcStore=fe,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(N,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],n):(N=typeof globalThis<"u"?globalThis:N||self,n(N.naiveplus={},N.naiveUi,N.Vue,N.antd,N.pinia,N.vueRouter,N.elementResizeDetectorMaker,N.Draggable))})(this,(function(N,n,e,T,Y,M,he,_e){"use strict";const ye={class:"text-lg font-medium"},be={id:"data-content"},ke={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},we=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:a}){const l=e.ref(null),p=n.useDialog(),g=n.useMessage(),i=e.ref(!1),_=e.ref([]),c=e.ref([]),B=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async b=>{B.value.page=b,await u()},onUpdatePageSize:async b=>{B.value.pageSize=b,await u()}}),y=t,r=b=>{const k=P=>{const S=[];return b&&b.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&S.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(n.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(P)}})}),S};return{title:"操作",key:"actions",width:100,fixed:"right",render:P=>{let S=[];if(y.onEdit&&S.push({label:"编辑",key:"edit",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.EditOutlined)}),props:{onClick:async()=>await y.onEdit(P)}}),y.onDelete&&S.push({label:"删除",key:"delete",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.DeleteOutlined)}),props:{onClick:()=>C(P)}}),S=[...S,...k(P)],!(S.length<=0))return e.h(n.NDropdown,{options:S,placement:"bottom-start"},{default:()=>e.h(n.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(n.NIcon,()=>e.h(T.MoreOutlined))]})})}}},V=e.computed(()=>{const b=y.columns.filter(P=>P.key!="action").map(P=>({title:P.title,key:P.key,width:P.width,fixed:P.fixed??!1,render:P.render,ellipsis:P.ellipsis?{tooltip:!0}:!1})),k=y.columns.reduce((P,S)=>S.key==="action"?S:P,void 0)?.action;return k&&k?.length>0||y.onEdit||y.onDelete?[{type:"selection",fixed:"left"},...b,r(k)]:[{type:"selection",fixed:"left"},...b]}),d=async()=>await u(),C=b=>x([b]),L=()=>{const b=w();x(b)},x=b=>{b&&b.length>0&&p.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(y.onDelete)try{await y.onDelete(b)?(u(),g.success("删除成功")):g.error("删除失败")}catch(k){g.error(k.message)}}})},w=()=>_.value?c.value.filter(k=>_.value.includes(k.id)).map(k=>e.toRaw(k)):[],E=()=>w()[0],m=()=>e.toRaw(c.value),u=async()=>{if(!i.value){i.value=!0;try{if(y.onLoad){var{items:b,totalCount:k}=await y.onLoad(B.value.page,B.value.pageSize);c.value=b,B.value.itemCount=k}}catch(P){g.error(P.message)}finally{i.value=!1}}},s=e.computed(()=>{const b=e.unref(l);if(!b)return;const k=b?.$el,P=k.querySelector(".n-data-table-thead "),{bottomIncludeBody:S}=F(P),O=48;let R=12,W=25;const z=k.querySelector(".n-data-table__pagination");if(z){const q=z.offsetHeight;R+=q||0}else R+=28;return S-(O+R+W)}),I=b=>!b||!b.getBoundingClientRect?0:b.getBoundingClientRect(),F=b=>{const k=document.documentElement,P=k.scrollLeft,S=k.scrollTop,O=k.clientLeft,R=k.clientTop,W=window.pageXOffset,z=window.pageYOffset,K=I(b),{left:q,top:X,width:J,height:o}=K,f=(W||P)-(O||0),h=(z||S)-(R||0),$=q+W,j=X+z,Z=$-f,G=j-h,ue=window.document.documentElement.clientWidth,ge=window.document.documentElement.clientHeight;return{left:Z,top:G,right:ue-J-Z,bottom:ge-o-G,rightIncludeBody:ue-Z,bottomIncludeBody:ge-G}};return e.onMounted(async()=>await u()),a({getData:m,getSelectedRow:E,getSelectedRows:w,refreshData:u,resetPage:()=>{B.value.page=1}}),(b,k)=>{const P=n.NTooltip,S=n.NSpace,O=n.NDataTable;return e.openBlock(),e.createBlock(e.unref(n.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(S,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(S,null,{default:e.withCtx(()=>[y.onAdd?(e.openBlock(),e.createBlock(P,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:y.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(T.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[k[1]||(k[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),y.onDelete?(e.openBlock(),e.createBlock(P,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:L},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[k[2]||(k[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(P,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:d},{default:e.withCtx(()=>[e.createVNode(e.unref(T.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[k[3]||(k[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",be,[b.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(b.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:l,"checked-row-keys":_.value,"onUpdate:checkedRowKeys":k[0]||(k[0]=R=>_.value=R),"max-height":s.value,loading:i.value,bordered:!1,"single-line":!1,columns:V.value,data:c.value,pagination:B.value,"row-key":R=>R[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=(t,a)=>{const l=a;return l.install=function(p){p.component(t,a)},a},Q=D("PTable",we),Ne=["Redirect","RedirectSon","login"],H=Y.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],menus:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initMenus:m=>{m.sort((u,s)=>u.affix&&!s.affix?-1:!u.affix&&s.affix?1:Number(s.sort??0)-Number(u.sort??0)),t.menus=m},getMenus:()=>t.menus,initTabs:m=>{m.sort((u,s)=>u.meta.affix&&!s.meta.affix?-1:!u.meta.affix&&s.meta.affix?1:Number(s.meta.sort??0)-Number(u.meta.sort??0)),t.tabs=m},addTab:m=>Ne.includes(m.name)?!1:(t.tabs?.some(s=>s.fullPath==m.fullPath)||t.tabs?.push(m),!0),getCurrentTab:()=>{const m=M.useRoute();return t.tabs.find(u=>u.fullPath==m.fullPath)},closeCurrentTab:m=>{const u=t.tabs.findIndex(s=>s.fullPath==m.fullPath);t.tabs.splice(u,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(m=>m?.meta?.affix??!1)},closeOtherTabs:m=>{t.tabs=t.tabs.filter(u=>u.fullPath==m.fullPath||(u?.meta?.affix??!1))},closeLeftTabs:m=>{const u=t.tabs.findIndex(s=>s.fullPath==m.fullPath);t.tabs=t.tabs.filter((s,I)=>I>=u||(s?.meta?.affix??!1))},closeRightTabs:m=>{const u=t.tabs.findIndex(s=>s.fullPath==m.fullPath);t.tabs=t.tabs.filter((s,I)=>I<=u||(s?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:m=>{t.title=m},setLogo:m=>{t.logo=m},setUser:(m,u)=>{t.uid=m,t.uname=u},setSettingPages:m=>{t.settingPages=m},setLogout:m=>{t.logout=m},enableLanguage:m=>{t.enableLanguage=m}}}),Ce={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const a=H();return(l,p)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(e.unref(n.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(a).state.logo,class:e.normalizeClass({"mr-2":!e.unref(a).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(a).state.title),513),[[e.vShow,!e.unref(a).state.collapsed]])]))}}),A=(t,a)=>{const l=t.__vccOpts||t;for(const[p,g]of a)l[p]=g;return l},Pe=A(xe,[["__scopeId","data-v-e48aeefa"]]),Ve={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},U=Y.defineStore("language",()=>{const t=e.ref(Ve),a=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async r=>{if(t.value.currentLanguage===r)return;const V=(await a()).find(d=>d.key===r);V&&(t.value.currentLanguage=V.key,t.value.selectLanguage(V))},selectLanguageCallback:async r=>{t.value.selectLanguage=r},initLanguagesCallback:async r=>{t.value.initLanguages=r},getLanguages:a,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await a()).find(r=>r.key===t.value.currentLanguage)},setTranslationApiUrl:r=>{t.value.translationApiUrl=r},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:r=>{(r==="Chinese"||r==="chinese")&&(r="chinese_simplified"),t.value.defaultLanguage=r}}}),Be={key:1},v=e.defineComponent({__name:"PLanguage",setup(t){const{select:a,getLanguages:l,getCurrentLanguage:p,getDefaultLanguage:g,getTranslationApiUrl:i}=U(),_=e.ref(),c=e.ref([]),B=async r=>await a(r),y=async()=>{const r=window.translate;r&&(r.selectLanguageTag.show=!1,r.selectLanguageTag.languages=(await l()).map(V=>V.key).join(","),r.ignore.class.push("ignore-translate-flag"),r.ignore.id.push("ignore-translation"),r.language.setLocal(g()),r.request.api.translate="api/v1/translation",r.request.api.connectTest="api/v1/translation/connect-test",r.request.api.init="api/v1/translation/init",r.request.api.language="api/v1/translation/language",r.request.setHost(i()),r.request.listener.start(),r.listener.start(),r.whole.enableAll(),r.execute())};return e.onMounted(async()=>{await e.nextTick(),await y(),_.value=await p(),c.value=await l()}),(r,V)=>{const d=n.NIcon,C=n.NButton;return c.value.length>0?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:B,options:c.value},{default:e.withCtx(()=>[e.createVNode(C,{quaternary:"",type:"info"},{default:e.withCtx(()=>[_.value?(e.openBlock(),e.createElementBlock("label",Be,e.toDisplayString(_.value?.label),1)):(e.openBlock(),e.createBlock(d,{key:0,size:"18"},{default:e.withCtx(()=>[...V[0]||(V[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{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",fill:"currentColor"}),e.createElementVNode("path",{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",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Le={class:"layout-header"},Se={class:"layout-header-left"},Ee={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Me={class:"avatar"},Re=A(e.defineComponent({__name:"PHeader",setup(t){const a=n.useMessage(),l=n.useDialog(),p=H(),g=M.useRouter(),i=M.useRoute(),_=e.inject("reloadPage"),c=x=>g.push({name:x}),B=e.computed(()=>y(i.matched)),y=x=>x.map(w=>{const E={key:w.name,label:w.meta.title,icon:w.meta.icon,meta:w.meta,disabled:w.path==="/",children:void 0};return w.children&&w.children.length>0&&(E.children=y(w.children)),E}),r=e.ref(!1),V=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),r.value=!1):(document.documentElement.requestFullscreen(),r.value=!0)},d=e.computed(()=>{const x=[];return x.push({label:"退出登录",key:"logout"}),p.state.settingPages&&p.state.settingPages.length>0&&p.state.settingPages.forEach(w=>{x.push({label:w.title,key:w.route})}),x}),C=x=>{x==="logout"?L():g.push({name:x})},L=()=>{l.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(p.state.logout)try{await p.state.logout(),localStorage.removeItem("TABS-ROUTES"),a.error("退出成功")}catch(x){console.error(x),a.error("退出登录失败")}finally{location.reload()}else a.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(x,w)=>{const E=n.NTooltip,m=n.NDivider,u=n.NAvatar;return e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",Se,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:w[0]||(w[0]=(...s)=>e.unref(p).collapse&&e.unref(p).collapse(...s))},[e.unref(p).state.collapsed?(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:w[1]||(w[1]=(...s)=>e.unref(_)&&e.unref(_)(...s))},[e.createVNode(e.unref(n.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(n.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.label},[s.label?(e.openBlock(),e.createBlock(e.unref(n.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[s.children&&s.children.length?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,options:s.children,onSelect:c},{default:e.withCtx(()=>[e.createElementVNode("span",Ee,[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(p).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(v)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(E,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",onClick:e.withModifiers(V,["stop"])},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(e.unref(T.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(T.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[w[2]||(w[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",onSelect:C,options:d.value},{default:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createElementVNode("span",null,e.toDisplayString(e.unref(p).state.uname),1),e.createVNode(m,{vertical:""}),e.createVNode(u,{round:"",src:e.unref(p).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),Ae={class:"mt-1"},ze=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(a,l)=>{const p=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ae,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:0},{default:e.withCtx(({Component:g,route:i})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g),{key:i.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=A(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(o=>({v4f917f8c:l.value,v1c2fb72a:p.value}));const a=n.useThemeVars(),l=e.computed(()=>a.value.cardColor),p=e.computed(()=>a.value.textColor1),g=n.useMessage(),i=M.useRoute(),_=M.useRouter(),c=e.ref(null),B=e.ref(null),y=e.ref(!1),r=H(),V=e.computed(()=>r.state.tabs),d=e.reactive({activeKey:i.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),C=["Login","Redirect","ErrorPage"],L=o=>({meta:o.meta,name:o.name,fullPath:o.fullPath??o.path,path:o.path,hash:o.hash??"",query:o.query??{},params:o.params??{}}),x=e.computed(()=>{const h=r.state.collapsed?"64px":"272px";return{left:h,width:`calc(100% - ${h})`}}),w=e.computed(()=>{const o=V.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:y.value||o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(T.MinusOutlined)})}]}),E=()=>{let o=[L(i)];_.getRoutes().filter(f=>f.meta.affix).forEach(f=>{const h=L(f);o.every($=>$.name!==h.name)&&o.push(h)});try{if(r.state.cacheTabs){const f=localStorage.getItem("TABS_ROUTES");o=f?JSON.parse(f):o}}finally{return o}},m=o=>{const f=_.getRoutes();o.forEach(h=>{const $=f.find(j=>j.path===h.path);$&&(h.meta=$.meta||h.meta,h.name=$.name||h.name)}),r.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(o))},u=()=>{const o=E();m(o),r.initTabs(o)},s=async o=>{if(await e.nextTick(),!c.value)return;const f=c.value.offsetWidth,h=c.value.scrollWidth;f<h?(d.scrollable=!0,o&&[...c.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(j=>{j.id===`tag${d.activeKey.split("/").join("/")}`&&j.scrollIntoView&&j.scrollIntoView()})):d.scrollable=!1},I=o=>!(o.draggedContext.element.meta.affix||o.relatedContext.element.meta.affix),F=()=>{let o;o=he(),o.listenTo(B.value,()=>s(!0))},b=o=>{if(!o||o.fullPath===i.fullPath)return;if(d.activeKey=o.fullPath,toString.call(o)==="[object String]"){_.replace(o).catch(console.error);return}const f=o;_.replace(f).catch(console.error)},k=(o,f)=>{o.preventDefault(),y.value=f.path==="/home",d.showDropdown=!1,e.nextTick().then(()=>{d.showDropdown=!0,d.dropdownX=o.clientX,d.dropdownY=o.clientY})},P=()=>{if(i.meta.keepAlive){var o=_.currentRoute.value.matched.find(f=>f.name==i.name);o&&o.components?.default?.name}},S=o=>{if(V.value.length===1)return g.warning("这已经是最后一页,不能再关闭了!");if(P(),r.closeCurrentTab(o),d.activeKey===o.fullPath){const f=V.value[Math.max(0,V.value.length-1)];d.activeKey=f.fullPath,_.push(f)}s()},O=o=>{const f=V.value.find(h=>h.fullPath==o.fullPath);f&&S(f)},R=o=>{r.closeOtherTabs(o),d.activeKey=o.fullPath,s()},W=()=>{r.closeAllTabs(),s()},z=e.inject("reloadPage"),K=o=>{switch(o){case"1":z();break;case"2":S(i);break;case"3":R(i);break;case"4":W();break}s(),d.showDropdown=!1},q=(o,f)=>{const h=c.value.scrollLeft,$=f>0&&h+f>=o||f<0&&h+f<=o?o:h+f;if(c.value&&c.value.scrollTo($,0),$!==o)return window.requestAnimationFrame(()=>q(o,f))},X=()=>{const o=c.value.offsetWidth,f=c.value.scrollLeft;if(!f)return;const h=f>o?f-o:0;q(h,(h-f)/20)},J=()=>{const o=c.value.offsetWidth,f=c.value.scrollWidth,h=c.value.scrollLeft;if(f-h<=o)return;const $=f-h>o*2?h+o:f-o;q($,($-h)/20)};return window.addEventListener("beforeunload",()=>{r.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(V.value))}),window.addEventListener("scroll",o=>{let f=o.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;d.isMultiHeaderFixed=f>=64},!0),e.watch(()=>i.fullPath,o=>{C.includes(i.name)||(d.activeKey=o,r.addTab(L(i)),s(!0))},{immediate:!0}),u(),e.onMounted(()=>F()),(o,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(x.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:B,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":d.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!d.scrollable}]),onClick:X},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!d.scrollable}]),onClick:J},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:c,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{animation:"300","item-key":"fullPath",class:"flex",list:V.value,move:I},{item:e.withCtx(({element:h})=>[e.createElementVNode("div",{class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":d.activeKey===h.fullPath}]),id:`tag${h.fullPath.split("/").join("/")}`,onClick:e.withModifiers($=>b(h),["stop"]),onContextmenu:$=>k($,h)},[e.createElementVNode("span",null,e.toDisplayString(h.meta.title),1),h.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"14",onClick:e.withModifiers($=>O(h),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(T.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",placement:"bottom-end",options:w.value,onSelect:K},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(n.NDropdown),{placement:"bottom-start",show:d.showDropdown,x:d.dropdownX,y:d.dropdownY,options:w.value,onClickoutside:f[0]||(f[0]=h=>d.showDropdown=!1),onSelect:K},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-50f5202c"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const a=e.ref([]),l=M.useRoute(),p=M.useRouter(),g=H(),i=e.ref(l.name),_=e.ref(l.matched&&l.matched.length?l.matched.map(C=>C.name):[]),c=C=>{l.name!==C&&(/http(s)?:/.test(C)?window.open(C):p.push({name:C}))},B=C=>{if(!C)return;const L=C.find(x=>_.value.indexOf(x)===-1);_.value=L?[L]:[]},y=()=>{const C=l.matched;_.value=C.map(x=>x.name);const L=l.meta?.activeMenu||"";i.value=L||l.name},r=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"],V=(C,L=[],x=!1)=>{const w=[];if(!C||C.length===0)return w;C=C.sort((E,m)=>{let u=(m.children?.length?1:0)-(E.children?.length?1:0);return u===0&&(u=Number(E.meta?.sort??0)-Number(m.meta?.sort??0)),u});for(const E of C){if(x||E.meta?.hidden||r.includes(E.path.toLowerCase())){L.push(E.name),V(E.children||[],L,!0);continue}const m=E.children?.filter(F=>!F.meta?.hidden)||[],u=m.length===1,s=u?m[0]:E,I={key:s.name,label:s.meta?.title,affix:s.meta?.affix,sort:Number(u?E.meta?.sort??0:s.meta?.sort??0),path:s.path,redirect:s.redirect,icon:u?E.meta?.icon:s.meta?.icon,permission:s.meta?.permission,meta:s.meta,children:void 0};if(s.children&&s.children.length>0&&(I.children=V(s.children,L,x),!u&&(!I.children||I.children.length===0))){L.push(s.name);continue}L.includes(s.name)||(w.push(I),L.push(s.name))}return w},d=()=>{const C=p.getRoutes();a.value=V(C)};return e.watch(()=>l.fullPath,()=>{y()}),e.onMounted(()=>{d(),y()}),(C,L)=>(e.openBlock(),e.createBlock(e.unref(n.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:a.value,collapsed:e.unref(g).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":_.value,value:i.value,"onUpdate:value":c,"onUpdate:expandedKeys":B},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=A(e.defineComponent({__name:"PLayout",setup(t){const a=H(),l=e.ref(!1),p=()=>{l.value=!0,e.nextTick(()=>l.value=!1)};return e.provide("reloadPage",p),(g,i)=>{const _=n.NBackTop;return e.openBlock(),e.createBlock(e.unref(n.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(a).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(a).collapse,onExpand:e.unref(a).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(n.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Re)]),_:1}),e.createVNode(e.unref(n.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(ze,{loading:l.value},null,8,["loading"])])])]),_:1}),e.createVNode(_,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,a){const l=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(l)}const ee=D("PEmptyLayout",A(Ze,[["render",Ge]])),te=D("PLayout",Je),oe=D("PApplication",e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(a,l)=>{const p=n.NConfigProvider;return e.openBlock(),e.createBlock(p,{locale:e.unref(n.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(n.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ne=D("PModal",e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},onSave:{},onClose:{},onAfterEnter:{},onAfterLeave:{},onUpdateVisible:{}},emits:["update:visible","update:loading"],setup(t,{expose:a,emit:l}){const p=n.useMessage(),g=e.ref(!1),i=e.ref(!1),_=l,c=t,B=async()=>{try{g.value=!0,c.onSave&&await c.onSave()&&y()}catch(d){d instanceof Error&&p.error(d.message),console.error(d)}finally{g.value=!1}},y=()=>{g.value=!1,i.value=!1,_("update:visible",!1)},r=async()=>{try{i.value=!0,c.onClose?await c.onClose()&&y():y()}catch(d){p.error(d.message)}finally{i.value=!1}};return a({open:()=>{g.value=!1,i.value=!1,_("update:visible",!0)},close:y}),(d,C)=>{const L=n.NText,x=n.NButton,w=n.NSpace;return e.openBlock(),e.createBlock(e.unref(n.NModal),e.mergeProps({ref:"$modal",preset:"card"},d.$attrs,{"header-class":"bg-gray-50",show:c.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${c.width}px`},onClose:y,onAfterEnter:c.onAfterEnter,onAfterLeave:c.onAfterLeave,onUpdateVisible:c.onUpdateVisible}),{header:e.withCtx(()=>[d.$slots.header?e.renderSlot(d.$slots,"header",{key:0}):c.title?(e.openBlock(),e.createBlock(L,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(d.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${c.height}px`})},[e.renderSlot(d.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(d.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(w,{justify:"end"},{default:e.withCtx(()=>[c.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,type:"primary",loading:g.value,onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(d.$slots,"action-extra"),c.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:1,loading:i.value,onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style","onAfterEnter","onAfterLeave","onUpdateVisible"])}}})),ae=D("PLanguage",v),Qe=e.defineComponent({name:"Redirect",setup(){const t=M.useRoute(),a=M.useRouter();return e.onBeforeMount(()=>{const{params:l,query:p}=t,{path:g}=l;a.replace({path:"/"+(Array.isArray(g)?g.join("/"):g),query:p})}),()=>React.createElement(n.NEmpty,null)}}),le=D("PRedirect",Qe),Ue={class:"frame"},ve=["src"],se=D("PIframe",A(e.defineComponent({__name:"PIframe",setup(t){const a=M.useRoute(),l=e.ref(!1),p=e.ref(null),g=e.ref("");e.unref(a.meta)?.frameSrc&&(g.value=e.unref(a.meta)?.frameSrc);function i(){l.value=!1}function _(){e.nextTick(()=>{const c=e.unref(p);if(!c)return;const B=c;B.attachEvent?B.attachEvent("onload",()=>{i()}):c.onload=()=>{i()}})}return e.onMounted(()=>{l.value=!0,_()}),(c,B)=>{const y=n.NSpin;return e.openBlock(),e.createBlock(y,{show:l.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:g.value,class:"frame-iframe",ref_key:"frameRef",ref:p},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D("PPage",e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>T.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const a=t;return(l,p)=>{const g=n.NIcon,i=n.NAvatar,_=n.NSpace,c=n.NCard;return e.openBlock(),e.createElementBlock("div",et,[a.title?(e.openBlock(),e.createBlock(c,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(_,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(_,{align:"center",size:16},{default:e.withCtx(()=>[a.icon?(e.openBlock(),e.createBlock(i,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(g,{size:24,component:a.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(a.title),1),e.createElementVNode("div",ot,e.toDisplayString(a.subtitle??a.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),l.$slots.search?(e.openBlock(),e.createBlock(c,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"search")]),_:3})):e.createCommentVNode("",!0),l.$slots.default?(e.openBlock(),e.createBlock(c,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,a){const l=n.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(l,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=A(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),rt={},ct={class:"flex flex-col justify-center page-container"};function it(t,a){const l=n.NResult;return e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(l,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=A(rt,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,a){const l=n.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(l,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const ut=A(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ce=D("P500",st),ie=D("P404",dt),de=D("P403",ut),fe=Y.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:i=>t.callback=i,callCallback:async i=>await t.callback?.(i),setError:i=>t.error=i,callError:async(i,_)=>await t.error?.(i,_)}}),gt={class:"view-auth-callback"},pe=D("POidc",A(e.defineComponent({__name:"POidc",setup(t){const a=M.useRouter(),{callCallback:l,callError:p}=fe();return e.onMounted(async()=>{try{await l(a)}catch(g){await p(a,g)}}),(g,i)=>(e.openBlock(),e.createElementBlock("div",gt,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ht=Object.freeze(Object.defineProperty({__proto__:null,P403:de,P404:ie,P500:ce,PApplication:oe,PEmptyLayout:ee,PIframe:se,PLanguage:ae,PLayout:te,PModal:ne,POidc:pe,PPage:re,PRedirect:le,PTable:Q},Symbol.toStringTag,{value:"Module"})),me=(t,a)=>(Object.values(ht).forEach(l=>{l.install&&t.use(l)}),a?.(),t),_t={install:me};N.P403=de,N.P404=ie,N.P500=ce,N.PApplication=oe,N.PEmptyLayout=ee,N.PIframe=se,N.PLanguage=ae,N.PLayout=te,N.PModal=ne,N.POidc=pe,N.PPage=re,N.PRedirect=le,N.PTable=Q,N.default=_t,N.install=me,N.useLanguageStore=U,N.useLayoutStore=H,N.useOidcStore=fe,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/es/application/index.js
CHANGED
package/es/error/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withInstall as o } from "../utils/install.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const p = o(
|
|
2
|
+
import P from "./P500.vue.js";
|
|
3
|
+
import t from "./P404.vue.js";
|
|
4
|
+
import r from "./P403.vue.js";
|
|
5
|
+
const p = o("P500", P), f = o("P404", t), s = o("P403", r);
|
|
6
6
|
export {
|
|
7
7
|
s as P403Plugin,
|
|
8
8
|
f as P404Plugin,
|
package/es/iframe/index.js
CHANGED
package/es/languages/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { withInstall as a } from "../utils/install.js";
|
|
2
|
+
import n from "./PLanguage.vue.js";
|
|
3
|
+
const g = a("PLanguage", n);
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
g as PLanguagePlugin
|
|
6
6
|
};
|
package/es/layout/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./PLayout.vue.js";
|
|
2
2
|
import m from "./PEmptyLayout.vue.js";
|
|
3
3
|
import { withInstall as t } from "../utils/install.js";
|
|
4
|
-
const
|
|
4
|
+
const a = t("PEmptyLayout", m), p = t("PLayout", o);
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
a as PEmptyLayoutPlugin,
|
|
7
|
+
p as PLayoutPlugin
|
|
8
8
|
};
|
package/es/modal/index.js
CHANGED
package/es/oidc/index.js
CHANGED
package/es/page/index.js
CHANGED
package/es/redirect/index.js
CHANGED
package/es/table/index.js
CHANGED
package/es/utils/install.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Plugin, Component } from 'vue';
|
|
2
|
-
export declare const withInstall: <T extends Component>(comp: T) => T & Plugin;
|
|
2
|
+
export declare const withInstall: <T extends Component>(name: string, comp: T) => T & Plugin;
|
package/es/utils/install.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
return
|
|
4
|
-
|
|
1
|
+
const s = (t, n) => {
|
|
2
|
+
const l = n;
|
|
3
|
+
return l.install = function(o) {
|
|
4
|
+
o.component(t, n);
|
|
5
5
|
}, n;
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
s as withInstall
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../utils/install.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../utils/install.cjs"),i=require("./PApplication.vue.cjs"),e=t.withInstall("PApplication",i.default);exports.PApplicationPlugin=e;
|
package/lib/error/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../utils/install.cjs"),l=require("./P500.vue.cjs"),n=require("./P404.vue.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../utils/install.cjs"),l=require("./P500.vue.cjs"),n=require("./P404.vue.cjs"),P=require("./P403.vue.cjs"),e=t.withInstall("P500",l.default),i=t.withInstall("P404",n.default),u=t.withInstall("P403",P.default);exports.P403Plugin=u;exports.P404Plugin=i;exports.P500Plugin=e;
|
package/lib/iframe/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PIframe.vue.cjs"),r=e.withInstall(t.default);exports.PIframePlugin=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PIframe.vue.cjs"),r=e.withInstall("PIframe",t.default);exports.PIframePlugin=r;
|
package/lib/languages/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PLanguage.vue.cjs"),u=e.withInstall(t.default);exports.PLanguagePlugin=u;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PLanguage.vue.cjs"),u=e.withInstall("PLanguage",t.default);exports.PLanguagePlugin=u;
|
package/lib/layout/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./PLayout.vue.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./PLayout.vue.cjs"),o=require("./PEmptyLayout.vue.cjs"),t=require("../utils/install.cjs"),a=t.withInstall("PEmptyLayout",o.default),e=t.withInstall("PLayout",u.default);exports.PEmptyLayoutPlugin=a;exports.PLayoutPlugin=e;
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PModal.vue.cjs"),t=require("../utils/install.cjs"),l=t.withInstall(e.default);exports.PModalPlugin=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PModal.vue.cjs"),t=require("../utils/install.cjs"),l=t.withInstall("PModal",e.default);exports.PModalPlugin=l;
|
package/lib/oidc/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../utils/install.cjs"),t=require("./POidc.vue.cjs"),e=i.withInstall("POidc",t.default);exports.POidcPlugin=e;
|
package/lib/page/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PPage.vue.cjs"),t=require("../utils/install.cjs"),u=t.withInstall(e.default);exports.PPagePlugin=u;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PPage.vue.cjs"),t=require("../utils/install.cjs"),u=t.withInstall("PPage",e.default);exports.PPagePlugin=u;
|
package/lib/redirect/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PRedirect.vue.cjs"),i=e.withInstall(t.default);exports.PRedirectPlugin=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PRedirect.vue.cjs"),i=e.withInstall("PRedirect",t.default);exports.PRedirectPlugin=i;
|
package/lib/table/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PTable.vue.cjs"),t=require("../utils/install.cjs"),l=t.withInstall(e.default);exports.PTablePlugin=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PTable.vue.cjs"),t=require("../utils/install.cjs"),l=t.withInstall("PTable",e.default);exports.PTablePlugin=l;
|
package/lib/utils/install.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(n,t)=>{const e=t;return e.install=function(l){l.component(n,t)},t};exports.withInstall=i;
|
package/lib/utils/install.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Plugin, Component } from 'vue';
|
|
2
|
-
export declare const withInstall: <T extends Component>(comp: T) => T & Plugin;
|
|
2
|
+
export declare const withInstall: <T extends Component>(name: string, comp: T) => T & Plugin;
|