@gx-design-vue/pro-layout 0.1.0-beta.200 → 0.1.0-beta.202
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/pro-layout.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.1.0-beta.
|
|
3
|
+
* Version: 0.1.0-beta.201
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
7
7
|
* Description: Gx Design Pro Layout
|
|
8
|
-
* Date Created: 2025-12-
|
|
8
|
+
* Date Created: 2025-12-25
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as G, computed as b, watch as U, createVNode as o, mergeProps as le, isVNode as xe, cloneVNode as tn, resolveComponent as nn, ref as Z, toRefs as Xe, unref as Ae, Fragment as
|
|
12
|
+
import { defineComponent as G, computed as b, watch as U, createVNode as o, mergeProps as le, isVNode as xe, cloneVNode as tn, resolveComponent as nn, ref as Z, toRefs as Xe, unref as Ae, Fragment as Y, reactive as Oe, toRaw as an, inject as on, onMounted as It, onUnmounted as ln, Teleport as rn, Transition as sn, isRef as st } from "vue";
|
|
13
13
|
import { createFromIconfontCN as Ze, MenuUnfoldOutlined as un, MenuFoldOutlined as cn, GithubOutlined as dn, HomeOutlined as mn, CloseOutlined as Ke, FullscreenExitOutlined as St, FullscreenOutlined as Rt, ReloadOutlined as $t, ExportOutlined as fn, VerticalRightOutlined as pn, VerticalLeftOutlined as gn, VerticalAlignMiddleOutlined as hn, SwapOutlined as yn, DownOutlined as bn } from "@ant-design/icons-vue";
|
|
14
14
|
import { useState as Be, useMemo as Pe, useMediaQuery as vn, useSlotsProps as Cn, onMountedOrActivated as xn } from "@gx-design-vue/pro-hooks";
|
|
15
15
|
import { unit as z, useProConfigContext as Ne, useProStyle as ie, Keyframe as p, useStyle as Ie, mergeToken as Qe, GProConfigProvider as In, setAlpha as Sn, getAlphaColor as Rn } from "@gx-design-vue/pro-provider";
|
|
@@ -452,7 +452,7 @@ html[data-theme="dark"]::view-transition-new(root) {
|
|
|
452
452
|
iconfontUrl: a,
|
|
453
453
|
hashId: l,
|
|
454
454
|
style: i
|
|
455
|
-
} = e, r = O(e.className, t, l),
|
|
455
|
+
} = e, r = O(e.className, t, l), h = o("span", {
|
|
456
456
|
class: O(r),
|
|
457
457
|
style: {
|
|
458
458
|
display: "none"
|
|
@@ -460,7 +460,7 @@ html[data-theme="dark"]::view-transition-new(root) {
|
|
|
460
460
|
}, [o("span", {
|
|
461
461
|
class: "anticon"
|
|
462
462
|
}, null)]);
|
|
463
|
-
if (!n) return
|
|
463
|
+
if (!n) return h;
|
|
464
464
|
const c = (g) => o("img", {
|
|
465
465
|
src: g,
|
|
466
466
|
alt: "icon",
|
|
@@ -485,9 +485,9 @@ html[data-theme="dark"]::view-transition-new(root) {
|
|
|
485
485
|
if (he(g) || Ue(g)) return c(g);
|
|
486
486
|
if (t === "iconfont") return d(g);
|
|
487
487
|
const v = nn(g);
|
|
488
|
-
return typeof v == "function" && o(v, null, null) ||
|
|
488
|
+
return typeof v == "function" && o(v, null, null) || h;
|
|
489
489
|
};
|
|
490
|
-
return typeof n == "string" ? n !== "" ? u(n) :
|
|
490
|
+
return typeof n == "string" ? n !== "" ? u(n) : h : xe(n) ? m() : h;
|
|
491
491
|
};
|
|
492
492
|
let Dt = Ze({
|
|
493
493
|
scriptUrl: E.iconfontUrl
|
|
@@ -522,68 +522,68 @@ class ta {
|
|
|
522
522
|
const {
|
|
523
523
|
menuRenderType: i,
|
|
524
524
|
subMenuItemRender: r,
|
|
525
|
-
baseClassName:
|
|
525
|
+
baseClassName: h,
|
|
526
526
|
collapsed: c,
|
|
527
527
|
iconPrefixes: d,
|
|
528
528
|
styles: m,
|
|
529
529
|
classNames: u
|
|
530
|
-
} = this.props, g = this.getIntlName(t), v =
|
|
531
|
-
if (
|
|
532
|
-
const
|
|
530
|
+
} = this.props, g = this.getIntlName(t), v = i === "sider" ? t.meta?.inlineIndent ?? a * (this.props.extraInlineIndent ?? 10) : 0, S = t?.children, s = t?.meta?.hideInMenu, C = t?.meta?.rightContent, I = t?.meta?.divider, w = Array.isArray(S) && S.length > 0 && !s, T = S?.every((N) => N.meta?.hideInMenu);
|
|
531
|
+
if (w && !T) {
|
|
532
|
+
const N = t.meta?.icon || a === 1, y = typeof t.meta?.icon == "string" ? he(t.meta?.icon) || Ue(t.meta?.icon) : !1, M = pt({
|
|
533
533
|
icon: t.meta?.icon,
|
|
534
534
|
iconStyle: t.meta?.iconStyle,
|
|
535
535
|
iconPrefixes: d,
|
|
536
|
-
className: `${
|
|
536
|
+
className: `${h}-item`,
|
|
537
537
|
hashId: this.props?.hashId
|
|
538
|
-
}), k = c &&
|
|
539
|
-
class: O(u?.menuItemTitle, `${
|
|
540
|
-
[`${
|
|
541
|
-
[`${
|
|
538
|
+
}), k = c && N ? gt(g) : null, X = o("div", {
|
|
539
|
+
class: O(u?.menuItemTitle, `${h}-item-title`, this.props?.hashId, {
|
|
540
|
+
[`${h}-item-title-collapsed`]: c,
|
|
541
|
+
[`${h}-item-title-collapsed-level-${l}`]: c
|
|
542
542
|
}),
|
|
543
543
|
style: {
|
|
544
|
-
paddingInlineStart: this.props.collapsed ? 0 : z(
|
|
544
|
+
paddingInlineStart: this.props.collapsed ? 0 : z(v),
|
|
545
545
|
...m?.menuItemTitle
|
|
546
546
|
}
|
|
547
|
-
}, [c ? null :
|
|
548
|
-
class: O(`${
|
|
547
|
+
}, [c ? null : N && M ? o("span", {
|
|
548
|
+
class: O(`${h}-item-icon`, this.props?.hashId, u?.menuItemIcon),
|
|
549
549
|
style: {
|
|
550
550
|
...m?.menuItemIcon,
|
|
551
|
-
...
|
|
551
|
+
...y ? {} : t.meta?.iconStyle || {}
|
|
552
552
|
}
|
|
553
|
-
}, [
|
|
554
|
-
class: O(u?.menuItemTitleText, `${
|
|
555
|
-
[`${
|
|
553
|
+
}, [M]) : k, o("span", {
|
|
554
|
+
class: O(u?.menuItemTitleText, `${h}-item-text`, this.props?.hashId, {
|
|
555
|
+
[`${h}-item-text-has-icon`]: N && (M || k)
|
|
556
556
|
}),
|
|
557
557
|
style: m?.menuItemTitleText
|
|
558
|
-
}, [g]),
|
|
559
|
-
class: O(`${
|
|
560
|
-
}, [
|
|
558
|
+
}, [g]), C && typeof C == "function" ? o("div", {
|
|
559
|
+
class: O(`${h}-item-right-content`, this.props.hashId)
|
|
560
|
+
}, [C(t.meta)]) : null]), A = r ? r({
|
|
561
561
|
item: t,
|
|
562
|
-
children:
|
|
562
|
+
children: X,
|
|
563
563
|
menuProps: this.props
|
|
564
|
-
}) :
|
|
564
|
+
}) : X;
|
|
565
565
|
if (a === 0 && this.props.collapsed)
|
|
566
|
-
return this.getNavMenuItems(
|
|
567
|
-
const
|
|
568
|
-
return [
|
|
566
|
+
return this.getNavMenuItems(S, a + 1, a);
|
|
567
|
+
const V = this.getNavMenuItems(S, a + 1, a === 0 && this.props.collapsed ? a : a + 1);
|
|
568
|
+
return [I ? {
|
|
569
569
|
type: "divider"
|
|
570
570
|
} : void 0, {
|
|
571
571
|
key: t.name,
|
|
572
|
-
label:
|
|
573
|
-
children:
|
|
572
|
+
label: A,
|
|
573
|
+
children: V,
|
|
574
574
|
style: m?.subMenu,
|
|
575
575
|
disabled: t.meta?.disabled,
|
|
576
576
|
class: O(u?.subMenu, {
|
|
577
|
-
[`${
|
|
578
|
-
[`${
|
|
577
|
+
[`${h}-submenu`]: !0,
|
|
578
|
+
[`${h}-submenu-has-icon`]: N && M
|
|
579
579
|
}),
|
|
580
|
-
popupClassName: O(u?.subMenuPopup, `${
|
|
580
|
+
popupClassName: O(u?.subMenuPopup, `${h}-submenu-popup`, `${h}-submenu-popup-${this.props?.menuRenderType}`, this.props?.hashId)
|
|
581
581
|
}].filter(Boolean);
|
|
582
582
|
}
|
|
583
|
-
return [
|
|
583
|
+
return [I ? {
|
|
584
584
|
type: "divider"
|
|
585
585
|
} : void 0, {
|
|
586
|
-
class: O(`${
|
|
586
|
+
class: O(`${h}-item`, u?.menuItem),
|
|
587
587
|
style: m?.menuItem,
|
|
588
588
|
key: t.name,
|
|
589
589
|
disabled: t.meta?.disabled,
|
|
@@ -601,7 +601,7 @@ class ta {
|
|
|
601
601
|
}, this.getMenuItemPath = (t, a, l) => {
|
|
602
602
|
const i = this.conversionPath(t.path || "/"), {
|
|
603
603
|
isMobile: r,
|
|
604
|
-
menuRenderType:
|
|
604
|
+
menuRenderType: h,
|
|
605
605
|
onCollapse: c,
|
|
606
606
|
menuItemRender: d,
|
|
607
607
|
iconPrefixes: m,
|
|
@@ -610,44 +610,44 @@ class ta {
|
|
|
610
610
|
} = this.props, v = this.getIntlName(t), {
|
|
611
611
|
baseClassName: S,
|
|
612
612
|
collapsed: s
|
|
613
|
-
} = this.props,
|
|
613
|
+
} = this.props, C = t.meta?.icon || a === 1, I = t.meta?.rightContent, w = typeof t.meta?.icon == "string" ? he(t.meta?.icon) || Ue(t.meta?.icon) : !1, T = h === "sider" ? t.meta?.inlineIndent ?? a * (this.props.extraInlineIndent ?? 10) : 0, N = C ? pt({
|
|
614
614
|
icon: t.meta?.icon,
|
|
615
615
|
iconStyle: t.meta?.iconStyle,
|
|
616
616
|
iconPrefixes: m,
|
|
617
617
|
className: `${S}-item`,
|
|
618
618
|
hashId: this.props?.hashId
|
|
619
|
-
}) : null,
|
|
619
|
+
}) : null, y = s && C ? gt(v) : null, M = t.meta?.linkStatus === 1 && he(t.meta?.link), k = o("div", {
|
|
620
620
|
key: i,
|
|
621
621
|
class: O(u?.menuItemTitle, `${S}-item-title`, this.props?.hashId, {
|
|
622
|
-
[`${S}-item-link`]:
|
|
622
|
+
[`${S}-item-link`]: M,
|
|
623
623
|
[`${S}-item-title-collapsed`]: s,
|
|
624
624
|
[`${S}-item-title-collapsed-level-${l}`]: s
|
|
625
625
|
}),
|
|
626
626
|
style: {
|
|
627
|
-
paddingInlineStart: this.props.collapsed ? 0 : z(
|
|
627
|
+
paddingInlineStart: this.props.collapsed ? 0 : z(T),
|
|
628
628
|
...g?.menuItemTitle
|
|
629
629
|
}
|
|
630
630
|
}, [o("span", {
|
|
631
631
|
class: O(`${S}-item-icon ${this.props?.hashId}`, u?.menuItemIcon),
|
|
632
632
|
style: {
|
|
633
|
-
display:
|
|
633
|
+
display: y === null && !N ? "none" : "",
|
|
634
634
|
...g?.menuItemIcon,
|
|
635
635
|
...w ? {} : t.meta?.iconStyle || {}
|
|
636
636
|
}
|
|
637
|
-
}, [
|
|
637
|
+
}, [N || o("span", {
|
|
638
638
|
class: "anticon"
|
|
639
|
-
}, [
|
|
639
|
+
}, [y])]), o("span", {
|
|
640
640
|
class: O(u?.menuItemTitleText, `${S}-item-text`, this.props?.hashId, {
|
|
641
|
-
[`${S}-item-text-has-icon`]:
|
|
641
|
+
[`${S}-item-text-has-icon`]: C && (N || y)
|
|
642
642
|
}),
|
|
643
643
|
style: g?.menuItemTitleText
|
|
644
644
|
}, [v]), I && typeof I == "function" ? o("div", {
|
|
645
645
|
class: O(`${S}-item-right-content`, this.props.hashId)
|
|
646
646
|
}, [I(t.meta)]) : null]);
|
|
647
647
|
if (d) {
|
|
648
|
-
const
|
|
648
|
+
const X = {
|
|
649
649
|
...t,
|
|
650
|
-
isUrl:
|
|
650
|
+
isUrl: M,
|
|
651
651
|
itemPath: i,
|
|
652
652
|
isMobile: r,
|
|
653
653
|
replace: i === location.pathname,
|
|
@@ -655,7 +655,7 @@ class ta {
|
|
|
655
655
|
children: void 0
|
|
656
656
|
};
|
|
657
657
|
return d({
|
|
658
|
-
item:
|
|
658
|
+
item: X,
|
|
659
659
|
defaultDom: k,
|
|
660
660
|
menuProps: this.props
|
|
661
661
|
});
|
|
@@ -675,7 +675,7 @@ const zt = /* @__PURE__ */ G({
|
|
|
675
675
|
isPor: !0,
|
|
676
676
|
suffixCls: "base-menu"
|
|
677
677
|
}), {
|
|
678
|
-
wrapSSR:
|
|
678
|
+
wrapSSR: h,
|
|
679
679
|
hashId: c
|
|
680
680
|
} = ie("ProBaseMenu", [ea], r), [d, m] = Be(e.openKeys || []), [u, g] = Be(e.selectedKeys || []), v = Pe(() => new ta({
|
|
681
681
|
...e,
|
|
@@ -686,18 +686,19 @@ const zt = /* @__PURE__ */ G({
|
|
|
686
686
|
menuRenderType: e.menuRenderType,
|
|
687
687
|
baseClassName: r,
|
|
688
688
|
inlineIndent: e.menuProps?.inlineIndent,
|
|
689
|
+
extraInlineIndent: e.menuProps?.extraInlineIndent,
|
|
689
690
|
iconfontUrl: e.iconfontUrl,
|
|
690
691
|
hashId: c.value,
|
|
691
692
|
onCollapse: (s) => {
|
|
692
693
|
l && (l.collapsed.value = s);
|
|
693
694
|
}
|
|
694
|
-
}), [() => c.value, () => a.value, () => e.menuData, () => e.iconfontUrl, () => e.styles, () => e.classNames, () => e.menuProps?.inlineIndent, () => l?.isMobile?.value, () => l?.collapsedEffect?.value, () => l?.settings?.value?.layout]), S = b(() => {
|
|
695
|
-
const s = `.${r}`,
|
|
695
|
+
}), [() => c.value, () => a.value, () => e.menuData, () => e.iconfontUrl, () => e.styles, () => e.classNames, () => e.menuProps?.inlineIndent, () => e.menuProps?.extraInlineIndent, () => l?.isMobile?.value, () => l?.collapsedEffect?.value, () => l?.settings?.value?.layout]), S = b(() => {
|
|
696
|
+
const s = `.${r}`, C = `.${r}-item`, I = `.${r}-submenu`, w = `${a.value.antCls}-menu-item-selected`, T = `${a.value.antCls}-menu-submenu-title`;
|
|
696
697
|
return `
|
|
697
698
|
${s} ${I}>${T} {
|
|
698
699
|
${ft(e.styles.subMenuTitle)}
|
|
699
700
|
}
|
|
700
|
-
${s} ${
|
|
701
|
+
${s} ${C}${w} {
|
|
701
702
|
${ft(e.styles.menuItemSelect)}
|
|
702
703
|
}
|
|
703
704
|
`;
|
|
@@ -708,7 +709,7 @@ const zt = /* @__PURE__ */ G({
|
|
|
708
709
|
}));
|
|
709
710
|
}, {
|
|
710
711
|
immediate: !0
|
|
711
|
-
}), () => e.menuData && e.menuData?.length < 1 ? null :
|
|
712
|
+
}), () => e.menuData && e.menuData?.length < 1 ? null : h(o(be, le({
|
|
712
713
|
key: "Menu",
|
|
713
714
|
mode: e.mode,
|
|
714
715
|
inlineIndent: 16,
|
|
@@ -737,10 +738,10 @@ const zt = /* @__PURE__ */ G({
|
|
|
737
738
|
if (e.onClick)
|
|
738
739
|
e.onClick(s);
|
|
739
740
|
else {
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
const I = Ve(
|
|
743
|
-
n.currentRoute.value?.fullPath !== I && (T && w &&
|
|
741
|
+
const C = l?.menu?.value?.flatMenus?.find((I) => I.name === s.key);
|
|
742
|
+
if (C) {
|
|
743
|
+
const I = Ve(C.redirect) ? C.redirect : C.path || "", w = C.meta?.link || "", T = he(w);
|
|
744
|
+
n.currentRoute.value?.fullPath !== I && (T && w && C.meta?.linkStatus === 1 ? window.open(w) : n.push({
|
|
744
745
|
path: I
|
|
745
746
|
}));
|
|
746
747
|
}
|
|
@@ -766,8 +767,8 @@ const zt = /* @__PURE__ */ G({
|
|
|
766
767
|
parentRoute: l,
|
|
767
768
|
menuMap: a
|
|
768
769
|
})), a.has(l.name) || a.set(l.name, Ce(l, "children")), n[`${l.path}`] = l, Ce(l, "component"))).sort((l, i) => {
|
|
769
|
-
const r = l.meta?.order || 0,
|
|
770
|
-
return r -
|
|
770
|
+
const r = l.meta?.order || 0, h = i.meta?.order || 0;
|
|
771
|
+
return r - h > 0 ? 1 : -1;
|
|
771
772
|
});
|
|
772
773
|
function jt(e) {
|
|
773
774
|
const { menuSelectKey: n } = e?.meta || {};
|
|
@@ -789,10 +790,10 @@ function oa(e) {
|
|
|
789
790
|
const n = /* @__PURE__ */ new Map(), t = [];
|
|
790
791
|
function a(i) {
|
|
791
792
|
return i.map((r) => {
|
|
792
|
-
const
|
|
793
|
+
const h = r.path, c = r.name, d = n.has(c) && n.get(c) !== h;
|
|
793
794
|
if (r?.meta?.hidden || !c || d)
|
|
794
|
-
return (!c || d) && (t.some((m) => m.name === c &&
|
|
795
|
-
if (n.set(c,
|
|
795
|
+
return (!c || d) && (t.some((m) => m.name === c && h === r.path) || t.push({ ...r })), null;
|
|
796
|
+
if (n.set(c, h), r && r?.children)
|
|
796
797
|
if (r?.meta?.hideChildren)
|
|
797
798
|
r.children = [];
|
|
798
799
|
else
|
|
@@ -847,15 +848,15 @@ function Kt(e, n) {
|
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
850
|
function Ut({ menuData: e, flatMenus: n, menuMap: t }, { path: a, name: l }) {
|
|
850
|
-
const i = t && t.size > 0 ? t.get(l) : n.find((S) => S.name === l), r = i?.key || "",
|
|
851
|
+
const i = t && t.size > 0 ? t.get(l) : n.find((S) => S.name === l), r = i?.key || "", h = i?.meta?.hidden, c = i?.meta?.hideInMenu;
|
|
851
852
|
let d = n.find((S) => S.path === a)?.key || "";
|
|
852
853
|
const m = !d || c, u = r.split("-").slice(0, -1).join("-"), g = Kt(e, u) || d, v = i ? n.find((S) => S.name === i?.meta?.menuSelectKey || S.path === jt(i))?.key : void 0;
|
|
853
854
|
if (d = m ? i?.meta?.menuSelectKey && v || g : d, d) {
|
|
854
855
|
const S = [], s = d.split("-");
|
|
855
856
|
for (let I = 0; I < s.length; I += 1)
|
|
856
857
|
S.push(Le(s).splice(0, I + 1).join("-"));
|
|
857
|
-
const
|
|
858
|
-
return n.filter((I) => S.some((w) => w === I?.key || "")).concat(
|
|
858
|
+
const C = r === d || h ? [] : n.filter((I) => r === I.key);
|
|
859
|
+
return n.filter((I) => S.some((w) => w === I?.key || "")).concat(C);
|
|
859
860
|
}
|
|
860
861
|
return [];
|
|
861
862
|
}
|
|
@@ -950,7 +951,7 @@ function ca(e, n) {
|
|
|
950
951
|
function r(d, m, u) {
|
|
951
952
|
return d >= u.left && d <= u.right && m >= u.top && m <= u.bottom;
|
|
952
953
|
}
|
|
953
|
-
function
|
|
954
|
+
function h(d, m, u) {
|
|
954
955
|
return u.some((g) => {
|
|
955
956
|
if (!g)
|
|
956
957
|
return !1;
|
|
@@ -969,7 +970,7 @@ function ca(e, n) {
|
|
|
969
970
|
}
|
|
970
971
|
if (!l.value || d <= v)
|
|
971
972
|
return;
|
|
972
|
-
|
|
973
|
+
h(d, m, [u, g]) || i(!1);
|
|
973
974
|
}
|
|
974
975
|
return {
|
|
975
976
|
innerCollapsed: l,
|
|
@@ -1072,14 +1073,14 @@ const ma = (e) => ({
|
|
|
1072
1073
|
layout: l,
|
|
1073
1074
|
collapsed: i,
|
|
1074
1075
|
collapsedWidth: r
|
|
1075
|
-
} = e,
|
|
1076
|
-
if (
|
|
1076
|
+
} = e, h = e.logoRender;
|
|
1077
|
+
if (h === !1) return null;
|
|
1077
1078
|
const c = Et(n, t), d = a && o("h1", null, [a]);
|
|
1078
|
-
return typeof
|
|
1079
|
+
return typeof h == "function" ? h({
|
|
1079
1080
|
logo: c,
|
|
1080
1081
|
title: e.collapsed ? null : d,
|
|
1081
1082
|
props: e
|
|
1082
|
-
}) :
|
|
1083
|
+
}) : h || o("a", {
|
|
1083
1084
|
key: "title",
|
|
1084
1085
|
onClick: () => e.onLogoClick?.()
|
|
1085
1086
|
}, [(i && r || !i) && (c || null), e.collapsed && (l === "side" || l === "simple") ? null : d]);
|
|
@@ -1099,7 +1100,7 @@ const ma = (e) => ({
|
|
|
1099
1100
|
settings: l,
|
|
1100
1101
|
collapsedProps: i,
|
|
1101
1102
|
styles: r,
|
|
1102
|
-
classNames:
|
|
1103
|
+
classNames: h,
|
|
1103
1104
|
isMobile: c
|
|
1104
1105
|
} = Q(), d = Z(), {
|
|
1105
1106
|
height: m
|
|
@@ -1115,7 +1116,7 @@ const ma = (e) => ({
|
|
|
1115
1116
|
[`${e.baseClassName}-logo`]: !0,
|
|
1116
1117
|
[`${e.baseClassName}-logo-mobile`]: c.value,
|
|
1117
1118
|
[`${e.baseClassName}-logo-collapsed`]: !!a.value,
|
|
1118
|
-
[`${
|
|
1119
|
+
[`${h.value?.logo}`]: !!h.value?.logo
|
|
1119
1120
|
},
|
|
1120
1121
|
style: {
|
|
1121
1122
|
...e.style || {},
|
|
@@ -1444,7 +1445,7 @@ const {
|
|
|
1444
1445
|
collapsedEffect: l,
|
|
1445
1446
|
collapsedProps: i,
|
|
1446
1447
|
layoutProps: r,
|
|
1447
|
-
selectedKeys:
|
|
1448
|
+
selectedKeys: h,
|
|
1448
1449
|
settings: c,
|
|
1449
1450
|
openKeys: d,
|
|
1450
1451
|
menu: m,
|
|
@@ -1454,62 +1455,62 @@ const {
|
|
|
1454
1455
|
} = Q(), S = Ft(), {
|
|
1455
1456
|
token: s
|
|
1456
1457
|
} = Ne(), {
|
|
1457
|
-
breakpoint:
|
|
1458
|
+
breakpoint: C
|
|
1458
1459
|
} = Xe(e), I = n({
|
|
1459
1460
|
suffixCls: "sider",
|
|
1460
1461
|
isPor: !0
|
|
1461
|
-
}), w = Z(), T = Z(),
|
|
1462
|
+
}), w = Z(), T = Z(), N = Z(), y = b(() => t.value ? !1 : l.value), M = b(() => c.value.layout === "mix" && !t.value && c.value.splitMenus), k = b(() => c.value.layout === "side" || c.value.layout === "simple"), X = b(() => t.value || r.value.isWide ? !1 : c.value.fixSiderbar), A = b(() => (c.value.layout === "mix" || r.value.isWide) && "light" || m.value.baseTheme), V = b(() => i.value?.width ? {} : {
|
|
1462
1463
|
transform: `translateX(${a.value ? "-100%" : "0"})`,
|
|
1463
1464
|
pointerEvents: a.value ? "none" : void 0
|
|
1464
1465
|
}), {
|
|
1465
|
-
wrapSSR:
|
|
1466
|
+
wrapSSR: _,
|
|
1466
1467
|
hashId: D
|
|
1467
|
-
} = ie("ProLayoutSiderMenu", [(
|
|
1468
|
+
} = ie("ProLayoutSiderMenu", [(j) => va(j, {
|
|
1468
1469
|
siderChildren: u.value?.siderChildren
|
|
1469
|
-
}), Vt], I), ee = b(() => c.value.layout === "top" ? [] : m.value.menuData), q = b(() => M.value ? m.value.mixSiderMenus : ee.value), $ = b(() => q.value.filter((
|
|
1470
|
+
}), Vt], I), ee = b(() => c.value.layout === "top" ? [] : m.value.menuData), q = b(() => M.value ? m.value.mixSiderMenus : ee.value), $ = b(() => q.value.filter((j) => !j.meta?.fixed)), x = b(() => q.value.filter((j) => j.meta?.fixed)), W = b(() => i.value?.width ? y.value ? i.value?.width : r.value.siderWidth : a.value ? 0 : r.value.siderWidth), {
|
|
1470
1471
|
innerCollapsed: oe
|
|
1471
1472
|
} = ca(b(() => i.value?.width === 0 && a.value), {
|
|
1472
|
-
rectEl:
|
|
1473
|
-
footEl: b(() => e.menuFooterRender ||
|
|
1473
|
+
rectEl: N,
|
|
1474
|
+
footEl: b(() => e.menuFooterRender || x.value.length > 0 ? T.value : void 0),
|
|
1474
1475
|
disabled: i.value?.disabledInnerCollapse ?? i.value?.width !== 0
|
|
1475
|
-
}), de = b(() => O(a.value && `${I}-collapsed`, oe.value && `${I}-inner-collapsed`, (e.menuFooterRender ||
|
|
1476
|
-
const
|
|
1477
|
-
return (
|
|
1476
|
+
}), de = b(() => O(a.value && `${I}-collapsed`, oe.value && `${I}-inner-collapsed`, (e.menuFooterRender || x.value.length > 0) && `${I}-has-footer`, [D.value, I, g?.value?.sider, t.value ? "shadow" : null, `${I}-${m.value.baseTheme}`, X.value ? `${I}-fixed` : null])), me = b(() => {
|
|
1477
|
+
const j = s.value?.layout?.pageContainer;
|
|
1478
|
+
return (j?.padding || j?.margin || "").split(" ")?.[0] || z(20);
|
|
1478
1479
|
}), ze = Pe(() => c.value.layout === "simple" || !e.appsLogoComponents ? null : typeof e.appsLogoComponents == "function" ? e.appsLogoComponents?.() : e.appsLogoComponents, [() => e.appsLogoComponents]);
|
|
1479
1480
|
function Re() {
|
|
1480
1481
|
a.value = !a.value;
|
|
1481
1482
|
}
|
|
1482
1483
|
const We = Pe(() => {
|
|
1483
1484
|
if (i.value?.collapsedButtonRender === !1) return null;
|
|
1484
|
-
const
|
|
1485
|
+
const j = e.collapsedButtonRender || i.value?.collapsedButtonRender, J = e.collapsedIconRender || i.value?.collapsedIconRender, te = o(fa, {
|
|
1485
1486
|
iconRender: J,
|
|
1486
1487
|
isMobile: t.value,
|
|
1487
|
-
collapsed:
|
|
1488
|
+
collapsed: y.value,
|
|
1488
1489
|
onClick: () => Re()
|
|
1489
1490
|
}, null);
|
|
1490
|
-
return
|
|
1491
|
-
}, [() => i.value?.collapsedButtonRender, () => t.value, () =>
|
|
1491
|
+
return j ? j?.(!!y.value, te) : te;
|
|
1492
|
+
}, [() => i.value?.collapsedButtonRender, () => t.value, () => y.value]), _e = (j) => {
|
|
1492
1493
|
if (e.onSelect) {
|
|
1493
|
-
const J =
|
|
1494
|
+
const J = j.selectedKeys;
|
|
1494
1495
|
if (Ae(M)) {
|
|
1495
|
-
e.onSelect([
|
|
1496
|
+
e.onSelect([h?.value?.[0], ...J]);
|
|
1496
1497
|
return;
|
|
1497
1498
|
}
|
|
1498
1499
|
e.onSelect(J);
|
|
1499
1500
|
}
|
|
1500
|
-
}, fe = (
|
|
1501
|
+
}, fe = (j, J) => o(zt, {
|
|
1501
1502
|
key: "sider-base-menu",
|
|
1502
1503
|
class: O(`${I}-menu ${D.value}`, J?.class),
|
|
1503
1504
|
styles: u.value,
|
|
1504
1505
|
classNames: g.value,
|
|
1505
1506
|
type: m.value?.type,
|
|
1506
|
-
mode:
|
|
1507
|
+
mode: y.value && !t.value ? "vertical" : "inline",
|
|
1507
1508
|
menuRenderType: "sider",
|
|
1508
1509
|
menuProps: m.value?.menuProps,
|
|
1509
|
-
menuData:
|
|
1510
|
+
menuData: j,
|
|
1510
1511
|
iconfontUrl: c.value.iconfontUrl,
|
|
1511
1512
|
openKeys: d.value,
|
|
1512
|
-
selectedKeys:
|
|
1513
|
+
selectedKeys: h.value,
|
|
1513
1514
|
menuTextRender: e.menuTextRender,
|
|
1514
1515
|
menuItemRender: e.menuItemRender,
|
|
1515
1516
|
subMenuItemRender: e.subMenuItemRender,
|
|
@@ -1524,8 +1525,8 @@ const {
|
|
|
1524
1525
|
onSelect: _e
|
|
1525
1526
|
}, null);
|
|
1526
1527
|
return () => {
|
|
1527
|
-
let
|
|
1528
|
-
const J =
|
|
1528
|
+
let j;
|
|
1529
|
+
const J = k.value && c.value.layout !== "simple" && o(ot, le({
|
|
1529
1530
|
ref: w,
|
|
1530
1531
|
title: c.value.title,
|
|
1531
1532
|
hashId: D.value,
|
|
@@ -1537,7 +1538,7 @@ const {
|
|
|
1537
1538
|
}, ve(e, Object.keys(Ye))), {
|
|
1538
1539
|
default: () => [ze.value]
|
|
1539
1540
|
}), te = e.menuHeaderRender && e.menuHeaderRender?.(e), ne = e.menuLinksRender, pe = e.siderActionsRender;
|
|
1540
|
-
return M.value && Ae(m.value.mixSiderMenus).length === 0 && e.suppressSiderWhenMenuEmpty || ee.value.length === 0 && e.suppressSiderWhenMenuEmpty ? null :
|
|
1541
|
+
return M.value && Ae(m.value.mixSiderMenus).length === 0 && e.suppressSiderWhenMenuEmpty || ee.value.length === 0 && e.suppressSiderWhenMenuEmpty ? null : _(o(Je, {
|
|
1541
1542
|
theme: {
|
|
1542
1543
|
components: {
|
|
1543
1544
|
Menu: {
|
|
@@ -1556,7 +1557,7 @@ const {
|
|
|
1556
1557
|
}
|
|
1557
1558
|
}
|
|
1558
1559
|
}, {
|
|
1559
|
-
default: () => [
|
|
1560
|
+
default: () => [X.value && o("div", {
|
|
1560
1561
|
style: {
|
|
1561
1562
|
width: `${z(W.value)}`,
|
|
1562
1563
|
overflow: "hidden",
|
|
@@ -1571,16 +1572,16 @@ const {
|
|
|
1571
1572
|
trigger: null,
|
|
1572
1573
|
class: de.value,
|
|
1573
1574
|
style: {
|
|
1574
|
-
zIndex:
|
|
1575
|
-
paddingTop:
|
|
1575
|
+
zIndex: X.value ? 101 : void 0,
|
|
1576
|
+
paddingTop: X.value && c.value.fixedHeader && c.value.layout === "mix" ? r.value.headerHeight : 0,
|
|
1576
1577
|
top: c.value.layout === "wide" ? `calc(${r.value.headerHeight} + ${me.value})` : void 0,
|
|
1577
1578
|
height: c.value.layout === "wide" ? `calc(100vh - ${r.value.headerHeight} - (${me.value}) * 2)` : void 0,
|
|
1578
1579
|
...u.value?.sider || {},
|
|
1579
1580
|
...V.value
|
|
1580
1581
|
},
|
|
1581
|
-
theme:
|
|
1582
|
-
breakpoint:
|
|
1583
|
-
collapsed:
|
|
1582
|
+
theme: A.value,
|
|
1583
|
+
breakpoint: C.value || void 0,
|
|
1584
|
+
collapsed: y.value,
|
|
1584
1585
|
width: W.value,
|
|
1585
1586
|
collapsedWidth: i.value?.width
|
|
1586
1587
|
}, {
|
|
@@ -1590,7 +1591,7 @@ const {
|
|
|
1590
1591
|
spinning: m.value.loading,
|
|
1591
1592
|
indicator: S?.indicator?.value
|
|
1592
1593
|
}, null)]), J || null, o("div", {
|
|
1593
|
-
ref:
|
|
1594
|
+
ref: N,
|
|
1594
1595
|
class: `${I}-content`,
|
|
1595
1596
|
style: {
|
|
1596
1597
|
flex: "1 1 0%",
|
|
@@ -1615,36 +1616,36 @@ const {
|
|
|
1615
1616
|
}) || fe($.value, {
|
|
1616
1617
|
style: u.value?.menu,
|
|
1617
1618
|
class: g.value?.menu
|
|
1618
|
-
})])]), c.value.layout !== "wide" && o(
|
|
1619
|
+
})])]), c.value.layout !== "wide" && o(Y, null, [ne && wn(ne) && ne.length > 0 && o("div", {
|
|
1619
1620
|
class: `${I}-links ${D.value}`
|
|
1620
1621
|
}, [o(be, {
|
|
1621
|
-
theme:
|
|
1622
|
+
theme: A.value,
|
|
1622
1623
|
inlineIndent: 16,
|
|
1623
1624
|
class: `${I}-link-menu ${D.value}`,
|
|
1624
1625
|
selectedKeys: [],
|
|
1625
1626
|
openKeys: [],
|
|
1626
1627
|
mode: "inline"
|
|
1627
|
-
}, yt(
|
|
1628
|
+
}, yt(j = (ne || []).map(($e, je) => o(be.Item, {
|
|
1628
1629
|
class: `${I}-link ${D.value}`,
|
|
1629
1630
|
key: je
|
|
1630
1631
|
}, yt($e) ? $e : {
|
|
1631
1632
|
default: () => [$e]
|
|
1632
|
-
}))) ?
|
|
1633
|
-
default: () => [
|
|
1633
|
+
}))) ? j : {
|
|
1634
|
+
default: () => [j]
|
|
1634
1635
|
})]), t.value ? null : pe && o("div", {
|
|
1635
1636
|
class: O(`${I}-actions`, D.value)
|
|
1636
|
-
}, [pe]), i.value?.position === "sider" && !t.value && i.value.collapsedButtonRender !== !1 && o(
|
|
1637
|
-
class: O(`${I}-collapsed-button`,
|
|
1637
|
+
}, [pe]), i.value?.position === "sider" && !t.value && i.value.collapsedButtonRender !== !1 && o(Y, null, [o("div", {
|
|
1638
|
+
class: O(`${I}-collapsed-button`, y.value && "collapsed", D.value)
|
|
1638
1639
|
}, [o("span", {
|
|
1639
1640
|
onClick: () => Re()
|
|
1640
|
-
}, [kt(e.collapsedButtonRender || i.value?.collapsedButtonRender,
|
|
1641
|
-
collapsed:
|
|
1641
|
+
}, [kt(e.collapsedButtonRender || i.value?.collapsedButtonRender, y.value, at({
|
|
1642
|
+
collapsed: y.value,
|
|
1642
1643
|
iconRender: e.collapsedIconRender || i.value?.collapsedIconRender
|
|
1643
|
-
}))])])])]), (e.menuFooterRender ||
|
|
1644
|
+
}))])])])]), (e.menuFooterRender || x.value.length > 0) && o("div", {
|
|
1644
1645
|
ref: T,
|
|
1645
1646
|
class: O(`${I}-footer ${D.value}`, g.value?.siderFooter),
|
|
1646
1647
|
style: u.value?.siderFooter
|
|
1647
|
-
}, [fe(
|
|
1648
|
+
}, [fe(x.value, {
|
|
1648
1649
|
style: u.value?.footerMenu,
|
|
1649
1650
|
class: g.value?.footerMenu
|
|
1650
1651
|
}), e.menuFooterRender && e.menuFooterRender?.(e)]), v.value || c.value.layout === "wide" || t.value ? null : i.value?.position === "fixed" && We.value]
|
|
@@ -1667,7 +1668,7 @@ const {
|
|
|
1667
1668
|
} = Q();
|
|
1668
1669
|
return () => {
|
|
1669
1670
|
const t = Ce(e, ["siderWidth", "isMobile"]);
|
|
1670
|
-
return o(
|
|
1671
|
+
return o(Y, null, [e.isMobile ? o(Hn, {
|
|
1671
1672
|
maskClosable: !0,
|
|
1672
1673
|
open: !n.value,
|
|
1673
1674
|
closable: !1,
|
|
@@ -1753,7 +1754,7 @@ const {
|
|
|
1753
1754
|
hashId: r
|
|
1754
1755
|
} = ie("ProLayoutFooter", [Sa], l);
|
|
1755
1756
|
return () => {
|
|
1756
|
-
const
|
|
1757
|
+
const h = re({
|
|
1757
1758
|
slots: n,
|
|
1758
1759
|
props: e,
|
|
1759
1760
|
key: "copyright"
|
|
@@ -1776,9 +1777,9 @@ const {
|
|
|
1776
1777
|
title: c.key,
|
|
1777
1778
|
target: c.blankTarget ? "_blank" : "_self",
|
|
1778
1779
|
href: c.href
|
|
1779
|
-
}, [c.title]))]),
|
|
1780
|
+
}, [c.title]))]), h !== !1 && o("div", {
|
|
1780
1781
|
class: `${l}-copyright ${r.value}`
|
|
1781
|
-
}, [
|
|
1782
|
+
}, [h])])]
|
|
1782
1783
|
}));
|
|
1783
1784
|
};
|
|
1784
1785
|
}
|
|
@@ -1877,7 +1878,7 @@ const {
|
|
|
1877
1878
|
wrapSSR: l,
|
|
1878
1879
|
hashId: i
|
|
1879
1880
|
} = ie("ProBreadCrumb", [wa], a), r = b(() => {
|
|
1880
|
-
const
|
|
1881
|
+
const h = n?.breadcrumb?.value || {}, c = h.showHome ?? !0, d = Le(h.routes || []);
|
|
1881
1882
|
d.length && c && d.unshift({
|
|
1882
1883
|
path: "/",
|
|
1883
1884
|
name: "首页",
|
|
@@ -1898,9 +1899,9 @@ const {
|
|
|
1898
1899
|
link: g.path
|
|
1899
1900
|
}));
|
|
1900
1901
|
return {
|
|
1901
|
-
...
|
|
1902
|
+
...h,
|
|
1902
1903
|
routes: u,
|
|
1903
|
-
itemRender:
|
|
1904
|
+
itemRender: h?.itemRender || (({
|
|
1904
1905
|
route: g
|
|
1905
1906
|
}) => g.isFirst ? o(mt, {
|
|
1906
1907
|
to: g.link
|
|
@@ -2092,7 +2093,7 @@ const {
|
|
|
2092
2093
|
styles: l,
|
|
2093
2094
|
classNames: i,
|
|
2094
2095
|
getPrefixCls: r,
|
|
2095
|
-
collapsed:
|
|
2096
|
+
collapsed: h,
|
|
2096
2097
|
collapsedProps: c,
|
|
2097
2098
|
settings: d,
|
|
2098
2099
|
isMobile: m,
|
|
@@ -2101,33 +2102,33 @@ const {
|
|
|
2101
2102
|
menu: v,
|
|
2102
2103
|
breadcrumb: S,
|
|
2103
2104
|
breadcrumbRender: s
|
|
2104
|
-
} = Q(),
|
|
2105
|
+
} = Q(), C = r({
|
|
2105
2106
|
suffixCls: "global-header",
|
|
2106
2107
|
isPor: !0
|
|
2107
2108
|
}), {
|
|
2108
2109
|
wrapSSR: I,
|
|
2109
2110
|
hashId: w
|
|
2110
|
-
} = ie("ProDefaultHeader", [Ma, Vt],
|
|
2111
|
+
} = ie("ProDefaultHeader", [Ma, Vt], C), T = b(() => d.value.layout === "side" || d.value.layout === "simple"), N = b(() => ({
|
|
2111
2112
|
[`${w.value}`]: !0,
|
|
2112
|
-
[`${
|
|
2113
|
-
[`${
|
|
2114
|
-
})),
|
|
2113
|
+
[`${C}`]: !0,
|
|
2114
|
+
[`${C}-${d.value.layout}`]: !0
|
|
2115
|
+
})), y = b(() => d.value.splitMenus && d.value.layout === "mix" ? la(v.value.menuData) : d.value.layout === "top" ? v.value.menuData : []), M = (A, V, _) => {
|
|
2115
2116
|
const D = n?.currentRoute?.value, ee = d.value.layout === "mix", q = t?.matchedMenu?.value || Ut({
|
|
2116
|
-
menuData:
|
|
2117
|
+
menuData: y.value,
|
|
2117
2118
|
flatMenus: v.value.flatMenus
|
|
2118
2119
|
}, {
|
|
2119
2120
|
path: jt(D),
|
|
2120
2121
|
name: D?.name
|
|
2121
2122
|
});
|
|
2122
|
-
if (e.onSelect &&
|
|
2123
|
-
const $ =
|
|
2124
|
-
e.onSelect(ee && $ ? q.map((
|
|
2123
|
+
if (e.onSelect && A === "select") {
|
|
2124
|
+
const $ = y.value.find((x) => x.name === _)?.redirect;
|
|
2125
|
+
e.onSelect(ee && $ ? q.map((x) => x.name) : V);
|
|
2125
2126
|
}
|
|
2126
|
-
e.onOpenKeys &&
|
|
2127
|
-
}, j = () => {
|
|
2128
|
-
y.value = !y.value;
|
|
2127
|
+
e.onOpenKeys && A === "openKeys" && e.onOpenKeys(ee ? q.filter(($) => $.name !== D?.name).map(($) => $.name) : V);
|
|
2129
2128
|
}, k = () => {
|
|
2130
|
-
|
|
2129
|
+
h.value = !h.value;
|
|
2130
|
+
}, X = () => {
|
|
2131
|
+
const A = e.headerContentRender !== !1 && typeof e.headerContentRender == "function" ? o("div", {
|
|
2131
2132
|
style: {
|
|
2132
2133
|
flex: 1
|
|
2133
2134
|
}
|
|
@@ -2135,8 +2136,8 @@ const {
|
|
|
2135
2136
|
style: {
|
|
2136
2137
|
flex: 1
|
|
2137
2138
|
},
|
|
2138
|
-
class: [`${
|
|
2139
|
-
}, [
|
|
2139
|
+
class: [`${C}-menu`, w.value]
|
|
2140
|
+
}, [y.value?.length > 0 && o(Je, {
|
|
2140
2141
|
theme: {
|
|
2141
2142
|
components: {
|
|
2142
2143
|
Layout: {
|
|
@@ -2160,7 +2161,7 @@ const {
|
|
|
2160
2161
|
}, {
|
|
2161
2162
|
default: () => [o(zt, {
|
|
2162
2163
|
key: "header-base-menu",
|
|
2163
|
-
class: O(`${
|
|
2164
|
+
class: O(`${C}-menu ${w.value}`, i.value?.menu),
|
|
2164
2165
|
styles: l.value,
|
|
2165
2166
|
classNames: i.value,
|
|
2166
2167
|
type: v.value?.type,
|
|
@@ -2168,7 +2169,7 @@ const {
|
|
|
2168
2169
|
menuRenderType: "header",
|
|
2169
2170
|
style: l.value?.menu,
|
|
2170
2171
|
menuProps: v.value?.menuProps,
|
|
2171
|
-
menuData:
|
|
2172
|
+
menuData: y.value,
|
|
2172
2173
|
iconfontUrl: d.value?.iconfontUrl,
|
|
2173
2174
|
openKeys: u.value,
|
|
2174
2175
|
selectedKeys: g.value,
|
|
@@ -2180,36 +2181,36 @@ const {
|
|
|
2180
2181
|
onOpenKeys: (V) => M("openKeys", V)
|
|
2181
2182
|
}, null)]
|
|
2182
2183
|
})]);
|
|
2183
|
-
return o(
|
|
2184
|
+
return o(Y, null, [A, d.value.layout !== "simple" && (e.rightContentRender && typeof e.rightContentRender == "function" ? e.rightContentRender(e) : o(Y, null, null))]);
|
|
2184
2185
|
};
|
|
2185
2186
|
return () => {
|
|
2186
|
-
const
|
|
2187
|
-
collapsed:
|
|
2187
|
+
const A = kt(e.collapsedButtonRender || c.value?.collapsedButtonRender, h.value, at({
|
|
2188
|
+
collapsed: h.value,
|
|
2188
2189
|
iconRender: e.collapsedIconRender || c.value?.collapsedIconRender
|
|
2189
2190
|
}));
|
|
2190
2191
|
return I(o("div", {
|
|
2191
|
-
class:
|
|
2192
|
-
}, [m.value ? o(
|
|
2193
|
-
class: `${
|
|
2194
|
-
onClick:
|
|
2195
|
-
}, [
|
|
2196
|
-
class: `${
|
|
2192
|
+
class: N.value
|
|
2193
|
+
}, [m.value ? o(Y, null, [ga(e.logoRender, pa(O([`${C}-logo`, m.value && `${C}-logo-mobile`, w.value]), e)), c.value?.collapsedButtonRender !== !1 && o("span", {
|
|
2194
|
+
class: `${C}-collapsed-button ${w.value}`,
|
|
2195
|
+
onClick: k
|
|
2196
|
+
}, [A]), X()]) : o("div", {
|
|
2197
|
+
class: `${C}-main ${w.value}`,
|
|
2197
2198
|
style: {
|
|
2198
2199
|
width: e.headerMainWidth || e.headerMainWidth === 0 ? z(e.headerMainWidth) : d.value.layout === "wide" ? ue(d.value.wideWidth) : void 0
|
|
2199
2200
|
}
|
|
2200
2201
|
}, [o("div", {
|
|
2201
|
-
class: `${
|
|
2202
|
+
class: `${C}-main-left ${w.value}`
|
|
2202
2203
|
}, [c.value?.position === "header" && c.value?.collapsedButtonRender !== !1 && T.value && (d.value.layout !== "mix" ? v.value.menuData : v.value.mixSiderMenus).length > 0 && o("div", {
|
|
2203
|
-
class: `${
|
|
2204
|
-
onClick:
|
|
2205
|
-
}, [
|
|
2204
|
+
class: `${C}-collapsed-button ${w.value}`,
|
|
2205
|
+
onClick: k
|
|
2206
|
+
}, [A]), Oa.includes(d.value.layout) && o(Y, null, [d.value.layout !== "wide" && e.appsLogoComponents && o(Y, null, [typeof e.appsLogoComponents == "function" ? e.appsLogoComponents?.() : e.appsLogoComponents]), o(ot, le({
|
|
2206
2207
|
hashId: w.value,
|
|
2207
|
-
baseClassName:
|
|
2208
|
+
baseClassName: C
|
|
2208
2209
|
}, e, {
|
|
2209
2210
|
title: d.value.title
|
|
2210
2211
|
}), null)]), S.value?.position === "header" && S.value?.visible && o(Yt, {
|
|
2211
2212
|
breadcrumb: s.value
|
|
2212
|
-
}, null)]),
|
|
2213
|
+
}, null)]), X()])]));
|
|
2213
2214
|
};
|
|
2214
2215
|
}
|
|
2215
2216
|
}), Pa = (e) => ({
|
|
@@ -2277,7 +2278,7 @@ const {
|
|
|
2277
2278
|
collapsedEffect: l,
|
|
2278
2279
|
collapsedProps: i,
|
|
2279
2280
|
getPrefixCls: r,
|
|
2280
|
-
contentFullScreen:
|
|
2281
|
+
contentFullScreen: h,
|
|
2281
2282
|
settings: c,
|
|
2282
2283
|
isMobile: d,
|
|
2283
2284
|
layoutProps: m
|
|
@@ -2287,7 +2288,7 @@ const {
|
|
|
2287
2288
|
}), g = b(() => c.value.fixedHeader), v = b(() => c.value.layout === "side" || c.value.layout === "simple"), {
|
|
2288
2289
|
wrapSSR: S,
|
|
2289
2290
|
hashId: s
|
|
2290
|
-
} = ie("ProLayoutHeader", [Pa], u),
|
|
2291
|
+
} = ie("ProLayoutHeader", [Pa], u), C = b(() => ({
|
|
2291
2292
|
[`${s.value}`]: !0,
|
|
2292
2293
|
[`${u}`]: !0,
|
|
2293
2294
|
[`${t.value.header}`]: t.value.header,
|
|
@@ -2295,37 +2296,37 @@ const {
|
|
|
2295
2296
|
})), I = b(() => g.value && !d.value), w = b(() => {
|
|
2296
2297
|
if (i.value?.width === 0 && a.value)
|
|
2297
2298
|
return "100%";
|
|
2298
|
-
const
|
|
2299
|
-
return v.value && I.value ? l.value ?
|
|
2300
|
-
}), T = b(() => g.value ? 0 : void 0),
|
|
2301
|
-
const
|
|
2299
|
+
const y = l.value ? i.value?.width : m.value.siderWidth;
|
|
2300
|
+
return v.value && I.value ? l.value ? y ? `calc(100% - ${z(y)})` : "100%" : y ? `calc(100% - ${z(y)})` : "100%" : "100%";
|
|
2301
|
+
}), T = b(() => g.value ? 0 : void 0), N = () => {
|
|
2302
|
+
const y = o(Ba, e, null);
|
|
2302
2303
|
return e.headerRender ? e.headerRender({
|
|
2303
2304
|
props: e,
|
|
2304
|
-
defaultDom:
|
|
2305
|
-
}) :
|
|
2305
|
+
defaultDom: y
|
|
2306
|
+
}) : y;
|
|
2306
2307
|
};
|
|
2307
2308
|
return () => {
|
|
2308
|
-
let
|
|
2309
|
-
return S(o(
|
|
2309
|
+
let y;
|
|
2310
|
+
return S(o(Y, null, [g.value && o(vt, {
|
|
2310
2311
|
style: {
|
|
2311
2312
|
height: `${m.value.headerHeight}`,
|
|
2312
2313
|
lineHeight: `${m.value.headerHeight}`,
|
|
2313
2314
|
background: "transparent",
|
|
2314
|
-
marginTop:
|
|
2315
|
+
marginTop: h.value ? `-${m.value.headerHeight}` : void 0
|
|
2315
2316
|
}
|
|
2316
2317
|
}, null), o(vt, {
|
|
2317
|
-
class:
|
|
2318
|
+
class: C.value,
|
|
2318
2319
|
style: {
|
|
2319
2320
|
height: `${m.value.headerHeight}`,
|
|
2320
2321
|
lineHeight: `${m.value.headerHeight}`,
|
|
2321
2322
|
width: w.value,
|
|
2322
2323
|
zIndex: v.value ? 100 : 101,
|
|
2323
2324
|
right: T.value,
|
|
2324
|
-
marginTop:
|
|
2325
|
+
marginTop: h.value ? `-${m.value.headerHeight}` : void 0,
|
|
2325
2326
|
...n.value?.header || {}
|
|
2326
2327
|
}
|
|
2327
|
-
}, Ta(
|
|
2328
|
-
default: () => [
|
|
2328
|
+
}, Ta(y = N()) ? y : {
|
|
2329
|
+
default: () => [y]
|
|
2329
2330
|
})]));
|
|
2330
2331
|
};
|
|
2331
2332
|
}
|
|
@@ -2710,7 +2711,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2710
2711
|
contextMenuActiveKey: ""
|
|
2711
2712
|
}), i = He(), {
|
|
2712
2713
|
isMobile: r,
|
|
2713
|
-
collapsedEffect:
|
|
2714
|
+
collapsedEffect: h,
|
|
2714
2715
|
collapsedProps: c,
|
|
2715
2716
|
layoutProps: d,
|
|
2716
2717
|
contentFullScreen: m,
|
|
@@ -2718,44 +2719,44 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2718
2719
|
menu: g,
|
|
2719
2720
|
renderRouterView: v,
|
|
2720
2721
|
getPrefixCls: S
|
|
2721
|
-
} = Q(), s = lt(),
|
|
2722
|
+
} = Q(), s = lt(), C = S({
|
|
2722
2723
|
isPor: !0,
|
|
2723
2724
|
suffixCls: "layout-tabs"
|
|
2724
2725
|
}), {
|
|
2725
2726
|
wrapSSR: I,
|
|
2726
2727
|
hashId: w
|
|
2727
|
-
} = Wa(
|
|
2728
|
+
} = Wa(C), T = Ln(C, {
|
|
2728
2729
|
fixed: [],
|
|
2729
2730
|
normal: []
|
|
2730
2731
|
});
|
|
2731
|
-
function
|
|
2732
|
+
function N(f) {
|
|
2732
2733
|
return s?.menuMap?.value?.get(f.name) || g.value?.flatMenus?.some((R) => R.name === f.name);
|
|
2733
2734
|
}
|
|
2734
|
-
const
|
|
2735
|
+
const y = Oe({
|
|
2735
2736
|
fixed: t.value && T.value?.fixed ? T.value?.fixed : [],
|
|
2736
2737
|
normal: t.value && T.value?.normal ? T.value?.normal : []
|
|
2737
2738
|
});
|
|
2738
2739
|
U(() => g.value.flatMenus, () => {
|
|
2739
|
-
|
|
2740
|
+
y.fixed.length && (y.fixed = y.fixed.filter((f) => N(f))), y.normal.length && (y.normal = y.normal.filter((f) => N(f)));
|
|
2740
2741
|
}, {
|
|
2741
2742
|
immediate: !0,
|
|
2742
2743
|
deep: !0
|
|
2743
2744
|
}), U(t, (f) => {
|
|
2744
|
-
T.value = f ? Le(an(
|
|
2745
|
+
T.value = f ? Le(an(y)) : {
|
|
2745
2746
|
fixed: [],
|
|
2746
2747
|
normal: []
|
|
2747
2748
|
};
|
|
2748
2749
|
}, {
|
|
2749
2750
|
immediate: !0
|
|
2750
2751
|
});
|
|
2751
|
-
const M = b(() =>
|
|
2752
|
-
const f = !(
|
|
2753
|
-
return
|
|
2754
|
-
}),
|
|
2752
|
+
const M = b(() => y.fixed.concat(y.normal)), k = b(() => u.value.layout === "mix" && !r.value && u.value.splitMenus), X = b(() => L(i?.currentRoute?.value)), A = b(() => u.value.fixedTabsBar && !r.value), V = b(() => {
|
|
2753
|
+
const f = !(k.value && g.value.mixSiderMenus.length === 0 || g.value.menuData.length === 0 || u.value.layout === "top");
|
|
2754
|
+
return A.value && f ? m.value ? "100%" : `calc(100% - ${h.value ? z(c.value?.width) : d.value.siderWidth})` : "100%";
|
|
2755
|
+
}), _ = b(() => O(`${C}-wrap`, {
|
|
2755
2756
|
[`${w.value}`]: !0,
|
|
2756
|
-
[`${
|
|
2757
|
-
[`${
|
|
2758
|
-
[`${
|
|
2757
|
+
[`${C}-wrap-${e.type}`]: e.type,
|
|
2758
|
+
[`${C}-wrap-fixed`]: u.value.fixedTabsBar,
|
|
2759
|
+
[`${C}-wrap-loading`]: e.loading
|
|
2759
2760
|
})), D = b(() => e.destroyOnHide === !1 && e.visible), ee = b(() => {
|
|
2760
2761
|
const f = {
|
|
2761
2762
|
display: D.value ? void 0 : "none"
|
|
@@ -2769,12 +2770,12 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2769
2770
|
...f
|
|
2770
2771
|
} : f;
|
|
2771
2772
|
});
|
|
2772
|
-
U(() =>
|
|
2773
|
-
t.value && (T.value = Le(f)), e.onTabsChange?.([...
|
|
2773
|
+
U(() => y, (f) => {
|
|
2774
|
+
t.value && (T.value = Le(f)), e.onTabsChange?.([...y.fixed, ...y.normal]);
|
|
2774
2775
|
}, {
|
|
2775
2776
|
deep: !0
|
|
2776
2777
|
});
|
|
2777
|
-
const q = (f) => M.value.find((R) => L(R) === f), $ = (f) => L(f) ===
|
|
2778
|
+
const q = (f) => M.value.find((R) => L(R) === f), $ = (f) => L(f) === X.value, x = (f) => {
|
|
2778
2779
|
const {
|
|
2779
2780
|
fixed: R
|
|
2780
2781
|
} = f?.meta?.tabState || {};
|
|
@@ -2784,7 +2785,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2784
2785
|
hidden: R
|
|
2785
2786
|
} = f?.meta?.tabState || {};
|
|
2786
2787
|
if (f.name && f.meta && R !== !0) {
|
|
2787
|
-
const B =
|
|
2788
|
+
const B = x(f), F = L(f), P = q(F), H = {
|
|
2788
2789
|
name: F,
|
|
2789
2790
|
path: f.path,
|
|
2790
2791
|
fullPath: f.fullPath,
|
|
@@ -2794,11 +2795,11 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2794
2795
|
tabState: f.meta?.tabState
|
|
2795
2796
|
})
|
|
2796
2797
|
};
|
|
2797
|
-
P ? we(P,
|
|
2798
|
+
P ? we(P, H) : B ? y.fixed.push(H) : y.normal.push(H), $(f) && (l.activeKey = F);
|
|
2798
2799
|
}
|
|
2799
2800
|
}, oe = (f) => {
|
|
2800
2801
|
f.forEach((R) => {
|
|
2801
|
-
|
|
2802
|
+
x(R) && W(Ae(R));
|
|
2802
2803
|
});
|
|
2803
2804
|
};
|
|
2804
2805
|
U(() => g.value.flatMenus, (f) => {
|
|
@@ -2825,8 +2826,8 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2825
2826
|
addType: B,
|
|
2826
2827
|
params: F
|
|
2827
2828
|
}) => {
|
|
2828
|
-
const P =
|
|
2829
|
-
R === "add" && B ?
|
|
2829
|
+
const P = x(f) ? "fixed" : "normal";
|
|
2830
|
+
R === "add" && B ? y[P][B](F) : R === "merge" ? y[P] = y[P].map((H) => L(H) === L(f) ? we(H, F) : H) : R === "remove" && (y[P] = y[P].filter((H) => L(H) !== L(f)));
|
|
2830
2831
|
}, Re = () => {
|
|
2831
2832
|
const f = M.value.slice(-1)[0];
|
|
2832
2833
|
f ? i.push({
|
|
@@ -2840,12 +2841,12 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2840
2841
|
params: B
|
|
2841
2842
|
}), R?.(B));
|
|
2842
2843
|
}, _e = () => {
|
|
2843
|
-
|
|
2844
|
+
y.fixed = [], y.normal = [];
|
|
2844
2845
|
}, fe = async (f) => {
|
|
2845
2846
|
We(f, (R) => {
|
|
2846
2847
|
$(R) && Re();
|
|
2847
2848
|
});
|
|
2848
|
-
},
|
|
2849
|
+
}, j = (f) => {
|
|
2849
2850
|
const R = M.value.find((B) => L(B) === f);
|
|
2850
2851
|
R && l.activeKey !== L(R) && i.push({
|
|
2851
2852
|
path: de(L(R)),
|
|
@@ -2863,39 +2864,39 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2863
2864
|
...me(f)
|
|
2864
2865
|
});
|
|
2865
2866
|
}, pe = (f, R) => {
|
|
2866
|
-
let B =
|
|
2867
|
-
const F = M.value.find((K) => L(K) === te(R)), P =
|
|
2868
|
-
let
|
|
2867
|
+
let B = y.normal.findIndex((K) => L(K) === te(R));
|
|
2868
|
+
const F = M.value.find((K) => L(K) === te(R)), P = x(F);
|
|
2869
|
+
let H = !1;
|
|
2869
2870
|
switch (f) {
|
|
2870
2871
|
case "fixed":
|
|
2871
|
-
P ? (B =
|
|
2872
|
+
P ? (B = y.fixed.findIndex((K) => L(K) === te(R)), y.normal.unshift(we(F, {
|
|
2872
2873
|
meta: {
|
|
2873
2874
|
tabState: {
|
|
2874
2875
|
fixed: !P
|
|
2875
2876
|
}
|
|
2876
2877
|
}
|
|
2877
|
-
})),
|
|
2878
|
+
})), y.fixed = y.fixed.filter((K, ce) => ce !== B)) : (y.fixed.push(we(F, {
|
|
2878
2879
|
meta: {
|
|
2879
2880
|
tabState: {
|
|
2880
2881
|
fixed: !P
|
|
2881
2882
|
}
|
|
2882
2883
|
}
|
|
2883
|
-
})),
|
|
2884
|
+
})), y.normal = y.normal.filter((K, ce) => ce !== B));
|
|
2884
2885
|
break;
|
|
2885
2886
|
case "close":
|
|
2886
2887
|
fe(L(F) || "");
|
|
2887
2888
|
break;
|
|
2888
2889
|
case "closeOthersTabs":
|
|
2889
|
-
|
|
2890
|
+
y.normal = y.normal.filter((K) => L(K) === te(R) || x(K)), H = l[R] !== l.activeKey, H && ne(F);
|
|
2890
2891
|
break;
|
|
2891
2892
|
case "closeLeftTabs":
|
|
2892
|
-
ut(B) && (
|
|
2893
|
+
ut(B) && (y.normal = y.normal.filter((K, ce) => ce >= B || x(K)), H = !M.value.some((K) => L(K) === l.activeKey), H && ne(F));
|
|
2893
2894
|
break;
|
|
2894
2895
|
case "closeRightTabs":
|
|
2895
|
-
ut(B) && (
|
|
2896
|
+
ut(B) && (y.normal = y.normal.filter((K, ce) => ce <= B || x(K))), H = !M.value.some((K) => L(K) === l.activeKey), H && ne(F);
|
|
2896
2897
|
break;
|
|
2897
2898
|
case "closeAllTabs":
|
|
2898
|
-
|
|
2899
|
+
y.normal = y.normal.filter((K) => x(K)), Re();
|
|
2899
2900
|
break;
|
|
2900
2901
|
case "reloadPage":
|
|
2901
2902
|
(B === 0 || B) && l.activeKey === te(R) && J();
|
|
@@ -2910,11 +2911,11 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2910
2911
|
}, $e = (f, R) => {
|
|
2911
2912
|
const B = M.value.findIndex((F) => L(F) === R);
|
|
2912
2913
|
if (f === "closeOthersTabs")
|
|
2913
|
-
return M.value.filter((P,
|
|
2914
|
+
return M.value.filter((P, H) => H !== B && !x(P)).length === 0;
|
|
2914
2915
|
if (f === "closeLeftTabs")
|
|
2915
|
-
return M.value.filter((P,
|
|
2916
|
+
return M.value.filter((P, H) => H < B && !x(P)).length === 0;
|
|
2916
2917
|
if (f === "closeRightTabs")
|
|
2917
|
-
return M.value.filter((P,
|
|
2918
|
+
return M.value.filter((P, H) => H > B && !x(P)).length === 0;
|
|
2918
2919
|
}, je = (f) => {
|
|
2919
2920
|
let R;
|
|
2920
2921
|
const {
|
|
@@ -2928,12 +2929,12 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2928
2929
|
if (P.key === "divider") return o(be.Divider, {
|
|
2929
2930
|
key: P.key
|
|
2930
2931
|
}, null);
|
|
2931
|
-
const
|
|
2932
|
-
return P.key === "close" &&
|
|
2932
|
+
const H = P.icon;
|
|
2933
|
+
return P.key === "close" && x(q(B)) ? null : o(ka, {
|
|
2933
2934
|
key: P.key,
|
|
2934
2935
|
disabled: $e(P.key, B)
|
|
2935
2936
|
}, {
|
|
2936
|
-
default: () => [P.icon && typeof P.icon == "function" ? P.key === "fullScreen" ? P.icon(m.value) : P.key === "fixed" ? P.icon(
|
|
2937
|
+
default: () => [P.icon && typeof P.icon == "function" ? P.key === "fullScreen" ? P.icon(m.value) : P.key === "fixed" ? P.icon(x(q(B))) : null : o(H, null, null), o("span", {
|
|
2937
2938
|
style: {
|
|
2938
2939
|
marginInlineStart: "8px"
|
|
2939
2940
|
}
|
|
@@ -2948,7 +2949,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2948
2949
|
}, en = ({
|
|
2949
2950
|
router: f
|
|
2950
2951
|
}) => {
|
|
2951
|
-
const R = e.itemRender ? e.itemRender(f) : null, B =
|
|
2952
|
+
const R = e.itemRender ? e.itemRender(f) : null, B = x(f);
|
|
2952
2953
|
return o(dt, {
|
|
2953
2954
|
trigger: "contextmenu",
|
|
2954
2955
|
overlay: o(je, {
|
|
@@ -2960,12 +2961,12 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2960
2961
|
}
|
|
2961
2962
|
}, {
|
|
2962
2963
|
default: () => [R || o("div", {
|
|
2963
|
-
class: [`${
|
|
2964
|
+
class: [`${C}-title`, w.value]
|
|
2964
2965
|
}, [f.meta?.title, B && o(ke, {
|
|
2965
2966
|
type: "pin",
|
|
2966
|
-
class: [`${
|
|
2967
|
-
}, null), M.value.length > 1 && !
|
|
2968
|
-
class: [`${
|
|
2967
|
+
class: [`${C}-icon`, w.value]
|
|
2968
|
+
}, null), M.value.length > 1 && !x(f) && o(Ke, {
|
|
2969
|
+
class: [`${C}-close-btn`, w.value],
|
|
2969
2970
|
onClick: (F) => {
|
|
2970
2971
|
F.stopPropagation(), fe(L(f) || "");
|
|
2971
2972
|
}
|
|
@@ -2978,17 +2979,17 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2978
2979
|
change: ze
|
|
2979
2980
|
}), () => {
|
|
2980
2981
|
const f = m.value ? St : Rt;
|
|
2981
|
-
return I(o(
|
|
2982
|
+
return I(o(Y, null, [u.value.fixedTabsBar && o("div", {
|
|
2982
2983
|
style: {
|
|
2983
2984
|
display: D.value ? void 0 : "none"
|
|
2984
2985
|
},
|
|
2985
|
-
class: [`${
|
|
2986
|
+
class: [`${C}-fixed`, w.value]
|
|
2986
2987
|
}, null), o(Pt, {
|
|
2987
2988
|
hideAdd: !0,
|
|
2988
2989
|
style: ee.value,
|
|
2989
|
-
class:
|
|
2990
|
+
class: _.value,
|
|
2990
2991
|
activeKey: l.activeKey,
|
|
2991
|
-
onTabClick:
|
|
2992
|
+
onTabClick: j
|
|
2992
2993
|
}, {
|
|
2993
2994
|
default: () => [M.value.map((R) => o(Ua, {
|
|
2994
2995
|
key: L(R),
|
|
@@ -2998,9 +2999,9 @@ const Ea = /* @__PURE__ */ G({
|
|
|
2998
2999
|
}, null)
|
|
2999
3000
|
}, null))],
|
|
3000
3001
|
rightExtra: () => o("div", {
|
|
3001
|
-
class: O(`${
|
|
3002
|
+
class: O(`${C}-dropdown-menu`, w.value)
|
|
3002
3003
|
}, [o($t, {
|
|
3003
|
-
class: [`${
|
|
3004
|
+
class: [`${C}-dropdown-menu-btn`, w.value],
|
|
3004
3005
|
onClick: () => pe("reloadPage", "activeKey")
|
|
3005
3006
|
}, null), o(dt, {
|
|
3006
3007
|
overlay: o(je, {
|
|
@@ -3009,10 +3010,10 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3009
3010
|
}, null)
|
|
3010
3011
|
}, {
|
|
3011
3012
|
default: () => [o(bn, {
|
|
3012
|
-
class: [`${
|
|
3013
|
+
class: [`${C}-dropdown-menu-btn`, w.value]
|
|
3013
3014
|
}, null)]
|
|
3014
3015
|
}), o(f, {
|
|
3015
|
-
class: [`${
|
|
3016
|
+
class: [`${C}-dropdown-menu-btn`, w.value],
|
|
3016
3017
|
onClick: () => pe("fullScreen", "activeKey")
|
|
3017
3018
|
}, null)])
|
|
3018
3019
|
})]));
|
|
@@ -3037,7 +3038,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3037
3038
|
layoutProps: l,
|
|
3038
3039
|
settings: i,
|
|
3039
3040
|
fullScreenOnTabsHide: r
|
|
3040
|
-
} = Q(),
|
|
3041
|
+
} = Q(), h = b(() => se(e.tabsRoute?.visible) ? e.tabsRoute?.visible : !(a.value && r.value));
|
|
3041
3042
|
return () => {
|
|
3042
3043
|
const {
|
|
3043
3044
|
prefixCls: c,
|
|
@@ -3050,7 +3051,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3050
3051
|
}, [!i.value.showTabsBar || l.value.isWide || i.value.layout === "simple" ? null : o(Ea, le({
|
|
3051
3052
|
ref: t
|
|
3052
3053
|
}, u, e.tabsRoute, {
|
|
3053
|
-
visible:
|
|
3054
|
+
visible: h.value
|
|
3054
3055
|
}), null), n.default?.()]);
|
|
3055
3056
|
};
|
|
3056
3057
|
}
|
|
@@ -3076,7 +3077,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3076
3077
|
hashId: i
|
|
3077
3078
|
} = ie("ProLayout", [ya, ba], a), {
|
|
3078
3079
|
theme: r,
|
|
3079
|
-
resolvedTheme:
|
|
3080
|
+
resolvedTheme: h
|
|
3080
3081
|
} = Tt(), [c, d] = Be(!1), m = vn(), u = lt(), g = Cn({
|
|
3081
3082
|
slots: n,
|
|
3082
3083
|
props: e,
|
|
@@ -3084,7 +3085,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3084
3085
|
render: !0
|
|
3085
3086
|
}), {
|
|
3086
3087
|
token: v
|
|
3087
|
-
} = Ne(), S = Z(), s = Z(!!e.collapsedProps?.value),
|
|
3088
|
+
} = Ne(), S = Z(), s = Z(!!e.collapsedProps?.value), C = Z(!0), I = Z(!1), w = Z(!1), T = Z(), N = Z(ct().uuid(10)), y = Oe({
|
|
3088
3089
|
position: "relative"
|
|
3089
3090
|
}), M = b(() => {
|
|
3090
3091
|
let $ = 0;
|
|
@@ -3093,8 +3094,8 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3093
3094
|
else if (e.settings.siderWidth === 0)
|
|
3094
3095
|
$ = 0;
|
|
3095
3096
|
else {
|
|
3096
|
-
const
|
|
3097
|
-
$ = ue(e.settings.siderWidth ||
|
|
3097
|
+
const x = e.settings.layout === "wide" ? 208 : E.siderWidth;
|
|
3098
|
+
$ = ue(e.settings.siderWidth || x);
|
|
3098
3099
|
}
|
|
3099
3100
|
return {
|
|
3100
3101
|
isWide: e.settings.layout === "wide",
|
|
@@ -3102,20 +3103,20 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3102
3103
|
siderWidth: $,
|
|
3103
3104
|
hasSilder: e.settings.layout === "mix" || e.settings.layout === "side" || e.settings.layout === "wide" || !1
|
|
3104
3105
|
};
|
|
3105
|
-
}),
|
|
3106
|
+
}), k = b(() => qe({
|
|
3106
3107
|
position: "fixed",
|
|
3107
3108
|
width: 64
|
|
3108
|
-
}, e.collapsedProps || {})),
|
|
3109
|
-
const $ = e.route || u?.menuData?.value || [],
|
|
3109
|
+
}, e.collapsedProps || {})), X = b(() => {
|
|
3110
|
+
const $ = e.route || u?.menuData?.value || [], x = u?.flatMenus?.value ?? wt($);
|
|
3110
3111
|
return {
|
|
3111
3112
|
...e.menu,
|
|
3112
3113
|
menuData: $,
|
|
3113
|
-
flatMenus:
|
|
3114
|
+
flatMenus: x,
|
|
3114
3115
|
key: r.value,
|
|
3115
|
-
baseTheme:
|
|
3116
|
+
baseTheme: h.value,
|
|
3116
3117
|
mixSiderMenus: M.value.hasSilder && e?.selectedKeys ? ia($, e.selectedKeys[0]) : []
|
|
3117
3118
|
};
|
|
3118
|
-
}),
|
|
3119
|
+
}), A = b(() => (m.value === "sm" || m.value === "xs") && !e.disableMobile && !M.value.isWide), V = b(() => ({
|
|
3119
3120
|
...e.breadcrumb,
|
|
3120
3121
|
position: e.breadcrumb?.position && Ve(e.breadcrumb?.position) ? e.breadcrumb?.position : e.settings.layout === "side" ? "header" : "pageHeader",
|
|
3121
3122
|
visible: e.breadcrumb?.visible ?? !0,
|
|
@@ -3132,11 +3133,11 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3132
3133
|
}), U(() => s.value, ($) => {
|
|
3133
3134
|
e.onCollapse?.($);
|
|
3134
3135
|
}), U([() => e.settings.layout], ([$]) => {
|
|
3135
|
-
($ === "wide" || $ === "simple") && (w.value = !1),
|
|
3136
|
+
($ === "wide" || $ === "simple") && (w.value = !1), N.value = ct().uuid(10);
|
|
3136
3137
|
}), U(() => M.value.isWide, ($) => {
|
|
3137
3138
|
if ($) {
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3139
|
+
const x = document.querySelector('meta[name="viewport"]');
|
|
3140
|
+
x && (x.content = "");
|
|
3140
3141
|
}
|
|
3141
3142
|
}, {
|
|
3142
3143
|
immediate: !0
|
|
@@ -3144,12 +3145,12 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3144
3145
|
e.onContentFullScreenChange?.($);
|
|
3145
3146
|
}), U([() => e.isChildrenLayout], () => {
|
|
3146
3147
|
const $ = e.styles?.content;
|
|
3147
|
-
(e.isChildrenLayout || $ && $.minHeight) && (
|
|
3148
|
+
(e.isChildrenLayout || $ && $.minHeight) && (y.minHeight = 0);
|
|
3148
3149
|
}, {
|
|
3149
3150
|
immediate: !0,
|
|
3150
3151
|
deep: !0
|
|
3151
3152
|
});
|
|
3152
|
-
function
|
|
3153
|
+
function _() {
|
|
3153
3154
|
return ge({
|
|
3154
3155
|
slots: n,
|
|
3155
3156
|
props: e,
|
|
@@ -3163,13 +3164,13 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3163
3164
|
slots: n,
|
|
3164
3165
|
props: e,
|
|
3165
3166
|
keys: ["logoRender", "headerRender", "headerContentRender", "rightContentRender"]
|
|
3166
|
-
}),
|
|
3167
|
+
}), x = ge({
|
|
3167
3168
|
slots: n,
|
|
3168
3169
|
props: e,
|
|
3169
3170
|
keys: Qt,
|
|
3170
3171
|
render: !0
|
|
3171
3172
|
});
|
|
3172
|
-
return o(Fa, le(e,
|
|
3173
|
+
return o(Fa, le(e, x, _(), {
|
|
3173
3174
|
logoRender: $.logoRender,
|
|
3174
3175
|
headerRender: $.headerRender,
|
|
3175
3176
|
rightContentRender: $.rightContentRender,
|
|
@@ -3182,18 +3183,18 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3182
3183
|
props: e,
|
|
3183
3184
|
keys: Zt,
|
|
3184
3185
|
render: !0
|
|
3185
|
-
}),
|
|
3186
|
+
}), x = ge({
|
|
3186
3187
|
slots: n,
|
|
3187
3188
|
props: e,
|
|
3188
3189
|
keys: ["logoRender", "menuHeaderRender", "menuFooterRender", "menuContentRender"]
|
|
3189
3190
|
});
|
|
3190
|
-
return o(xa, le(e, $,
|
|
3191
|
-
isMobile:
|
|
3192
|
-
logoRender:
|
|
3191
|
+
return o(xa, le(e, $, _(), {
|
|
3192
|
+
isMobile: A.value,
|
|
3193
|
+
logoRender: x.logoRender,
|
|
3193
3194
|
siderWidth: M.value.siderWidth,
|
|
3194
|
-
menuHeaderRender:
|
|
3195
|
-
menuFooterRender:
|
|
3196
|
-
menuContentRender:
|
|
3195
|
+
menuHeaderRender: x.menuHeaderRender,
|
|
3196
|
+
menuFooterRender: x.menuFooterRender,
|
|
3197
|
+
menuContentRender: x.menuContentRender
|
|
3197
3198
|
}), null);
|
|
3198
3199
|
}, q = () => {
|
|
3199
3200
|
const $ = Te({
|
|
@@ -3202,7 +3203,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3202
3203
|
key: "footerRender",
|
|
3203
3204
|
render: !1
|
|
3204
3205
|
});
|
|
3205
|
-
return o(
|
|
3206
|
+
return o(Y, null, [$ === !1 ? null : typeof $ == "function" ? $(e) : $ || o(Ra, {
|
|
3206
3207
|
copyright: g.value.copyrightRender,
|
|
3207
3208
|
links: e.footerLinks
|
|
3208
3209
|
}, null), c.value && o("div", {
|
|
@@ -3215,17 +3216,17 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3215
3216
|
};
|
|
3216
3217
|
return Gn({
|
|
3217
3218
|
...ve(Xe(e), Vn),
|
|
3218
|
-
collapsedProps:
|
|
3219
|
+
collapsedProps: k,
|
|
3219
3220
|
getPrefixCls: ae,
|
|
3220
3221
|
collapsed: s,
|
|
3221
|
-
collapsedEffect: b(() =>
|
|
3222
|
+
collapsedEffect: b(() => k.value?.width ? s.value : !1),
|
|
3222
3223
|
settings: b(() => e.settings),
|
|
3223
|
-
menu:
|
|
3224
|
+
menu: X,
|
|
3224
3225
|
tabsComRef: S,
|
|
3225
3226
|
contentFullScreen: w,
|
|
3226
3227
|
layoutProps: M,
|
|
3227
|
-
isMobile:
|
|
3228
|
-
renderRouterView:
|
|
3228
|
+
isMobile: A,
|
|
3229
|
+
renderRouterView: C,
|
|
3229
3230
|
breadcrumb: V,
|
|
3230
3231
|
fullScreenOnTabsHide: I,
|
|
3231
3232
|
breadcrumbRender: T,
|
|
@@ -3246,7 +3247,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3246
3247
|
minHeight: e.settings.layout === "simple" ? `calc(100vh - ${ue(e.settings.headerHeight)})` : void 0,
|
|
3247
3248
|
...e.styles?.root || {}
|
|
3248
3249
|
};
|
|
3249
|
-
return l(o(
|
|
3250
|
+
return l(o(Y, null, [e.pure ? n.default?.() : o("div", {
|
|
3250
3251
|
id: e.id,
|
|
3251
3252
|
class: O({
|
|
3252
3253
|
[`${i.value}`]: !0,
|
|
@@ -3265,7 +3266,7 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3265
3266
|
} : void 0
|
|
3266
3267
|
}, {
|
|
3267
3268
|
default: () => [ee(), o(Fe, {
|
|
3268
|
-
style:
|
|
3269
|
+
style: y
|
|
3269
3270
|
}, {
|
|
3270
3271
|
default: () => [D(), o(Va, le(ve(e, Xa), {
|
|
3271
3272
|
tabsRoute: {
|
|
@@ -3313,18 +3314,18 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3313
3314
|
emit: t,
|
|
3314
3315
|
expose: a
|
|
3315
3316
|
}) {
|
|
3316
|
-
const l = Tt(), i = Z(), [r,
|
|
3317
|
+
const l = Tt(), i = Z(), [r, h] = Be(e.theme ?? l?.theme?.value ?? "system");
|
|
3317
3318
|
U(() => e.theme, (s) => {
|
|
3318
3319
|
s && (r.value = s);
|
|
3319
3320
|
});
|
|
3320
3321
|
const c = Ot(), d = b(() => {
|
|
3321
3322
|
let s = e.token || {};
|
|
3322
3323
|
if (!s.layout?.header?.heightLayoutHeader) {
|
|
3323
|
-
const
|
|
3324
|
+
const C = e.settings.headerHeight === 0 ? E.headerHeight : ue(e.settings.headerHeight || E.headerHeight);
|
|
3324
3325
|
s = qe(s, {
|
|
3325
3326
|
layout: {
|
|
3326
3327
|
header: {
|
|
3327
|
-
heightLayoutHeader:
|
|
3328
|
+
heightLayoutHeader: C
|
|
3328
3329
|
}
|
|
3329
3330
|
}
|
|
3330
3331
|
});
|
|
@@ -3357,8 +3358,8 @@ const Ea = /* @__PURE__ */ G({
|
|
|
3357
3358
|
}, {
|
|
3358
3359
|
default: () => [o(An, {
|
|
3359
3360
|
theme: r.value,
|
|
3360
|
-
onChange: (
|
|
3361
|
-
|
|
3361
|
+
onChange: (C) => {
|
|
3362
|
+
h(C), t("themeChange", C), t("update:theme", C);
|
|
3362
3363
|
},
|
|
3363
3364
|
onChangeBase: () => {
|
|
3364
3365
|
e.onDarkChange?.(c.value);
|
|
@@ -3476,7 +3477,7 @@ const io = /* @__PURE__ */ G({
|
|
|
3476
3477
|
} = eo(), {
|
|
3477
3478
|
wrapSSR: i,
|
|
3478
3479
|
hashId: r
|
|
3479
|
-
} = ao(a),
|
|
3480
|
+
} = ao(a), h = b(() => t?.collapsed?.value), c = b(() => t?.layoutProps?.value), d = b(() => t?.collapsedProps?.value), m = b(() => t?.isMobile.value ? !1 : t?.collapsedEffect?.value), u = b(() => d?.value?.width ? m.value ? d.value?.width : c.value.siderWidth : h.value ? 0 : c.value.siderWidth), g = Pe(() => {
|
|
3480
3481
|
if (c.value?.hasSilder)
|
|
3481
3482
|
return c.value?.siderWidth ? t?.isMobile?.value ? "100%" : `calc(100% - ${z(u.value)})` : "100%";
|
|
3482
3483
|
}, [() => t?.collapsed?.value, () => t?.layoutProps?.value?.hasSilder, () => t?.isMobile, () => t?.layoutProps?.value?.siderWidth]), v = Pe(() => typeof window > "u" || typeof document > "u" ? null : l?.value?.() || document.body, []), S = oo(`${a}.${a}-stylish`, {
|
|
@@ -3491,11 +3492,11 @@ const io = /* @__PURE__ */ G({
|
|
|
3491
3492
|
slots: n,
|
|
3492
3493
|
props: e,
|
|
3493
3494
|
key: "extra"
|
|
3494
|
-
}),
|
|
3495
|
+
}), C = Te({
|
|
3495
3496
|
slots: n,
|
|
3496
3497
|
props: e,
|
|
3497
3498
|
key: "renderContent"
|
|
3498
|
-
}), I = o(
|
|
3499
|
+
}), I = o(Y, null, [o("div", {
|
|
3499
3500
|
class: `${a}-left ${r.value}`.trim()
|
|
3500
3501
|
}, [s]), o("div", {
|
|
3501
3502
|
class: `${a}-right ${r.value}`.trim()
|
|
@@ -3507,7 +3508,7 @@ const io = /* @__PURE__ */ G({
|
|
|
3507
3508
|
width: g.value,
|
|
3508
3509
|
...e.style
|
|
3509
3510
|
}
|
|
3510
|
-
}, [
|
|
3511
|
+
}, [C && On(C) ? C({
|
|
3511
3512
|
props: {
|
|
3512
3513
|
...e,
|
|
3513
3514
|
...t,
|
|
@@ -3519,7 +3520,7 @@ const io = /* @__PURE__ */ G({
|
|
|
3519
3520
|
}, lo(w) ? w : {
|
|
3520
3521
|
default: () => [w]
|
|
3521
3522
|
});
|
|
3522
|
-
return S.wrapSSR(i(o(
|
|
3523
|
+
return S.wrapSSR(i(o(Y, null, [T])));
|
|
3523
3524
|
};
|
|
3524
3525
|
}
|
|
3525
3526
|
}), ro = (e) => ({
|
|
@@ -3691,83 +3692,83 @@ const mo = {
|
|
|
3691
3692
|
attrs: t,
|
|
3692
3693
|
expose: a
|
|
3693
3694
|
}) {
|
|
3694
|
-
const l = Ft(), i = _a(), r = Q(),
|
|
3695
|
+
const l = Ft(), i = _a(), r = Q(), h = Ne(), c = r?.getPrefixCls || ae, d = c({
|
|
3695
3696
|
suffixCls: "page-container",
|
|
3696
3697
|
isPor: !0
|
|
3697
3698
|
}), m = c({
|
|
3698
3699
|
suffixCls: "grid-content",
|
|
3699
3700
|
isPor: !0
|
|
3700
3701
|
}), u = b(() => r?.pageContainer?.value || {}), g = b(() => {
|
|
3701
|
-
const
|
|
3702
|
+
const x = se(e.waterMarkProps) ? {} : e.waterMarkProps || {};
|
|
3702
3703
|
return {
|
|
3703
3704
|
...se(r?.waterMarkProps?.value) ? {} : r?.waterMarkProps?.value || {},
|
|
3704
|
-
...
|
|
3705
|
+
...x
|
|
3705
3706
|
};
|
|
3706
|
-
}), v = b(() => e.pageCardProps || u.value?.pageCardProps), S = b(() => e.pageHeaderStyle || u.value?.pageHeaderStyle), s = b(() => e.pageContentStyle || u.value?.pageContentStyle),
|
|
3707
|
-
const
|
|
3708
|
-
return z(
|
|
3707
|
+
}), v = b(() => e.pageCardProps || u.value?.pageCardProps), S = b(() => e.pageHeaderStyle || u.value?.pageHeaderStyle), s = b(() => e.pageContentStyle || u.value?.pageContentStyle), C = b(() => e.pageChildrenContentClass || u.value?.pageChildrenContentClass || ""), I = b(() => e.pageChildrenContentStyle || u.value?.pageChildrenContentStyle || {}), w = b(() => r?.layoutProps?.value?.isWide), T = b(() => se(e.usePageCard) ? e.usePageCard : se(u.value?.usePageCard) ? u.value?.usePageCard : !0), N = b(() => h?.token?.value?.layout?.pageContainer), y = b(() => {
|
|
3708
|
+
const x = e.contentWidth ?? u.value?.contentWidth;
|
|
3709
|
+
return z(x);
|
|
3709
3710
|
}), M = b(() => {
|
|
3710
|
-
const
|
|
3711
|
-
return i?.spinning?.value ? !1 :
|
|
3712
|
-
}),
|
|
3713
|
-
const
|
|
3714
|
-
return typeof e.loading == "boolean" ?
|
|
3715
|
-
...
|
|
3711
|
+
const x = se(e.loading) ? e.loading : !!e.loading?.spinning;
|
|
3712
|
+
return i?.spinning?.value ? !1 : x;
|
|
3713
|
+
}), k = b(() => {
|
|
3714
|
+
const x = u.value?.loadingProps;
|
|
3715
|
+
return typeof e.loading == "boolean" ? x ?? mo : {
|
|
3716
|
+
...x,
|
|
3716
3717
|
...e.loading
|
|
3717
3718
|
};
|
|
3718
|
-
}),
|
|
3719
|
-
const
|
|
3719
|
+
}), X = b(() => {
|
|
3720
|
+
const x = re({
|
|
3720
3721
|
slots: n,
|
|
3721
3722
|
props: e,
|
|
3722
3723
|
key: "pageHeaderContentRender"
|
|
3723
3724
|
}), W = r?.breadcrumb?.value || {}, oe = W.routes || [];
|
|
3724
|
-
return w.value ? !1 : W?.position === "pageHeader" && oe.length > 0 ||
|
|
3725
|
+
return w.value ? !1 : W?.position === "pageHeader" && oe.length > 0 || x;
|
|
3725
3726
|
});
|
|
3726
3727
|
U([() => e.breadcrumbRender, () => r?.breadcrumb?.value?.position], () => {
|
|
3727
|
-
|
|
3728
|
+
A();
|
|
3728
3729
|
}, {
|
|
3729
3730
|
deep: !0
|
|
3730
3731
|
}), xn(() => {
|
|
3731
|
-
r && r.fullScreenOnTabsHide && (r.fullScreenOnTabsHide.value = !!e.fullScreenOnTabsHide),
|
|
3732
|
+
r && r.fullScreenOnTabsHide && (r.fullScreenOnTabsHide.value = !!e.fullScreenOnTabsHide), A();
|
|
3732
3733
|
});
|
|
3733
|
-
function
|
|
3734
|
-
const
|
|
3734
|
+
function A() {
|
|
3735
|
+
const x = Te({
|
|
3735
3736
|
slots: n,
|
|
3736
3737
|
props: e,
|
|
3737
3738
|
key: "breadcrumbRender"
|
|
3738
3739
|
});
|
|
3739
|
-
r && (r.breadcrumbRender.value = r?.breadcrumb?.value?.position === "header" ?
|
|
3740
|
+
r && (r.breadcrumbRender.value = r?.breadcrumb?.value?.position === "header" ? x : void 0);
|
|
3740
3741
|
}
|
|
3741
3742
|
const {
|
|
3742
3743
|
wrapSSR: V,
|
|
3743
|
-
hashId:
|
|
3744
|
+
hashId: _
|
|
3744
3745
|
} = co(d);
|
|
3745
|
-
U(() => r?.contentFullScreen?.value, (
|
|
3746
|
-
e.onContentFullScreenChange?.(
|
|
3746
|
+
U(() => r?.contentFullScreen?.value, (x) => {
|
|
3747
|
+
e.onContentFullScreenChange?.(x);
|
|
3747
3748
|
});
|
|
3748
|
-
const D = b(() => (
|
|
3749
|
-
const
|
|
3749
|
+
const D = b(() => (N.value?.padding || N.value?.margin || "").split(" ")?.[0] || z(20)), ee = () => {
|
|
3750
|
+
const x = re({
|
|
3750
3751
|
slots: n,
|
|
3751
3752
|
props: e,
|
|
3752
3753
|
key: "pageChildrenExtraRender"
|
|
3753
|
-
}), W = O(`${d}-children-container`,
|
|
3754
|
+
}), W = O(`${d}-children-container`, _.value, C.value);
|
|
3754
3755
|
return o("div", {
|
|
3755
3756
|
class: W,
|
|
3756
3757
|
style: {
|
|
3757
3758
|
...I.value
|
|
3758
3759
|
}
|
|
3759
3760
|
}, [M.value && o("div", {
|
|
3760
|
-
class: O(`${d}-spinning`,
|
|
3761
|
+
class: O(`${d}-spinning`, _.value)
|
|
3761
3762
|
}, [o(Bt, {
|
|
3762
3763
|
indicator: l?.indicator?.value,
|
|
3763
|
-
tip:
|
|
3764
|
+
tip: k.value?.tip
|
|
3764
3765
|
}, null)]), o("div", {
|
|
3765
|
-
class: O(`${d}-spinning-content`,
|
|
3766
|
-
}, [
|
|
3766
|
+
class: O(`${d}-spinning-content`, _.value, M.value && k.value.type ? `${d}-spinning-content-${k.value.type}` : "")
|
|
3767
|
+
}, [x, T.value ? o(Wn, le(v.value ? ve(v.value, ["loading", "bodyStyle"]) : {}, {
|
|
3767
3768
|
bordered: !1
|
|
3768
3769
|
}), {
|
|
3769
3770
|
default: () => [n.default?.()]
|
|
3770
|
-
}) :
|
|
3771
|
+
}) : x ? o("div", {
|
|
3771
3772
|
style: D.value ? {
|
|
3772
3773
|
marginBlockStart: D.value
|
|
3773
3774
|
} : void 0
|
|
@@ -3780,22 +3781,22 @@ const mo = {
|
|
|
3780
3781
|
});
|
|
3781
3782
|
}
|
|
3782
3783
|
return ee();
|
|
3783
|
-
}, $ = () => o(
|
|
3784
|
-
class: [m,
|
|
3784
|
+
}, $ = () => o(Y, null, [o("div", {
|
|
3785
|
+
class: [m, _.value],
|
|
3785
3786
|
style: {
|
|
3786
|
-
width:
|
|
3787
|
-
marginInline:
|
|
3787
|
+
width: y.value,
|
|
3788
|
+
marginInline: y.value && "auto"
|
|
3788
3789
|
}
|
|
3789
3790
|
}, [o("div", {
|
|
3790
|
-
class: `${m}-children ${
|
|
3791
|
+
class: `${m}-children ${_.value}`,
|
|
3791
3792
|
style: s.value
|
|
3792
3793
|
}, [q()])])]);
|
|
3793
3794
|
return a({
|
|
3794
|
-
changeContentFullScreen: (
|
|
3795
|
-
r && (r.contentFullScreen.value =
|
|
3795
|
+
changeContentFullScreen: (x) => {
|
|
3796
|
+
r && (r.contentFullScreen.value = x);
|
|
3796
3797
|
}
|
|
3797
3798
|
}), () => {
|
|
3798
|
-
const
|
|
3799
|
+
const x = re({
|
|
3799
3800
|
slots: n,
|
|
3800
3801
|
props: e,
|
|
3801
3802
|
key: "footer"
|
|
@@ -3813,18 +3814,18 @@ const mo = {
|
|
|
3813
3814
|
key: "breadcrumbRender"
|
|
3814
3815
|
});
|
|
3815
3816
|
return V(o("div", {
|
|
3816
|
-
class: O(r?.classNames?.value?.content,
|
|
3817
|
+
class: O(r?.classNames?.value?.content, _.value, d, t.class),
|
|
3817
3818
|
style: {
|
|
3818
3819
|
...t.style || {},
|
|
3819
3820
|
...r?.styles?.value?.content || {}
|
|
3820
3821
|
}
|
|
3821
|
-
}, [o(
|
|
3822
|
+
}, [o(Y, null, [W !== !1 && X.value && (W || o(so, {
|
|
3822
3823
|
style: S?.value,
|
|
3823
3824
|
breadcrumb: de,
|
|
3824
3825
|
content: oe,
|
|
3825
3826
|
close: e.fullScreenOnTabsHide
|
|
3826
|
-
}, null)), $()]),
|
|
3827
|
-
default: () => [
|
|
3827
|
+
}, null)), $()]), x && o(io, e.footerToolBarProps || {}, xt(x) ? x : {
|
|
3828
|
+
default: () => [x]
|
|
3828
3829
|
})]));
|
|
3829
3830
|
};
|
|
3830
3831
|
}
|
|
@@ -5271,9 +5272,9 @@ const Fi = /* @__PURE__ */ G({
|
|
|
5271
5272
|
e.direction === void 0 ? u = m.directions[0] : u = m.directions.find((v) => v === e.direction) || "", u = u === void 0 || u === "default" ? "" : u, u !== "" && (u = d && e.reverse ? i(u, m.directions) : u, u = u[0].toUpperCase() + u.substring(1));
|
|
5272
5273
|
const g = d ? "Out" : "In";
|
|
5273
5274
|
return m.name + g + u;
|
|
5274
|
-
},
|
|
5275
|
+
}, h = b(() => [r(!1), `${t}-enter`, l.value].join(" ")), c = b(() => [r(!0), `${t}-leave`, l.value].join(" "));
|
|
5275
5276
|
return () => e.disabled ? n.default?.() : a(o(sn, {
|
|
5276
|
-
enterActiveClass:
|
|
5277
|
+
enterActiveClass: h.value,
|
|
5277
5278
|
leaveActiveClass: c.value
|
|
5278
5279
|
}, {
|
|
5279
5280
|
default: () => [n.default?.()]
|
|
@@ -5297,7 +5298,7 @@ function Ni(e) {
|
|
|
5297
5298
|
const n = He(), t = e?.defaultOpen ?? !0, a = e?.autoClose ?? !0, l = n.getRoutes(), i = Z([]), r = Oe({
|
|
5298
5299
|
menuMap: /* @__PURE__ */ new Map(),
|
|
5299
5300
|
flatMenus: []
|
|
5300
|
-
}),
|
|
5301
|
+
}), h = Oe({
|
|
5301
5302
|
openKeys: [],
|
|
5302
5303
|
selectedKeys: []
|
|
5303
5304
|
}), c = b(() => n.currentRoute.value), d = (v) => {
|
|
@@ -5311,11 +5312,11 @@ function Ni(e) {
|
|
|
5311
5312
|
flatMenus: r.flatMenus
|
|
5312
5313
|
}, { path: c.value.path, name: c.value.name })), u = b(() => {
|
|
5313
5314
|
function v(s) {
|
|
5314
|
-
const
|
|
5315
|
+
const C = At(s.meta?.hideChildrenInMenu ? [] : s.children || []);
|
|
5315
5316
|
return {
|
|
5316
5317
|
name: s.name,
|
|
5317
5318
|
icon: s.meta?.icon || "",
|
|
5318
|
-
path: s.redirect ||
|
|
5319
|
+
path: s.redirect || C || s.path || "",
|
|
5319
5320
|
breadcrumbName: s.meta?.title || "",
|
|
5320
5321
|
children: s.children && s.children?.length > 1 ? s.children?.map((I) => v(I)).filter((I) => I.breadcrumbName) : []
|
|
5321
5322
|
};
|
|
@@ -5323,26 +5324,26 @@ function Ni(e) {
|
|
|
5323
5324
|
const S = m.value.map((s) => v(s)).filter((s) => s.breadcrumbName);
|
|
5324
5325
|
return sa(S, "breadcrumbName");
|
|
5325
5326
|
}), g = () => {
|
|
5326
|
-
|
|
5327
|
+
h.openKeys = m.value.filter((v) => v.name !== c.value.name).map((v) => v.name);
|
|
5327
5328
|
};
|
|
5328
5329
|
return U(() => c.value, (v) => {
|
|
5329
|
-
v && (
|
|
5330
|
+
v && (h.selectedKeys = m.value.map((S) => S.name), a && g());
|
|
5330
5331
|
}, { immediate: !0, deep: !0 }), It(() => {
|
|
5331
5332
|
t && g();
|
|
5332
5333
|
}), Ia({
|
|
5333
5334
|
...Xe(r),
|
|
5334
5335
|
syncMatchedKeys: (v = 60) => {
|
|
5335
5336
|
setTimeout(() => {
|
|
5336
|
-
|
|
5337
|
+
h.selectedKeys = m.value.map((S) => S.name), g();
|
|
5337
5338
|
}, v);
|
|
5338
5339
|
},
|
|
5339
5340
|
menuData: i,
|
|
5340
5341
|
matchedMenu: m,
|
|
5341
|
-
matchedKeys:
|
|
5342
|
+
matchedKeys: h
|
|
5342
5343
|
}), {
|
|
5343
5344
|
menuState: r,
|
|
5344
5345
|
menuData: i,
|
|
5345
|
-
matchedKeys:
|
|
5346
|
+
matchedKeys: h,
|
|
5346
5347
|
matchedMenu: m,
|
|
5347
5348
|
breadcrumbRouters: u
|
|
5348
5349
|
};
|