@gx-design-vue/pro-layout 0.1.0-alpha.21 → 0.1.0-alpha.23
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/components/AppPage/index.js +0 -1
- package/dist/components/AppPage/style.js +2 -1
- package/dist/components/PageTransition/index.d.ts +1 -1
- package/dist/components/Tabs/hooks/useTabDrag.d.ts +3 -1
- package/dist/components/Tabs/hooks/useTabDrag.js +36 -12
- package/dist/hooks/useLayoutBase.d.ts +10 -10
- package/dist/pro-layout.esm.js +333 -325
- package/dist/pro-layout.js +3 -3
- package/dist/style/breadcrumb.js +1 -1
- package/dist/style/rightContent.js +1 -1
- package/dist/style/search.js +2 -2
- package/dist/style/tabs.js +1 -2
- package/package.json +5 -5
package/dist/pro-layout.esm.js
CHANGED
|
@@ -3,12 +3,12 @@ import { GProConfigProvider as D, Keyframe as O, proGenStyleHooks as k, setAlpha
|
|
|
3
3
|
import { GScrollbar as P } from "@gx-design-vue/scrollbar";
|
|
4
4
|
import { App as F, Card as I, ConfigProvider as L, Drawer as R, Dropdown as z, Layout as B, LayoutContent as ee, LayoutFooter as V, LayoutHeader as H, LayoutSider as te, Popover as ne, Spin as U, Tooltip as re, Watermark as ie } from "antdv-next";
|
|
5
5
|
import { useBaseConfig as W } from "antdv-next/config-provider/context";
|
|
6
|
-
import
|
|
7
|
-
import { createInjectionState as
|
|
8
|
-
import { GIcon as
|
|
9
|
-
import { unit as
|
|
10
|
-
import { mergeToken as
|
|
11
|
-
import { useRoute as
|
|
6
|
+
import G from "antdv-next/config-provider/hooks/useCSSVarCls";
|
|
7
|
+
import { createInjectionState as ae, useDark as oe, useElementSize as se, useEventListener as ce, useLocalStorage as le, useMediaQuery as ue, useResizeObserver as de, useScroll as fe, useThrottleFn as pe, useVModel as me, useWindowScroll as he } from "@vueuse/core";
|
|
8
|
+
import { GIcon as K } from "@gx-design-vue/icon";
|
|
9
|
+
import { unit as q } from "@antdv-next/cssinjs";
|
|
10
|
+
import { mergeToken as ge } from "antdv-next/dist/theme/internal";
|
|
11
|
+
import { useRoute as _e, useRouter as ve } from "vue-router";
|
|
12
12
|
import { ThemeContext as ye, useThemeContext as be } from "@gx-design-vue/context";
|
|
13
13
|
//#region ../pro-utils/dist/is/img.js
|
|
14
14
|
function xe(e) {
|
|
@@ -110,7 +110,7 @@ function Me(e, ...t) {
|
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/components/AppPage/context.ts
|
|
113
|
-
var [Ne, Pe] =
|
|
113
|
+
var [Ne, Pe] = ae((e) => e);
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/components/AppPage/style.ts
|
|
116
116
|
function Fe(e, t) {
|
|
@@ -127,6 +127,7 @@ var Ie = k("ProAppPage", (e) => {
|
|
|
127
127
|
},
|
|
128
128
|
"&-blur": {
|
|
129
129
|
position: "absolute",
|
|
130
|
+
zIndex: 999,
|
|
130
131
|
top: 0,
|
|
131
132
|
left: 0,
|
|
132
133
|
width: "100%",
|
|
@@ -137,7 +138,7 @@ var Ie = k("ProAppPage", (e) => {
|
|
|
137
138
|
top: "50%",
|
|
138
139
|
left: "50%",
|
|
139
140
|
transform: "translate(-50%, -50%)",
|
|
140
|
-
[`${t}-spin-dot,.anticon`]: {
|
|
141
|
+
[`${t}-spin-dot,.anticon,.pro-anticon`]: {
|
|
141
142
|
fontSize: 32,
|
|
142
143
|
[`${e.antCls}-spin-dot,.gx-spin-icon`]: { animationDuration: "0.75s" }
|
|
143
144
|
},
|
|
@@ -178,14 +179,13 @@ var Ie = k("ProAppPage", (e) => {
|
|
|
178
179
|
},
|
|
179
180
|
slots: Object,
|
|
180
181
|
setup(e, { slots: t }) {
|
|
181
|
-
let { prefixCls: n } = W("pro-app-page", e), i =
|
|
182
|
+
let { prefixCls: n } = W("pro-app-page", e), i = G(n), [o, s] = Ie(n, i), c = M(), l = r(() => e.spinning?.loading ?? !1);
|
|
182
183
|
Ne({ spinning: r(() => e.spinning?.loading) });
|
|
183
184
|
let u = r(() => je({
|
|
184
185
|
slots: t,
|
|
185
186
|
key: "indicator",
|
|
186
187
|
props: e
|
|
187
188
|
}) || (typeof c?.indicator?.value == "function" ? c?.indicator?.value?.() : c?.indicator?.value || a(U, { class: `${n.value}-spin-dot` }, null))), d = r(() => J(n.value, o.value, s.value, i.value, l.value && `${n.value}-loading`, e.class)), f = r(() => ({
|
|
188
|
-
zIndex: e.spinning?.blur ? 999 : void 0,
|
|
189
189
|
backgroundColor: e.spinning?.blur ? void 0 : "unset",
|
|
190
190
|
...e.spinning?.style || {}
|
|
191
191
|
}));
|
|
@@ -202,7 +202,7 @@ var Ie = k("ProAppPage", (e) => {
|
|
|
202
202
|
style: f.value
|
|
203
203
|
}, [a("div", { class: `${n.value}-spin` }, [u.value])])] });
|
|
204
204
|
}
|
|
205
|
-
}), [Be, Ve] =
|
|
205
|
+
}), [Be, Ve] = ae((e) => e);
|
|
206
206
|
//#endregion
|
|
207
207
|
//#region src/hooks/useLayoutBase.ts
|
|
208
208
|
function Y(e) {
|
|
@@ -311,7 +311,7 @@ function Je(e) {
|
|
|
311
311
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
312
312
|
}
|
|
313
313
|
var Ye = /* @__PURE__ */ o((e, { slots: n }) => {
|
|
314
|
-
let { zIndex: i, setHasFooterToolbar: o } = Y(), { prefixCls: s } = W("pro-footer-toolbar"), c =
|
|
314
|
+
let { zIndex: i, setHasFooterToolbar: o } = Y(), { prefixCls: s } = W("pro-footer-toolbar"), c = G(s), [l, u] = qe(s, c), d = r(() => Me({
|
|
315
315
|
slots: n,
|
|
316
316
|
props: e,
|
|
317
317
|
keys: Ge,
|
|
@@ -600,7 +600,7 @@ function Ft(e) {
|
|
|
600
600
|
return e ? l(e) ? e : Ee(e) ? De(e) || xe(e) ? a("img", {
|
|
601
601
|
src: e,
|
|
602
602
|
alt: "icon"
|
|
603
|
-
}, null) : a(
|
|
603
|
+
}, null) : a(K, { type: e }, null) : typeof e == "function" || typeof e == "object" ? s(e) : null : null;
|
|
604
604
|
}
|
|
605
605
|
//#endregion
|
|
606
606
|
//#region src/components/Menu/overflow.ts
|
|
@@ -632,7 +632,7 @@ function It(e) {
|
|
|
632
632
|
}
|
|
633
633
|
c.value = p >= n.value ? 2 ** 53 - 1 : Math.max(p - 1, 0), l.value = p < n.value;
|
|
634
634
|
}
|
|
635
|
-
|
|
635
|
+
de(s, d), w([t, n], d, { flush: "post" }), m(() => {
|
|
636
636
|
u = !0;
|
|
637
637
|
});
|
|
638
638
|
function f(e) {
|
|
@@ -678,7 +678,7 @@ var Lt = (e) => {
|
|
|
678
678
|
[`${t}-title`]: { minWidth: 0 }
|
|
679
679
|
} };
|
|
680
680
|
}, Rt = (e) => {
|
|
681
|
-
let { antCls: t, componentCls: n } = e, r =
|
|
681
|
+
let { antCls: t, componentCls: n } = e, r = q(e.iconSize || e.fontSize), i = e.headerHeightLayoutHeader || e.itemHeight || e.controlHeightLG, a = e.itemPaddingInline ?? e.padding, o = q(e.activeBarHeight), s = e.iconMarginInlineEnd ?? e.marginSM, c = q(e.menuItemIconSize || e.iconSize || e.fontSize), l = e.itemHeight || e.controlHeight, u = e.itemMarginInline ?? e.marginXXS, d = e.itemMarginBlock ?? e.marginXXS, f = e.itemPaddingInline ?? e.padding, p = e.calc(e.fontSize).div(7).mul(5).equal(), m = e.calc(p).mul(.25).equal(), h = e.calc(p).add(e.padding).add(e.marginXS).equal(), g = e.iconMarginInlineEnd ?? e.marginSM, _ = e.itemWidth || `calc(100% - ${q(e.calc(u).mul(2).equal())})`;
|
|
682
682
|
return {
|
|
683
683
|
[`${n}`]: {
|
|
684
684
|
[`&${n}-horizontal`]: {
|
|
@@ -687,9 +687,9 @@ var Lt = (e) => {
|
|
|
687
687
|
flex: "auto",
|
|
688
688
|
minWidth: 0,
|
|
689
689
|
height: i,
|
|
690
|
-
lineHeight:
|
|
690
|
+
lineHeight: q(i),
|
|
691
691
|
border: 0,
|
|
692
|
-
borderBottom: `${
|
|
692
|
+
borderBottom: `${q(e.activeBarBorderWidth ?? e.lineWidth)} ${e.lineType} ${e.colorSplit}`,
|
|
693
693
|
boxShadow: "none",
|
|
694
694
|
whiteSpace: "nowrap",
|
|
695
695
|
overflow: "hidden",
|
|
@@ -722,7 +722,7 @@ var Lt = (e) => {
|
|
|
722
722
|
marginBlock: 0,
|
|
723
723
|
marginInline: 0,
|
|
724
724
|
paddingInline: a,
|
|
725
|
-
lineHeight:
|
|
725
|
+
lineHeight: q(i),
|
|
726
726
|
whiteSpace: "nowrap",
|
|
727
727
|
textOverflow: "ellipsis",
|
|
728
728
|
color: e.headerColorTextMenu || e.itemColor,
|
|
@@ -839,7 +839,7 @@ var Lt = (e) => {
|
|
|
839
839
|
[`${n}-horizontal-popup-list`]: {
|
|
840
840
|
minWidth: e.dropdownWidth,
|
|
841
841
|
maxWidth: e.dropdownWidth,
|
|
842
|
-
maxHeight: `calc(100vh - ${
|
|
842
|
+
maxHeight: `calc(100vh - ${q(e.calc(e.controlHeightLG).mul(2.5).equal())})`,
|
|
843
843
|
padding: 0,
|
|
844
844
|
overflow: "hidden auto",
|
|
845
845
|
borderInlineEnd: 0,
|
|
@@ -858,7 +858,7 @@ var Lt = (e) => {
|
|
|
858
858
|
paddingInline: f,
|
|
859
859
|
overflow: "hidden",
|
|
860
860
|
color: e.headerColorTextMenu || e.itemColor,
|
|
861
|
-
lineHeight:
|
|
861
|
+
lineHeight: q(l),
|
|
862
862
|
whiteSpace: "nowrap",
|
|
863
863
|
textOverflow: "ellipsis",
|
|
864
864
|
cursor: "pointer",
|
|
@@ -934,8 +934,8 @@ var Lt = (e) => {
|
|
|
934
934
|
].map((t) => `${t} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(","),
|
|
935
935
|
content: "\"\""
|
|
936
936
|
},
|
|
937
|
-
"&::before": { transform: `rotate(45deg) translateY(${
|
|
938
|
-
"&::after": { transform: `rotate(-45deg) translateY(${
|
|
937
|
+
"&::before": { transform: `rotate(45deg) translateY(${q(e.calc(m).mul(-1).equal())})` },
|
|
938
|
+
"&::after": { transform: `rotate(-45deg) translateY(${q(m)})` }
|
|
939
939
|
},
|
|
940
940
|
[`${n}-item:not(${n}-item-selected):not(${n}-item-active):hover,
|
|
941
941
|
${n}-submenu-title:not(${n}-item-selected):not(${n}-item-active):hover`]: {
|
|
@@ -950,7 +950,7 @@ var Lt = (e) => {
|
|
|
950
950
|
}
|
|
951
951
|
};
|
|
952
952
|
}, zt = (e) => {
|
|
953
|
-
let { componentCls: t, antCls: n } = e, r =
|
|
953
|
+
let { componentCls: t, antCls: n } = e, r = q(e.menuItemIconSize || e.iconSize || e.fontSize), i = q(e.collapsedIconSize || e.fontSizeLG), a = e.siderMenuItemHeight || e.itemHeight || e.controlHeight, o = e.siderMenuItemMarginInline ?? e.itemMarginInline ?? e.marginXXS, s = e.itemMarginBlock ?? e.marginXXS, c = e.itemPaddingInline ?? e.paddingSM, l = e.calc(e.fontSize).div(7).mul(5).equal(), u = e.calc(l).mul(.25).equal(), d = e.calc(l).add(e.padding).add(e.marginXS).equal(), f = e.iconMarginInlineEnd ?? e.marginSM, p = e.activeBarWidth ?? 0, m = e.itemWidth || `calc(100% - ${q(e.calc(o).mul(2).equal())})`;
|
|
954
954
|
return {
|
|
955
955
|
[`${t}-inline-collapsed-tooltip`]: {
|
|
956
956
|
pointerEvents: "none",
|
|
@@ -980,7 +980,7 @@ var Lt = (e) => {
|
|
|
980
980
|
[`&${t}-popup-list`]: {
|
|
981
981
|
minWidth: e.dropdownWidth,
|
|
982
982
|
maxWidth: e.dropdownWidth,
|
|
983
|
-
maxHeight: `calc(100vh - ${
|
|
983
|
+
maxHeight: `calc(100vh - ${q(e.calc(e.controlHeightLG).mul(2.5).equal())})`,
|
|
984
984
|
padding: 0,
|
|
985
985
|
overflow: "hidden auto",
|
|
986
986
|
borderInlineEnd: 0,
|
|
@@ -1001,11 +1001,11 @@ var Lt = (e) => {
|
|
|
1001
1001
|
minHeight: a,
|
|
1002
1002
|
marginBlock: s,
|
|
1003
1003
|
marginInline: o,
|
|
1004
|
-
paddingInlineStart: `calc(${
|
|
1004
|
+
paddingInlineStart: `calc(${q(c)} + var(--pro-menu-level, 0) * var(--pro-menu-indent, 24px))`,
|
|
1005
1005
|
paddingInlineEnd: c,
|
|
1006
1006
|
overflow: "hidden",
|
|
1007
1007
|
color: e.siderColorTextMenu || e.itemColor,
|
|
1008
|
-
lineHeight:
|
|
1008
|
+
lineHeight: q(a),
|
|
1009
1009
|
whiteSpace: "nowrap",
|
|
1010
1010
|
textOverflow: "ellipsis",
|
|
1011
1011
|
cursor: "pointer",
|
|
@@ -1020,7 +1020,7 @@ var Lt = (e) => {
|
|
|
1020
1020
|
position: "absolute",
|
|
1021
1021
|
insetBlock: 0,
|
|
1022
1022
|
insetInlineEnd: 0,
|
|
1023
|
-
borderInlineEnd: `${
|
|
1023
|
+
borderInlineEnd: `${q(p)} solid ${e.itemSelectedColor}`,
|
|
1024
1024
|
transform: "scaleY(0.0001)",
|
|
1025
1025
|
opacity: 0,
|
|
1026
1026
|
transition: ["transform", "opacity"].map((t) => `${t} ${e.motionDurationMid} ${e.motionEaseOut}`).join(","),
|
|
@@ -1032,7 +1032,7 @@ var Lt = (e) => {
|
|
|
1032
1032
|
},
|
|
1033
1033
|
[`&:not(${t}-item-selected):not(${t}-item-active):active`]: { backgroundColor: e.siderColorBgMenuItemActive || e.itemActiveBg },
|
|
1034
1034
|
"&:focus-visible": {
|
|
1035
|
-
outline: `${
|
|
1035
|
+
outline: `${q(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,
|
|
1036
1036
|
outlineOffset: 1
|
|
1037
1037
|
},
|
|
1038
1038
|
[`&${t}-item-active`]: { color: e.siderColorTextSubMenuSelected || e.siderColorTextMenuSelected || e.subMenuItemSelectedColor },
|
|
@@ -1053,7 +1053,7 @@ var Lt = (e) => {
|
|
|
1053
1053
|
},
|
|
1054
1054
|
[`&${t}-item-collapsed`]: {
|
|
1055
1055
|
justifyContent: "center",
|
|
1056
|
-
paddingInline: `calc(50% - ${r} / 2 - ${
|
|
1056
|
+
paddingInline: `calc(50% - ${r} / 2 - ${q(o)})`,
|
|
1057
1057
|
textOverflow: "clip"
|
|
1058
1058
|
},
|
|
1059
1059
|
"> *": { flex: "none" }
|
|
@@ -1133,23 +1133,23 @@ var Lt = (e) => {
|
|
|
1133
1133
|
].map((t) => `${t} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(","),
|
|
1134
1134
|
content: "\"\""
|
|
1135
1135
|
},
|
|
1136
|
-
"&::before": { transform: `rotate(-45deg) translateX(${
|
|
1137
|
-
"&::after": { transform: `rotate(45deg) translateX(${
|
|
1136
|
+
"&::before": { transform: `rotate(-45deg) translateX(${q(u)})` },
|
|
1137
|
+
"&::after": { transform: `rotate(45deg) translateX(${q(e.calc(u).mul(-1).equal())})` }
|
|
1138
1138
|
},
|
|
1139
1139
|
[`${t}-item-open ${t}-arrow`]: {
|
|
1140
|
-
transform: `translateY(${
|
|
1141
|
-
"&::before": { transform: `rotate(45deg) translateX(${
|
|
1142
|
-
"&::after": { transform: `rotate(-45deg) translateX(${
|
|
1140
|
+
transform: `translateY(${q(e.calc(l).mul(.2).mul(-1).equal())})`,
|
|
1141
|
+
"&::before": { transform: `rotate(45deg) translateX(${q(u)})` },
|
|
1142
|
+
"&::after": { transform: `rotate(-45deg) translateX(${q(e.calc(u).mul(-1).equal())})` }
|
|
1143
1143
|
},
|
|
1144
1144
|
[`${t}-submenu-title-popup ${t}-arrow`]: {
|
|
1145
1145
|
transform: "translateY(-50%)",
|
|
1146
|
-
"&::before": { transform: `rotate(45deg) translateY(${
|
|
1147
|
-
"&::after": { transform: `rotate(-45deg) translateY(${
|
|
1146
|
+
"&::before": { transform: `rotate(45deg) translateY(${q(e.calc(u).mul(-1).equal())})` },
|
|
1147
|
+
"&::after": { transform: `rotate(-45deg) translateY(${q(u)})` }
|
|
1148
1148
|
},
|
|
1149
1149
|
[`${t}-group-title`]: {
|
|
1150
1150
|
boxSizing: "border-box",
|
|
1151
1151
|
paddingBlock: e.paddingXXS,
|
|
1152
|
-
paddingInlineStart: `calc(${
|
|
1152
|
+
paddingInlineStart: `calc(${q(c)} + var(--pro-menu-level, 0) * var(--pro-menu-indent, 24px))`,
|
|
1153
1153
|
paddingInlineEnd: e.padding,
|
|
1154
1154
|
color: e.siderColorTextMenuTitle || e.groupTitleColor || e.colorTextLabel,
|
|
1155
1155
|
fontSize: e.groupTitleFontSize || e.fontSizeSM,
|
|
@@ -1226,7 +1226,7 @@ function Bt(e) {
|
|
|
1226
1226
|
return Number.isNaN(n) || n !== 0;
|
|
1227
1227
|
}
|
|
1228
1228
|
var Vt = k("ProMenu", (e) => {
|
|
1229
|
-
let t = e.calc(e.fontSize).div(7).mul(5).equal(), n =
|
|
1229
|
+
let t = e.calc(e.fontSize).div(7).mul(5).equal(), n = ge(e, {
|
|
1230
1230
|
menuArrowSize: t,
|
|
1231
1231
|
menuHorizontalHeight: e.calc(e.controlHeightLG).mul(1.15).equal(),
|
|
1232
1232
|
menuArrowOffset: e.calc(t).mul(.25).equal(),
|
|
@@ -1318,7 +1318,7 @@ var Vt = k("ProMenu", (e) => {
|
|
|
1318
1318
|
darkDangerItemActiveBg: n,
|
|
1319
1319
|
horizontalLineHeight: `${m * 1.15}px`,
|
|
1320
1320
|
horizontalItemBorderRadius: 0,
|
|
1321
|
-
itemWidth: Bt(w) ? `calc(100% + ${
|
|
1321
|
+
itemWidth: Bt(w) ? `calc(100% + ${q(T)})` : `calc(100% - ${E * 2}px)`
|
|
1322
1322
|
};
|
|
1323
1323
|
}, {
|
|
1324
1324
|
deprecatedTokens: [
|
|
@@ -1451,7 +1451,7 @@ var sn = {
|
|
|
1451
1451
|
on(e);
|
|
1452
1452
|
}
|
|
1453
1453
|
}, cn = /* @__PURE__ */ o((e, { emit: t, slots: o }) => {
|
|
1454
|
-
let { proClasses: s, proStyles: c, collapsed: l } = Y(e), { prefixCls: u } = W("pro-menu", e), d =
|
|
1454
|
+
let { proClasses: s, proStyles: c, collapsed: l } = Y(e), { prefixCls: u } = W("pro-menu", e), d = G(u), [h, g] = Vt(u, d), { proLayoutToken: _ } = N(), v = r(() => e.mode ?? (e.placement === "header" ? "horizontal" : "inline")), b = r(() => v.value === "horizontal"), x = r(() => !b.value && l.value), S = y([]), T = y(), D = It({
|
|
1455
1455
|
enabled: b,
|
|
1456
1456
|
totalCount: r(() => (e.menus ?? []).filter((e) => !e.meta?.hideInMenu).length)
|
|
1457
1457
|
}), O = y(!1), k = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Set(), j, M = r(() => new Set(e.selectedKeys ?? [])), P = r(() => new Set(e.openKeys ?? [])), F = r(() => Me({
|
|
@@ -1498,29 +1498,29 @@ var sn = {
|
|
|
1498
1498
|
function ie(e) {
|
|
1499
1499
|
U(e), S.value = e;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function ae(e) {
|
|
1502
1502
|
let t = $t(e);
|
|
1503
1503
|
if (A.delete(t), Qt(e, S.value)) {
|
|
1504
1504
|
let t = e.slice(0, -1);
|
|
1505
1505
|
S.value = t;
|
|
1506
1506
|
let n = $t(t);
|
|
1507
|
-
t.length > 0 && A.has(n) &&
|
|
1507
|
+
t.length > 0 && A.has(n) && ae(t);
|
|
1508
1508
|
return;
|
|
1509
1509
|
}
|
|
1510
1510
|
Zt(e, S.value) && A.add(t);
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function oe(e) {
|
|
1513
1513
|
let t = $t(e);
|
|
1514
1514
|
U(e);
|
|
1515
1515
|
let n = setTimeout(() => {
|
|
1516
|
-
k.delete(t),
|
|
1516
|
+
k.delete(t), ae(e);
|
|
1517
1517
|
}, Wt);
|
|
1518
1518
|
k.set(t, n);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function se() {
|
|
1521
1521
|
U(), A.clear(), S.value = [];
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function ce(t, n) {
|
|
1524
1524
|
if (!t.meta?.disabled) {
|
|
1525
1525
|
if (R(n)) {
|
|
1526
1526
|
ie(z(t, n));
|
|
@@ -1529,7 +1529,7 @@ var sn = {
|
|
|
1529
1529
|
te(P.value.has(t.name) ? (e.openKeys ?? []).filter((e) => e !== t.name) : [...e.openKeys ?? [], t.name]);
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function le(e, n) {
|
|
1533
1533
|
if (e.meta?.disabled) return;
|
|
1534
1534
|
let r = [e.name, ...n.parentKeys].filter(Boolean), i = [e.name];
|
|
1535
1535
|
t("select", {
|
|
@@ -1537,12 +1537,12 @@ var sn = {
|
|
|
1537
1537
|
keys: i,
|
|
1538
1538
|
keyPath: r,
|
|
1539
1539
|
route: e
|
|
1540
|
-
}), t("update:selectedKeys", i), n.popup &&
|
|
1540
|
+
}), t("update:selectedKeys", i), n.popup && se();
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function ue(e, t) {
|
|
1543
1543
|
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), t());
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function de() {
|
|
1546
1546
|
if (O.value || Xt || x.value) return;
|
|
1547
1547
|
let t = T.value;
|
|
1548
1548
|
if (!t) return;
|
|
@@ -1557,10 +1557,10 @@ var sn = {
|
|
|
1557
1557
|
behavior: "auto"
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function fe() {
|
|
1561
1561
|
O.value || Xt || p(() => {
|
|
1562
1562
|
O.value || Xt || (j !== void 0 && cancelAnimationFrame(j), j = requestAnimationFrame(() => {
|
|
1563
|
-
j = void 0,
|
|
1563
|
+
j = void 0, de();
|
|
1564
1564
|
}));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
@@ -1568,13 +1568,13 @@ var sn = {
|
|
|
1568
1568
|
e.menus?.length ?? 0,
|
|
1569
1569
|
e.selectedKeys?.join("|") ?? "",
|
|
1570
1570
|
e.openKeys?.join("|") ?? ""
|
|
1571
|
-
],
|
|
1571
|
+
], fe, {
|
|
1572
1572
|
immediate: !0,
|
|
1573
1573
|
flush: "post"
|
|
1574
1574
|
}), m(() => {
|
|
1575
1575
|
j !== void 0 && cancelAnimationFrame(j), U();
|
|
1576
1576
|
});
|
|
1577
|
-
function
|
|
1577
|
+
function pe(e, t, n) {
|
|
1578
1578
|
if (F.value.menuItemIcon) return F.value.menuItemIcon({
|
|
1579
1579
|
item: t,
|
|
1580
1580
|
route: e
|
|
@@ -1585,7 +1585,7 @@ var sn = {
|
|
|
1585
1585
|
style: e.meta?.styles?.itemIcon
|
|
1586
1586
|
}, [i]) : null;
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function me(e, t) {
|
|
1589
1589
|
let n = F.value.menuItemLabel ? F.value.menuItemLabel({
|
|
1590
1590
|
item: t,
|
|
1591
1591
|
route: e
|
|
@@ -1598,7 +1598,7 @@ var sn = {
|
|
|
1598
1598
|
style: e.meta?.styles?.itemTitle
|
|
1599
1599
|
}, [n]);
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1601
|
+
function he(e, t) {
|
|
1602
1602
|
if (F.value.menuItemExtra) return F.value.menuItemExtra({
|
|
1603
1603
|
item: t,
|
|
1604
1604
|
route: e
|
|
@@ -1610,7 +1610,7 @@ var sn = {
|
|
|
1610
1610
|
style: e.meta.styles?.itemRight
|
|
1611
1611
|
}, [n]);
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function K(e, t) {
|
|
1614
1614
|
let n = rn(e, "item"), r = x.value && !t.popup && t.depth === 0, i = M.value.has(e.name), o = !!e.meta?.disabled, s = r && !!e.meta?.title, c = a("div", {
|
|
1615
1615
|
class: J(`${u.value}-item`, e.meta?.classNames?.item, {
|
|
1616
1616
|
[`${u.value}-item-selected`]: i,
|
|
@@ -1623,12 +1623,12 @@ var sn = {
|
|
|
1623
1623
|
},
|
|
1624
1624
|
role: "menuitem",
|
|
1625
1625
|
tabindex: o ? -1 : 0,
|
|
1626
|
-
onClick: () =>
|
|
1627
|
-
onKeydown: (n) =>
|
|
1626
|
+
onClick: () => le(e, t),
|
|
1627
|
+
onKeydown: (n) => ue(n, () => le(e, t))
|
|
1628
1628
|
}, [
|
|
1629
|
-
|
|
1630
|
-
!r &&
|
|
1631
|
-
!r &&
|
|
1629
|
+
pe(e, n, r),
|
|
1630
|
+
!r && me(e, n),
|
|
1631
|
+
!r && he(e, n)
|
|
1632
1632
|
]);
|
|
1633
1633
|
return a("li", {
|
|
1634
1634
|
key: e.name,
|
|
@@ -1642,7 +1642,7 @@ var sn = {
|
|
|
1642
1642
|
classes: { root: `${u.value}-inline-collapsed-tooltip` }
|
|
1643
1643
|
}, Ht(c) ? c : { default: () => [c] }) : c]);
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function q(e, t, n, r) {
|
|
1646
1646
|
let i = rn(e, "submenu"), o = x.value && !t.popup && t.depth === 0, s = !!e.meta?.disabled;
|
|
1647
1647
|
return a("div", {
|
|
1648
1648
|
class: J(`${u.value}-item`, `${u.value}-submenu-title`, {
|
|
@@ -1657,17 +1657,17 @@ var sn = {
|
|
|
1657
1657
|
"aria-expanded": n,
|
|
1658
1658
|
tabindex: s ? -1 : 0,
|
|
1659
1659
|
title: o ? e.meta?.title : void 0,
|
|
1660
|
-
onClick: () =>
|
|
1661
|
-
onKeydown: (n) =>
|
|
1660
|
+
onClick: () => ce(e, t),
|
|
1661
|
+
onKeydown: (n) => ue(n, () => ce(e, t))
|
|
1662
1662
|
}, [
|
|
1663
|
-
|
|
1663
|
+
pe(e, i, o),
|
|
1664
|
+
!o && me(e, i),
|
|
1664
1665
|
!o && he(e, i),
|
|
1665
|
-
!o && ge(e, i),
|
|
1666
1666
|
!o && a("i", { class: `${u.value}-arrow` }, null)
|
|
1667
1667
|
]);
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1670
|
-
let i, o = ee(e, r), s = nn(e, M.value), c = !!e.meta?.disabled, l =
|
|
1669
|
+
function ge(e, t, r) {
|
|
1670
|
+
let i, o = ee(e, r), s = nn(e, M.value), c = !!e.meta?.disabled, l = q(e, r, o, s), d = r.horizontal && r.depth === 0 && !r.popup ? "bottomLeft" : "rightTop", p = d === "bottomLeft" ? Yt : r.popup ? Jt : qt, m = r.popup || !r.popup && r.depth === 0 && (x.value || r.horizontal), h = {
|
|
1671
1671
|
depth: r.depth + 1,
|
|
1672
1672
|
parentKeys: [e.name, ...r.parentKeys],
|
|
1673
1673
|
popup: r.popup,
|
|
@@ -1701,7 +1701,7 @@ var sn = {
|
|
|
1701
1701
|
content: `${u.value}-popover-content`
|
|
1702
1702
|
},
|
|
1703
1703
|
onOpenChange: (e) => {
|
|
1704
|
-
c || (e ? ie(n) :
|
|
1704
|
+
c || (e ? ie(n) : oe(n));
|
|
1705
1705
|
}
|
|
1706
1706
|
}, {
|
|
1707
1707
|
default: () => [l],
|
|
@@ -1725,7 +1725,7 @@ var sn = {
|
|
|
1725
1725
|
role: "none"
|
|
1726
1726
|
}, [l, a(n, f({ name: `${u.value}-collapse` }, sn), Ht(i = E(ye(t, h), [[C, o]])) ? i : { default: () => [i] })]);
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function _e(e, t, n) {
|
|
1729
1729
|
let r = rn(e, "group");
|
|
1730
1730
|
return a("li", {
|
|
1731
1731
|
key: e.name,
|
|
@@ -1735,7 +1735,7 @@ var sn = {
|
|
|
1735
1735
|
}, [a("div", {
|
|
1736
1736
|
class: `${u.value}-group-title`,
|
|
1737
1737
|
style: H(e, n)
|
|
1738
|
-
}, [
|
|
1738
|
+
}, [me(e, r)]), ye(t, {
|
|
1739
1739
|
depth: n.depth + 1,
|
|
1740
1740
|
parentKeys: [e.name, ...n.parentKeys],
|
|
1741
1741
|
popup: n.popup,
|
|
@@ -1744,13 +1744,13 @@ var sn = {
|
|
|
1744
1744
|
horizontal: n.horizontal
|
|
1745
1745
|
})]);
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function ve(e, t) {
|
|
1748
1748
|
if (e.meta?.hideInMenu) return null;
|
|
1749
1749
|
let n = tn(e), r = e.meta?.divider ? a("li", {
|
|
1750
1750
|
key: `${e.name}-divider`,
|
|
1751
1751
|
class: `${u.value}-divider`,
|
|
1752
1752
|
role: "separator"
|
|
1753
|
-
}, null) : null, i = n.length > 0 ? e.meta?.menuItemType === "group" ?
|
|
1753
|
+
}, null) : null, i = n.length > 0 ? e.meta?.menuItemType === "group" ? _e(e, n, t) : ge(e, n, t) : K(e, t);
|
|
1754
1754
|
return r ? [r, i] : i;
|
|
1755
1755
|
}
|
|
1756
1756
|
function ye(e, t) {
|
|
@@ -1763,7 +1763,7 @@ var sn = {
|
|
|
1763
1763
|
[`${u.value}-${t.horizontal ? "horizontal" : "inline"}-popup-list`]: t.popup
|
|
1764
1764
|
}),
|
|
1765
1765
|
role: t.popup ? "menu" : void 0
|
|
1766
|
-
}, [e.map((e) =>
|
|
1766
|
+
}, [e.map((e) => ve(e, t))]);
|
|
1767
1767
|
}
|
|
1768
1768
|
function be(e) {
|
|
1769
1769
|
let t = D.hiddenIndexes.value.map((t) => e[t]).filter(Boolean);
|
|
@@ -1789,7 +1789,7 @@ var sn = {
|
|
|
1789
1789
|
content: `${u.value}-popover-content`
|
|
1790
1790
|
},
|
|
1791
1791
|
onOpenChange: (e) => {
|
|
1792
|
-
e ? ie(r) :
|
|
1792
|
+
e ? ie(r) : oe(r);
|
|
1793
1793
|
}
|
|
1794
1794
|
}, {
|
|
1795
1795
|
default: () => [a("div", {
|
|
@@ -1819,7 +1819,7 @@ var sn = {
|
|
|
1819
1819
|
},
|
|
1820
1820
|
role: "menu",
|
|
1821
1821
|
"data-pro-menu-token-key": _.value.key
|
|
1822
|
-
}, [t.map((e) =>
|
|
1822
|
+
}, [t.map((e) => ve(e, {
|
|
1823
1823
|
depth: 0,
|
|
1824
1824
|
parentKeys: [],
|
|
1825
1825
|
popup: !1,
|
|
@@ -1837,7 +1837,7 @@ var sn = {
|
|
|
1837
1837
|
},
|
|
1838
1838
|
role: "menubar",
|
|
1839
1839
|
"data-pro-menu-token-key": _.value.key
|
|
1840
|
-
}, [n.map((e, t) =>
|
|
1840
|
+
}, [n.map((e, t) => ve(e, {
|
|
1841
1841
|
depth: 0,
|
|
1842
1842
|
parentKeys: [],
|
|
1843
1843
|
popup: !1,
|
|
@@ -2047,7 +2047,7 @@ function pn(t, n) {
|
|
|
2047
2047
|
return a(e, null, [r && a("span", { class: `${t}-item-icon` }, [r]), !i && a("span", null, [n.meta?.title])]);
|
|
2048
2048
|
}
|
|
2049
2049
|
var mn = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
2050
|
-
let { navigate: o, prefixCls: s, menuState: c, breadcrumbConfig: l } = Y(), u =
|
|
2050
|
+
let { navigate: o, prefixCls: s, menuState: c, breadcrumbConfig: l } = Y(), u = ve(), d = r(() => t.routes ?? c?.breadcrumbRoutes.value ?? []), f = r(() => t.homeIcon === void 0 ? l ? l.value?.showHome : void 0 : t.homeIcon), p = r(() => t.homePath === void 0 ? l?.value?.homePath ?? "/" : t.homePath), m = r(() => c?.lookup.value), h = r(() => c?.selectedKeys.value ?? []), g = r(() => {
|
|
2051
2051
|
let e = d.value;
|
|
2052
2052
|
return f.value && e.length > 0 ? [{
|
|
2053
2053
|
name: fn,
|
|
@@ -2100,7 +2100,7 @@ var mn = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
2100
2100
|
} }, { default: () => [a("span", {
|
|
2101
2101
|
class: `${r}-overlay-link`,
|
|
2102
2102
|
onClick: o.name === fn ? () => v(o, c) : void 0
|
|
2103
|
-
}, [u, a(
|
|
2103
|
+
}, [u, a(K, { type: "DownOutlined" }, null)])] }) : a("span", {
|
|
2104
2104
|
class: J(`${r}-link`, c && `${r}-link-last`),
|
|
2105
2105
|
onClick: () => v(o, c)
|
|
2106
2106
|
}, [u])]), !c && a("li", { class: `${r}-separator` }, [i("/")])]);
|
|
@@ -2334,7 +2334,7 @@ var bn = [
|
|
|
2334
2334
|
"headerContent",
|
|
2335
2335
|
"extra"
|
|
2336
2336
|
], xn = ["footer"], Sn = /* @__PURE__ */ o((t, { slots: n, emit: i }) => {
|
|
2337
|
-
let { prefixCls: o } = W("pro-page-container", t), s =
|
|
2337
|
+
let { prefixCls: o } = W("pro-page-container", t), s = G(o), [c, l] = vn(o, s), { watermark: u, menuState: d, breadcrumbRender: p, contentFullscreen: m, breadcrumbConfig: h, pageContainerConfig: _ } = Y(), v = Pe(), y = dn({
|
|
2338
2338
|
slots: n,
|
|
2339
2339
|
props: t,
|
|
2340
2340
|
keys: bn,
|
|
@@ -3893,7 +3893,7 @@ var bi = k("ProPageTransition", (e) => {
|
|
|
3893
3893
|
},
|
|
3894
3894
|
slots: Object,
|
|
3895
3895
|
setup(e, { slots: t }) {
|
|
3896
|
-
let { prefixCls: i } = W("pro-page-transition", e), [o, s] = bi(i,
|
|
3896
|
+
let { prefixCls: i } = W("pro-page-transition", e), [o, s] = bi(i, G(i));
|
|
3897
3897
|
function c(t) {
|
|
3898
3898
|
return [
|
|
3899
3899
|
Dn({
|
|
@@ -4020,22 +4020,22 @@ function wi(e, t, n = {}) {
|
|
|
4020
4020
|
}
|
|
4021
4021
|
//#endregion
|
|
4022
4022
|
//#region src/components/Tabs/hooks/useTabDrag.ts
|
|
4023
|
-
var Ti = "button, a, input, [data-drag-ignore=\"true\"]", Ei =
|
|
4024
|
-
function
|
|
4023
|
+
var Ti = "button, a, input, [data-drag-ignore=\"true\"]", Ei = 200, Di = 10, Oi = 2, ki = 160, Ai = "cubic-bezier(0.2, 0, 0, 1)";
|
|
4024
|
+
function ji(e) {
|
|
4025
4025
|
return e instanceof HTMLElement && !!e.closest(Ti);
|
|
4026
4026
|
}
|
|
4027
|
-
function
|
|
4028
|
-
let { items: t, scrollEl: n, onReorder: r, enabled: i } = e, a = y(!1), o = y(""), s, c = 0, l = 0, u = 0, d = 0, f = null, m = /* @__PURE__ */ new Map(), h = "", g = 0, { scroll:
|
|
4029
|
-
function
|
|
4027
|
+
function Mi(e) {
|
|
4028
|
+
let { items: t, scrollEl: n, onReorder: r, enabled: i } = e, a = y(!1), o = y(""), s, c = 0, l = 0, u = 0, d = 0, f = null, m = /* @__PURE__ */ new Map(), h = "", g = 0, _, { scroll: v, start: b, stop: x } = wi(n, () => d, { onScroll: M });
|
|
4029
|
+
function S() {
|
|
4030
4030
|
return t.value.filter((e) => e.group === s);
|
|
4031
4031
|
}
|
|
4032
|
-
function
|
|
4032
|
+
function C(e) {
|
|
4033
4033
|
return n.value?.querySelector(`[data-key="${e}"]`) ?? null;
|
|
4034
4034
|
}
|
|
4035
|
-
function
|
|
4035
|
+
function w() {
|
|
4036
4036
|
m = /* @__PURE__ */ new Map();
|
|
4037
|
-
for (let e of
|
|
4038
|
-
let t =
|
|
4037
|
+
for (let e of S()) {
|
|
4038
|
+
let t = C(e.key);
|
|
4039
4039
|
if (!t) continue;
|
|
4040
4040
|
let n = t.getBoundingClientRect();
|
|
4041
4041
|
m.set(e.key, {
|
|
@@ -4046,22 +4046,22 @@ function ji(e) {
|
|
|
4046
4046
|
});
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
|
-
function w() {
|
|
4050
|
-
return (n.value?.scrollLeft ?? 0) - l;
|
|
4051
|
-
}
|
|
4052
4049
|
function T() {
|
|
4053
|
-
return
|
|
4050
|
+
return (n.value?.scrollLeft ?? 0) - l;
|
|
4054
4051
|
}
|
|
4055
4052
|
function E() {
|
|
4053
|
+
return d + T();
|
|
4054
|
+
}
|
|
4055
|
+
function D() {
|
|
4056
4056
|
let e = m.get(o.value);
|
|
4057
|
-
return e ?
|
|
4057
|
+
return e ? E() - u + e.width / 2 : E();
|
|
4058
4058
|
}
|
|
4059
|
-
function
|
|
4060
|
-
let r = m.get(o.value), i = e < t ?
|
|
4059
|
+
function O(e, t, n) {
|
|
4060
|
+
let r = m.get(o.value), i = e < t ? S()[e + 1]?.key : S()[e - 1]?.key, a = i ? m.get(i) : void 0;
|
|
4061
4061
|
return n + (r && a ? Math.max(0, Math.abs(a.left - r.left) - (e < t ? r.width : a.width)) : 0);
|
|
4062
4062
|
}
|
|
4063
|
-
function
|
|
4064
|
-
let t =
|
|
4063
|
+
function k(e) {
|
|
4064
|
+
let t = S();
|
|
4065
4065
|
if (t.findIndex((e) => e.key === o.value) < 0) return -1;
|
|
4066
4066
|
let n = t.filter((e) => e.key !== o.value), r = n.length;
|
|
4067
4067
|
for (let t = 0; t < n.length; t++) {
|
|
@@ -4073,8 +4073,8 @@ function ji(e) {
|
|
|
4073
4073
|
}
|
|
4074
4074
|
return r;
|
|
4075
4075
|
}
|
|
4076
|
-
function
|
|
4077
|
-
let t =
|
|
4076
|
+
function A(e) {
|
|
4077
|
+
let t = S(), n = t.findIndex((e) => e.key === o.value);
|
|
4078
4078
|
if (n < 0) return;
|
|
4079
4079
|
let r = m.get(o.value)?.width ?? 0;
|
|
4080
4080
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -4083,25 +4083,25 @@ function ji(e) {
|
|
|
4083
4083
|
let s = m.get(a);
|
|
4084
4084
|
if (!s) continue;
|
|
4085
4085
|
let c = 0;
|
|
4086
|
-
n < e && i > n && i <= e ? c = -
|
|
4086
|
+
n < e && i > n && i <= e ? c = -O(n, e, r) : n > e && i >= e && i < n && (c = O(n, e, r)), j(s, c);
|
|
4087
4087
|
}
|
|
4088
4088
|
}
|
|
4089
|
-
function
|
|
4089
|
+
function j(e, t) {
|
|
4090
4090
|
let n = e.translate;
|
|
4091
4091
|
if (n === t || (e.animation?.cancel(), e.translate = t, e.el.style.translate = t ? `${t}px` : "", typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches || typeof e.el.animate != "function")) return;
|
|
4092
4092
|
e.animation = e.el.animate({ translate: [`${n}px`, `${t}px`] }, {
|
|
4093
|
-
duration:
|
|
4094
|
-
easing:
|
|
4093
|
+
duration: ki,
|
|
4094
|
+
easing: Ai
|
|
4095
4095
|
});
|
|
4096
4096
|
let r = () => {
|
|
4097
4097
|
e.animation = void 0;
|
|
4098
4098
|
};
|
|
4099
4099
|
e.animation.addEventListener("finish", r, { once: !0 }), e.animation.addEventListener("cancel", r, { once: !0 });
|
|
4100
4100
|
}
|
|
4101
|
-
function
|
|
4102
|
-
a.value && (f && (f.style.transform = `translateX(${
|
|
4101
|
+
function M() {
|
|
4102
|
+
a.value && (f && (f.style.transform = `translateX(${E() - c}px)`), A(k(D())));
|
|
4103
4103
|
}
|
|
4104
|
-
function
|
|
4104
|
+
function N(e = m, t = f) {
|
|
4105
4105
|
for (let t of e.values()) {
|
|
4106
4106
|
t.animation?.cancel(), t.animation = void 0, t.translate = 0;
|
|
4107
4107
|
let { el: e } = t;
|
|
@@ -4109,16 +4109,16 @@ function ji(e) {
|
|
|
4109
4109
|
}
|
|
4110
4110
|
t && (t.style.transform = "");
|
|
4111
4111
|
}
|
|
4112
|
-
function
|
|
4112
|
+
function P(e, t = Oi) {
|
|
4113
4113
|
let r = n.value;
|
|
4114
|
-
r && (r.scrollLeft = e, !(t <= 0 || typeof requestAnimationFrame > "u") && requestAnimationFrame(() =>
|
|
4114
|
+
r && (r.scrollLeft = e, !(t <= 0 || typeof requestAnimationFrame > "u") && requestAnimationFrame(() => P(e, t - 1)));
|
|
4115
4115
|
}
|
|
4116
|
-
function
|
|
4117
|
-
a.value = !0, c = e, l = n.value?.scrollLeft ?? 0,
|
|
4116
|
+
function F(e) {
|
|
4117
|
+
a.value = !0, c = e, d = e, l = n.value?.scrollLeft ?? 0, f = C(o.value), w();
|
|
4118
4118
|
let t = m.get(o.value);
|
|
4119
|
-
u = t ? e - t.left : 0,
|
|
4119
|
+
u = t ? e - t.left : 0, b();
|
|
4120
4120
|
}
|
|
4121
|
-
function
|
|
4121
|
+
function I() {
|
|
4122
4122
|
let e = f;
|
|
4123
4123
|
if (!e) return;
|
|
4124
4124
|
let t = (n) => {
|
|
@@ -4129,46 +4129,55 @@ function ji(e) {
|
|
|
4129
4129
|
once: !0
|
|
4130
4130
|
});
|
|
4131
4131
|
}
|
|
4132
|
-
function
|
|
4133
|
-
e.button !== 0 || t.disabled ||
|
|
4132
|
+
function L(e, t) {
|
|
4133
|
+
e.button !== 0 || t.disabled || ji(e.target) || i && !i.value || (e.preventDefault(), B(), h = t.key, g = e.clientX, s = t.group, _ = setTimeout(() => {
|
|
4134
|
+
h && (o.value = h, d = g, F(g));
|
|
4135
|
+
}, Ei));
|
|
4134
4136
|
}
|
|
4135
|
-
function
|
|
4137
|
+
function R(e) {
|
|
4136
4138
|
if (!a.value) {
|
|
4137
|
-
if (!h
|
|
4138
|
-
|
|
4139
|
+
if (!h) return;
|
|
4140
|
+
if (Math.abs(e.clientX - g) > Di) {
|
|
4141
|
+
B();
|
|
4142
|
+
return;
|
|
4143
|
+
}
|
|
4144
|
+
return;
|
|
4139
4145
|
}
|
|
4140
|
-
d = e.clientX,
|
|
4146
|
+
d = e.clientX, M(), v();
|
|
4141
4147
|
}
|
|
4142
|
-
function
|
|
4143
|
-
let e =
|
|
4148
|
+
function z() {
|
|
4149
|
+
let e = k(D()), t = S(), i = t.findIndex((e) => e.key === o.value), c = /* @__PURE__ */ new Map();
|
|
4144
4150
|
for (let [e, { el: t }] of m) c.set(e, t.getBoundingClientRect());
|
|
4145
|
-
|
|
4146
|
-
let l = o.value, d = t[e],
|
|
4147
|
-
|
|
4148
|
-
|
|
4151
|
+
x();
|
|
4152
|
+
let l = o.value, d = t[e], h = e >= 0 && e !== i && d && d.key !== l, g = m, _ = f, v = n.value?.scrollLeft ?? 0;
|
|
4153
|
+
h ? (r(l, d.key), p(() => {
|
|
4154
|
+
P(v), N(g, _), Si(t.map((e) => ({
|
|
4149
4155
|
key: e.key,
|
|
4150
|
-
el:
|
|
4151
|
-
})).filter((e) => !!e.el), c),
|
|
4152
|
-
})) :
|
|
4156
|
+
el: C(e.key)
|
|
4157
|
+
})).filter((e) => !!e.el), c), P(v);
|
|
4158
|
+
})) : N(), I(), a.value = !1, o.value = "", f = null, m = /* @__PURE__ */ new Map(), u = 0, s = void 0, B();
|
|
4153
4159
|
}
|
|
4154
|
-
function
|
|
4155
|
-
|
|
4160
|
+
function B() {
|
|
4161
|
+
_ != null && (clearTimeout(_), _ = void 0), h = "", o.value = "", s = void 0;
|
|
4162
|
+
}
|
|
4163
|
+
function ee() {
|
|
4164
|
+
a.value ? z() : h && B();
|
|
4156
4165
|
}
|
|
4157
|
-
let
|
|
4158
|
-
|
|
4159
|
-
function
|
|
4166
|
+
let V = typeof document > "u" ? void 0 : document;
|
|
4167
|
+
ce(V, "mousemove", R), ce(V, "mouseup", ee);
|
|
4168
|
+
function H(e) {
|
|
4160
4169
|
let n = t.value.find((t) => t.key === e);
|
|
4161
4170
|
return { onMousedown: (e) => {
|
|
4162
|
-
n &&
|
|
4171
|
+
n && L(e, n);
|
|
4163
4172
|
} };
|
|
4164
4173
|
}
|
|
4165
4174
|
return {
|
|
4166
4175
|
isDragging: a,
|
|
4167
4176
|
draggingKey: o,
|
|
4168
|
-
getItemProps:
|
|
4177
|
+
getItemProps: H
|
|
4169
4178
|
};
|
|
4170
4179
|
}
|
|
4171
|
-
var
|
|
4180
|
+
var Ni = k("InnerTabs", (e) => {
|
|
4172
4181
|
let { componentCls: t } = e;
|
|
4173
4182
|
return { [t]: {
|
|
4174
4183
|
display: "flex",
|
|
@@ -4213,7 +4222,7 @@ var Mi = k("InnerTabs", (e) => {
|
|
|
4213
4222
|
lineHeight: 1,
|
|
4214
4223
|
color: e.tabsColorText,
|
|
4215
4224
|
backgroundColor: e.tabsColorBgContainer,
|
|
4216
|
-
border: `${
|
|
4225
|
+
border: `${q(e.lineWidth)} ${e.lineType} ${e.tabsColorBorder}`,
|
|
4217
4226
|
borderRadius: e.itemBorderRadius,
|
|
4218
4227
|
cursor: "pointer",
|
|
4219
4228
|
userSelect: "none",
|
|
@@ -4317,8 +4326,8 @@ var Mi = k("InnerTabs", (e) => {
|
|
|
4317
4326
|
closeIconBoxSize: e.controlHeightXS,
|
|
4318
4327
|
navPaddingBlock: e.paddingXXS,
|
|
4319
4328
|
navPaddingInline: e.paddingSM
|
|
4320
|
-
})),
|
|
4321
|
-
let { prefixCls: o } = W("pro-inner-tabs", t), s =
|
|
4329
|
+
})), Pi = 16, Fi = "#fff", Ii = /* @__PURE__ */ o((t, { slots: n, emit: i }) => {
|
|
4330
|
+
let { prefixCls: o } = W("pro-inner-tabs", t), s = G(o), [c, l] = Ni(o, s), u = y(), d = r(() => t.items ?? []), m = r(() => t.activeKey ?? ""), { arrivedState: h } = fe(u), { draggingKey: g, getItemProps: _ } = Mi({
|
|
4322
4331
|
items: d,
|
|
4323
4332
|
scrollEl: u,
|
|
4324
4333
|
onReorder: (e, t) => i("reorder", e, t),
|
|
@@ -4326,7 +4335,7 @@ var Mi = k("InnerTabs", (e) => {
|
|
|
4326
4335
|
}), v = r(() => {
|
|
4327
4336
|
let e = h.left, t = h.right;
|
|
4328
4337
|
if (e && t) return {};
|
|
4329
|
-
let n = !e && !t ? `linear-gradient(90deg, transparent, ${
|
|
4338
|
+
let n = !e && !t ? `linear-gradient(90deg, transparent, ${Fi} ${Pi}px, ${Fi} calc(100% - ${Pi}px), transparent)` : e ? `linear-gradient(90deg, ${Fi} calc(100% - ${Pi}px), transparent)` : `linear-gradient(90deg, transparent, ${Fi} ${Pi}px)`;
|
|
4330
4339
|
return {
|
|
4331
4340
|
WebkitMaskImage: n,
|
|
4332
4341
|
maskImage: n
|
|
@@ -4352,7 +4361,7 @@ var Mi = k("InnerTabs", (e) => {
|
|
|
4352
4361
|
}),
|
|
4353
4362
|
"data-key": t.key,
|
|
4354
4363
|
onClick: () => b(t)
|
|
4355
|
-
}, _(t.key)), [s ?? a(e, null, [a("span", { class: `${o.value}-tab-btn` }, [t.label]), i && a(
|
|
4364
|
+
}, _(t.key)), [s ?? a(e, null, [a("span", { class: `${o.value}-tab-btn` }, [t.label]), i && a(K, {
|
|
4356
4365
|
type: "CloseOutlined",
|
|
4357
4366
|
class: `${o.value}-tab-close ${o.value}-tab-remove`,
|
|
4358
4367
|
"data-drag-ignore": "true",
|
|
@@ -4402,11 +4411,11 @@ var Mi = k("InnerTabs", (e) => {
|
|
|
4402
4411
|
});
|
|
4403
4412
|
//#endregion
|
|
4404
4413
|
//#region src/utils/menu.ts
|
|
4405
|
-
function
|
|
4414
|
+
function Li(e) {
|
|
4406
4415
|
let t = e.find((e) => (e.name === "root" || e.path === "/") && (e.children?.length ?? 0) > 0);
|
|
4407
4416
|
return t?.children ? [...t.children] : [];
|
|
4408
4417
|
}
|
|
4409
|
-
function
|
|
4418
|
+
function Ri(e) {
|
|
4410
4419
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
4411
4420
|
function r(e, i) {
|
|
4412
4421
|
let a = [];
|
|
@@ -4432,20 +4441,20 @@ function Li(e) {
|
|
|
4432
4441
|
let i = r(e, !1);
|
|
4433
4442
|
return n.length > 0 && console.warn("[pro-layout] 菜单存在重复或缺失的 name,已忽略:", n), i;
|
|
4434
4443
|
}
|
|
4435
|
-
function
|
|
4444
|
+
function zi(e) {
|
|
4436
4445
|
return e.map((e, t) => ({
|
|
4437
4446
|
menu: e,
|
|
4438
4447
|
order: e.meta?.order ?? t,
|
|
4439
4448
|
index: t
|
|
4440
4449
|
})).sort((e, t) => e.order - t.order || e.index - t.index).map(({ menu: e }) => ({
|
|
4441
4450
|
...e,
|
|
4442
|
-
children: e.children?.length ?
|
|
4451
|
+
children: e.children?.length ? zi(e.children) : e.children
|
|
4443
4452
|
}));
|
|
4444
4453
|
}
|
|
4445
|
-
function zi(e) {
|
|
4446
|
-
return Ri(Li(e));
|
|
4447
|
-
}
|
|
4448
4454
|
function Bi(e) {
|
|
4455
|
+
return zi(Ri(e));
|
|
4456
|
+
}
|
|
4457
|
+
function Vi(e) {
|
|
4449
4458
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
4450
4459
|
function r(e, i, a) {
|
|
4451
4460
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -4464,7 +4473,7 @@ function Bi(e) {
|
|
|
4464
4473
|
lookup: n
|
|
4465
4474
|
};
|
|
4466
4475
|
}
|
|
4467
|
-
function
|
|
4476
|
+
function Hi(e, t) {
|
|
4468
4477
|
let n = {
|
|
4469
4478
|
...e,
|
|
4470
4479
|
...t
|
|
@@ -4474,19 +4483,19 @@ function Vi(e, t) {
|
|
|
4474
4483
|
...t.meta
|
|
4475
4484
|
} : t.meta), n;
|
|
4476
4485
|
}
|
|
4477
|
-
function
|
|
4486
|
+
function Ui(e, t) {
|
|
4478
4487
|
return {
|
|
4479
4488
|
...e,
|
|
4480
4489
|
...t
|
|
4481
4490
|
};
|
|
4482
4491
|
}
|
|
4483
|
-
function
|
|
4492
|
+
function Wi(e, t, n) {
|
|
4484
4493
|
if (t.length === 0) return e;
|
|
4485
4494
|
let r = [...e], i = e, a = r;
|
|
4486
4495
|
for (let o = 0; o < t.length; o++) {
|
|
4487
4496
|
let s = t[o], c = i[s];
|
|
4488
4497
|
if (!c) return e;
|
|
4489
|
-
if (o === t.length - 1) return a[s] = typeof n == "function" ? n(c) :
|
|
4498
|
+
if (o === t.length - 1) return a[s] = typeof n == "function" ? n(c) : Hi(c, n), r;
|
|
4490
4499
|
let l = c.children ? [...c.children] : [];
|
|
4491
4500
|
a[s] = {
|
|
4492
4501
|
...c,
|
|
@@ -4495,21 +4504,21 @@ function Ui(e, t, n) {
|
|
|
4495
4504
|
}
|
|
4496
4505
|
return r;
|
|
4497
4506
|
}
|
|
4498
|
-
function
|
|
4499
|
-
return
|
|
4500
|
-
let t = e.meta ?? {}, r = typeof n == "function" ? n(t) :
|
|
4507
|
+
function Gi(e, t, n) {
|
|
4508
|
+
return Wi(e, t, (e) => {
|
|
4509
|
+
let t = e.meta ?? {}, r = typeof n == "function" ? n(t) : Ui(t, n);
|
|
4501
4510
|
return {
|
|
4502
4511
|
...e,
|
|
4503
4512
|
meta: r
|
|
4504
4513
|
};
|
|
4505
4514
|
});
|
|
4506
4515
|
}
|
|
4507
|
-
function
|
|
4516
|
+
function Ki(e, t, n, r) {
|
|
4508
4517
|
if (!t?.length) {
|
|
4509
4518
|
let t = [...e];
|
|
4510
4519
|
return t.splice(r ?? t.length, 0, n), t;
|
|
4511
4520
|
}
|
|
4512
|
-
return
|
|
4521
|
+
return Wi(e, t, (e) => {
|
|
4513
4522
|
let t = [...e.children ?? []];
|
|
4514
4523
|
return t.splice(r ?? t.length, 0, n), {
|
|
4515
4524
|
...e,
|
|
@@ -4517,14 +4526,14 @@ function Gi(e, t, n, r) {
|
|
|
4517
4526
|
};
|
|
4518
4527
|
});
|
|
4519
4528
|
}
|
|
4520
|
-
function
|
|
4529
|
+
function qi(e, t) {
|
|
4521
4530
|
if (t.length === 0) return e;
|
|
4522
4531
|
if (t.length === 1) {
|
|
4523
4532
|
let n = [...e];
|
|
4524
4533
|
return n.splice(t[0], 1), n;
|
|
4525
4534
|
}
|
|
4526
4535
|
let n = t.slice(0, -1), r = t[t.length - 1];
|
|
4527
|
-
return
|
|
4536
|
+
return Wi(e, n, (e) => {
|
|
4528
4537
|
let t = [...e.children ?? []];
|
|
4529
4538
|
return t.splice(r, 1), {
|
|
4530
4539
|
...e,
|
|
@@ -4532,7 +4541,7 @@ function Ki(e, t) {
|
|
|
4532
4541
|
};
|
|
4533
4542
|
});
|
|
4534
4543
|
}
|
|
4535
|
-
function
|
|
4544
|
+
function Ji(e) {
|
|
4536
4545
|
if (!e) return [];
|
|
4537
4546
|
let t = [e.name];
|
|
4538
4547
|
function n(e) {
|
|
@@ -4540,7 +4549,7 @@ function qi(e) {
|
|
|
4540
4549
|
}
|
|
4541
4550
|
return n(e.children), t;
|
|
4542
4551
|
}
|
|
4543
|
-
function
|
|
4552
|
+
function Yi(e, t) {
|
|
4544
4553
|
if (!t) return [];
|
|
4545
4554
|
let n = e.get(t);
|
|
4546
4555
|
if (!n) return [];
|
|
@@ -4549,22 +4558,22 @@ function Ji(e, t) {
|
|
|
4549
4558
|
let i = r ? e.get(r) : n;
|
|
4550
4559
|
return i ? [...i.parentNames, i.route.name].map((t) => e.get(t)?.route).filter((e) => !!e && !e.meta?.hideInMenu) : [];
|
|
4551
4560
|
}
|
|
4552
|
-
function
|
|
4561
|
+
function Xi(e) {
|
|
4553
4562
|
let t = e.filter((e) => !e.meta?.hideInMenu)[0];
|
|
4554
|
-
return t ? t.children?.length ?
|
|
4563
|
+
return t ? t.children?.length ? Xi(t.children) : t.redirect || t.path || "" : "";
|
|
4555
4564
|
}
|
|
4556
|
-
function
|
|
4565
|
+
function Zi(e, t) {
|
|
4557
4566
|
let n = e.filter((e) => e.meta?.title), r = t?.current;
|
|
4558
4567
|
return r?.meta?.menuSelectKey && r.meta?.title && n.push(r), n;
|
|
4559
4568
|
}
|
|
4560
|
-
function
|
|
4569
|
+
function Qi(e) {
|
|
4561
4570
|
return e.map((e) => ({
|
|
4562
4571
|
key: e.name,
|
|
4563
4572
|
title: e.meta?.title,
|
|
4564
|
-
path: e.redirect || (e.children?.length ?
|
|
4573
|
+
path: e.redirect || (e.children?.length ? Xi(e.children) : "") || e.path || ""
|
|
4565
4574
|
}));
|
|
4566
4575
|
}
|
|
4567
|
-
function
|
|
4576
|
+
function $i(e, t) {
|
|
4568
4577
|
let n = e.get(t)?.route;
|
|
4569
4578
|
if (!n) return {
|
|
4570
4579
|
type: "internal",
|
|
@@ -4577,14 +4586,14 @@ function Qi(e, t) {
|
|
|
4577
4586
|
route: n
|
|
4578
4587
|
} : {
|
|
4579
4588
|
type: "internal",
|
|
4580
|
-
path: typeof n.redirect == "string" ? n.redirect : n.children?.length ?
|
|
4589
|
+
path: typeof n.redirect == "string" ? n.redirect : n.children?.length ? Xi(n.children) || n.path || "" : n.path || "",
|
|
4581
4590
|
route: n
|
|
4582
4591
|
};
|
|
4583
4592
|
}
|
|
4584
|
-
function
|
|
4593
|
+
function ea(e, t) {
|
|
4585
4594
|
return t ? e.find((e) => e.name === t)?.children ?? [] : [];
|
|
4586
4595
|
}
|
|
4587
|
-
function
|
|
4596
|
+
function ta(e) {
|
|
4588
4597
|
let t = [], n = [];
|
|
4589
4598
|
for (let r of e) r.meta?.fixed ? n.push(r) : t.push(r);
|
|
4590
4599
|
return {
|
|
@@ -4594,20 +4603,20 @@ function ea(e) {
|
|
|
4594
4603
|
}
|
|
4595
4604
|
//#endregion
|
|
4596
4605
|
//#region src/hooks/useMenu.ts
|
|
4597
|
-
function
|
|
4598
|
-
let t =
|
|
4599
|
-
let { flatMenus: e, lookup: t } =
|
|
4606
|
+
function na(e) {
|
|
4607
|
+
let t = ve(), n = _e(), i = r(() => e.currentName?.() ?? n.name), a = r(() => S(e.menus) ?? Li(t.getRoutes())), o = b(Bi(a.value)), s = b([...S(e.selectedKeys) ?? []]), c = b([...S(e.openKeys) ?? []]), l = r(() => {
|
|
4608
|
+
let { flatMenus: e, lookup: t } = Vi(o.value);
|
|
4600
4609
|
return {
|
|
4601
4610
|
menus: o.value,
|
|
4602
4611
|
flatMenus: e,
|
|
4603
4612
|
lookup: t
|
|
4604
4613
|
};
|
|
4605
|
-
}), u = r(() => l.value.flatMenus), d = r(() => l.value.lookup), f = r(() =>
|
|
4614
|
+
}), u = r(() => l.value.flatMenus), d = r(() => l.value.lookup), f = r(() => Yi(d.value, i.value)), p = r(() => f.value.map((e) => e.name).join("\0")), m = r(() => d.value.get(i.value ?? "")?.route.meta ?? {}), h = r(() => Zi(f.value, { current: d.value.get(i.value ?? "")?.route })), _ = r(() => Qi(h.value)), v = r(() => S(e.layout) === "mix" && !S(e.isMobile)), y = r(() => f.value[0]?.name), x = r(() => v.value ? o.value.map((e) => ({
|
|
4606
4615
|
...e,
|
|
4607
4616
|
children: void 0
|
|
4608
|
-
})) : o.value), C = r(() => v.value ?
|
|
4617
|
+
})) : o.value), C = r(() => v.value ? ea(o.value, y.value) : o.value);
|
|
4609
4618
|
function T(e, t) {
|
|
4610
|
-
o.value = t?.normalize === !1 ? e :
|
|
4619
|
+
o.value = t?.normalize === !1 ? e : Bi(e), E();
|
|
4611
4620
|
}
|
|
4612
4621
|
function E() {
|
|
4613
4622
|
let e = d.value;
|
|
@@ -4636,11 +4645,11 @@ function ta(e) {
|
|
|
4636
4645
|
}
|
|
4637
4646
|
function N(e, t, n) {
|
|
4638
4647
|
let r = t ? k(t) : void 0;
|
|
4639
|
-
t && !r || T(
|
|
4648
|
+
t && !r || T(Ki(o.value, r, e, n));
|
|
4640
4649
|
}
|
|
4641
4650
|
function P(e, t, n) {
|
|
4642
4651
|
let r = k(e);
|
|
4643
|
-
r && T(
|
|
4652
|
+
r && T(Wi(o.value, r, t), n);
|
|
4644
4653
|
}
|
|
4645
4654
|
function F(e, t, n) {
|
|
4646
4655
|
let r = d.value.get(e);
|
|
@@ -4649,7 +4658,7 @@ function ta(e) {
|
|
|
4649
4658
|
...i,
|
|
4650
4659
|
...t
|
|
4651
4660
|
}, s = n?.normalize ?? (i.order !== a.order || i.hideInMenu !== a.hideInMenu || i.hideChildrenInMenu !== a.hideChildrenInMenu);
|
|
4652
|
-
T(
|
|
4661
|
+
T(Gi(o.value, r.path, a), { normalize: s });
|
|
4653
4662
|
}
|
|
4654
4663
|
function I(e) {
|
|
4655
4664
|
F(e, { hideInMenu: !1 }, { normalize: !0 });
|
|
@@ -4660,8 +4669,8 @@ function ta(e) {
|
|
|
4660
4669
|
function R(e) {
|
|
4661
4670
|
let t = d.value.get(e);
|
|
4662
4671
|
if (!t) return;
|
|
4663
|
-
let n = new Set(
|
|
4664
|
-
T(
|
|
4672
|
+
let n = new Set(Ji(t.route));
|
|
4673
|
+
T(qi(o.value, t.path), { normalize: !1 }), s.value = s.value.filter((e) => !n.has(e)), c.value = c.value.filter((e) => !n.has(e));
|
|
4665
4674
|
}
|
|
4666
4675
|
let z = w(a, (e) => T(e), { flush: "sync" }), B = w(() => S(e.selectedKeys), (e) => {
|
|
4667
4676
|
if (e !== void 0) {
|
|
@@ -4686,7 +4695,7 @@ function ta(e) {
|
|
|
4686
4695
|
z(), B(), ee(), V(), H();
|
|
4687
4696
|
});
|
|
4688
4697
|
function te(e) {
|
|
4689
|
-
return
|
|
4698
|
+
return $i(d.value, e);
|
|
4690
4699
|
}
|
|
4691
4700
|
return { menuState: {
|
|
4692
4701
|
menus: o,
|
|
@@ -4716,103 +4725,103 @@ function ta(e) {
|
|
|
4716
4725
|
function Q(e) {
|
|
4717
4726
|
return e.name;
|
|
4718
4727
|
}
|
|
4719
|
-
function
|
|
4728
|
+
function ra(e) {
|
|
4720
4729
|
return e === void 0 ? void 0 : Et(x(e));
|
|
4721
4730
|
}
|
|
4722
|
-
function
|
|
4731
|
+
function ia(e) {
|
|
4723
4732
|
return e ? { ...x(e) } : void 0;
|
|
4724
4733
|
}
|
|
4725
|
-
function
|
|
4734
|
+
function aa(e) {
|
|
4726
4735
|
if (!e) return;
|
|
4727
4736
|
let t = x(e);
|
|
4728
4737
|
return {
|
|
4729
4738
|
title: t.title,
|
|
4730
|
-
tabState:
|
|
4739
|
+
tabState: ia(t.tabState),
|
|
4731
4740
|
menuSelectKey: t.menuSelectKey
|
|
4732
4741
|
};
|
|
4733
4742
|
}
|
|
4734
|
-
function
|
|
4743
|
+
function oa(e, t) {
|
|
4735
4744
|
if (!e && !t) return;
|
|
4736
4745
|
let n = x(e ?? {}), r = x(t ?? {});
|
|
4737
4746
|
return {
|
|
4738
4747
|
title: r.title ?? n.title,
|
|
4739
4748
|
tabState: n.tabState || r.tabState ? {
|
|
4740
|
-
...
|
|
4741
|
-
...
|
|
4749
|
+
...ia(n.tabState),
|
|
4750
|
+
...ia(r.tabState)
|
|
4742
4751
|
} : void 0,
|
|
4743
4752
|
menuSelectKey: r.menuSelectKey ?? n.menuSelectKey
|
|
4744
4753
|
};
|
|
4745
4754
|
}
|
|
4746
|
-
function
|
|
4755
|
+
function sa(e) {
|
|
4747
4756
|
let t = x(e);
|
|
4748
4757
|
return {
|
|
4749
4758
|
name: t.name,
|
|
4750
4759
|
path: t.path,
|
|
4751
4760
|
fullPath: t.fullPath,
|
|
4752
|
-
query:
|
|
4753
|
-
params:
|
|
4761
|
+
query: ra(t.query),
|
|
4762
|
+
params: ra(t.params),
|
|
4754
4763
|
redirect: t.redirect,
|
|
4755
|
-
meta:
|
|
4764
|
+
meta: aa(t.meta)
|
|
4756
4765
|
};
|
|
4757
4766
|
}
|
|
4758
|
-
function
|
|
4767
|
+
function ca(e, t) {
|
|
4759
4768
|
let n = x(e), r = x(t);
|
|
4760
|
-
return
|
|
4769
|
+
return sa({
|
|
4761
4770
|
name: r.name ?? n.name,
|
|
4762
4771
|
path: r.path ?? n.path,
|
|
4763
4772
|
fullPath: r.fullPath ?? n.fullPath,
|
|
4764
4773
|
query: r.query === void 0 ? n.query : r.query,
|
|
4765
4774
|
params: r.params === void 0 ? n.params : r.params,
|
|
4766
4775
|
redirect: r.redirect ?? n.redirect,
|
|
4767
|
-
meta:
|
|
4776
|
+
meta: oa(n.meta, r.meta)
|
|
4768
4777
|
});
|
|
4769
4778
|
}
|
|
4770
|
-
function
|
|
4779
|
+
function la(e) {
|
|
4771
4780
|
let t = x(e), n = x(t.meta ?? {});
|
|
4772
4781
|
return {
|
|
4773
4782
|
name: t.name,
|
|
4774
4783
|
path: t.path,
|
|
4775
4784
|
fullPath: t.fullPath,
|
|
4776
|
-
query:
|
|
4777
|
-
params:
|
|
4785
|
+
query: ra(t.query),
|
|
4786
|
+
params: ra(t.params),
|
|
4778
4787
|
redirect: t.redirect,
|
|
4779
4788
|
meta: {
|
|
4780
4789
|
title: n.title,
|
|
4781
|
-
tabState:
|
|
4790
|
+
tabState: ia(n.tabState),
|
|
4782
4791
|
menuSelectKey: n.menuSelectKey
|
|
4783
4792
|
}
|
|
4784
4793
|
};
|
|
4785
4794
|
}
|
|
4786
|
-
function
|
|
4795
|
+
function ua(e) {
|
|
4787
4796
|
return {
|
|
4788
|
-
fixed: e.fixed.map(
|
|
4789
|
-
normal: e.normal.map(
|
|
4797
|
+
fixed: e.fixed.map(la),
|
|
4798
|
+
normal: e.normal.map(la)
|
|
4790
4799
|
};
|
|
4791
4800
|
}
|
|
4792
|
-
function
|
|
4801
|
+
function da(e) {
|
|
4793
4802
|
let { fixed: t } = e?.meta?.tabState ?? {};
|
|
4794
4803
|
return Ce(t) ? t : !1;
|
|
4795
4804
|
}
|
|
4796
|
-
function
|
|
4805
|
+
function fa(e, t) {
|
|
4797
4806
|
return t && e.value ? {
|
|
4798
|
-
fixed: e.value.fixed?.map(
|
|
4799
|
-
normal: e.value.normal?.map(
|
|
4807
|
+
fixed: e.value.fixed?.map(sa) ?? [],
|
|
4808
|
+
normal: e.value.normal?.map(sa) ?? []
|
|
4800
4809
|
} : {
|
|
4801
4810
|
fixed: [],
|
|
4802
4811
|
normal: []
|
|
4803
4812
|
};
|
|
4804
4813
|
}
|
|
4805
|
-
function
|
|
4806
|
-
let { config: t, flatMenus: n, siderWidth: i, isMobile: a, contentFullscreen: o, onTabsChange: s, onReloadPage: c, onContentFullscreenChange: l } = e, u =
|
|
4814
|
+
function pa(e) {
|
|
4815
|
+
let { config: t, flatMenus: n, siderWidth: i, isMobile: a, contentFullscreen: o, onTabsChange: s, onReloadPage: c, onContentFullscreenChange: l } = e, u = ve(), d = _e(), f = r(() => t.value.persistent !== !1), p = le("pro-layout-tabs", {
|
|
4807
4816
|
fixed: [],
|
|
4808
4817
|
normal: []
|
|
4809
|
-
}), m = v(
|
|
4818
|
+
}), m = v(fa(p, f.value)), h = y(n.value.length > 0), g = r(() => [...m.fixed, ...m.normal]), _ = r(() => d.name), b = r(() => {
|
|
4810
4819
|
if (o.value || a.value) return "100%";
|
|
4811
4820
|
let e = j(i.value);
|
|
4812
4821
|
return i.value ? `calc(100% - ${e})` : "100%";
|
|
4813
4822
|
});
|
|
4814
4823
|
function x(e) {
|
|
4815
|
-
return
|
|
4824
|
+
return da(e);
|
|
4816
4825
|
}
|
|
4817
4826
|
function S(e) {
|
|
4818
4827
|
return g.value.find((t) => Q(t) === e);
|
|
@@ -4826,12 +4835,12 @@ function fa(e) {
|
|
|
4826
4835
|
}
|
|
4827
4836
|
function E(e, t) {
|
|
4828
4837
|
let n = x(e) ? "fixed" : "normal", { type: r, addType: i, params: a } = t;
|
|
4829
|
-
r === "add" && i ? m[n][i](
|
|
4838
|
+
r === "add" && i ? m[n][i](sa(a)) : r === "merge" ? m[n] = m[n].map((t) => Q(t) === Q(e) ? ca(t, a) : t) : r === "remove" && (m[n] = m[n].filter((t) => Q(t) !== Q(e)));
|
|
4830
4839
|
}
|
|
4831
4840
|
function D(e) {
|
|
4832
4841
|
let { hidden: t } = e?.meta?.tabState ?? {};
|
|
4833
4842
|
if (!e.name || !e.meta || t === !0) return;
|
|
4834
|
-
let n = x(e), r = Q(e), i =
|
|
4843
|
+
let n = x(e), r = Q(e), i = sa(e), a = g.value.find((e) => Q(e) === r);
|
|
4835
4844
|
if (!a) {
|
|
4836
4845
|
m[n ? "fixed" : "normal"].push(i);
|
|
4837
4846
|
return;
|
|
@@ -4842,7 +4851,7 @@ function fa(e) {
|
|
|
4842
4851
|
}) : (E(a, {
|
|
4843
4852
|
type: "remove",
|
|
4844
4853
|
params: a
|
|
4845
|
-
}), m[n ? "fixed" : "normal"].push(
|
|
4854
|
+
}), m[n ? "fixed" : "normal"].push(ca(a, i)));
|
|
4846
4855
|
}
|
|
4847
4856
|
function O() {
|
|
4848
4857
|
let e = g.value.slice(-1)[0];
|
|
@@ -4873,8 +4882,8 @@ function fa(e) {
|
|
|
4873
4882
|
case "fixed":
|
|
4874
4883
|
if (i) {
|
|
4875
4884
|
let e = m.fixed.findIndex((e) => Q(e) === t);
|
|
4876
|
-
m.normal.unshift(
|
|
4877
|
-
} else m.fixed.push(
|
|
4885
|
+
m.normal.unshift(ca(n, { meta: { tabState: { fixed: !1 } } })), m.fixed = m.fixed.filter((t, n) => n !== e);
|
|
4886
|
+
} else m.fixed.push(ca(n, { meta: { tabState: { fixed: !0 } } })), m.normal = m.normal.filter((e, t) => t !== r);
|
|
4878
4887
|
break;
|
|
4879
4888
|
case "close":
|
|
4880
4889
|
k(t);
|
|
@@ -4912,7 +4921,7 @@ function fa(e) {
|
|
|
4912
4921
|
default: break;
|
|
4913
4922
|
}
|
|
4914
4923
|
}
|
|
4915
|
-
let N =
|
|
4924
|
+
let N = pe(() => {
|
|
4916
4925
|
c();
|
|
4917
4926
|
}, 500);
|
|
4918
4927
|
w(n, (e) => {
|
|
@@ -4939,7 +4948,7 @@ function fa(e) {
|
|
|
4939
4948
|
}, () => {
|
|
4940
4949
|
d?.name && D(d);
|
|
4941
4950
|
}, { immediate: !0 }), w(g, (e) => {
|
|
4942
|
-
f.value && h.value && (p.value =
|
|
4951
|
+
f.value && h.value && (p.value = ua(m)), s(e);
|
|
4943
4952
|
});
|
|
4944
4953
|
function P(e, t, n) {
|
|
4945
4954
|
let r = m[n], i = r.findIndex((t) => t.name === e), a = r.findIndex((e) => e.name === t);
|
|
@@ -4959,7 +4968,7 @@ function fa(e) {
|
|
|
4959
4968
|
checkIsFixed: x,
|
|
4960
4969
|
reorderWithinGroup: P,
|
|
4961
4970
|
tabsController: {
|
|
4962
|
-
getTabs: () => g.value.map((e) =>
|
|
4971
|
+
getTabs: () => g.value.map((e) => sa(e)),
|
|
4963
4972
|
getActive: () => _.value,
|
|
4964
4973
|
isActive: (e) => _.value === e,
|
|
4965
4974
|
isFixed: (e) => {
|
|
@@ -5005,7 +5014,7 @@ function fa(e) {
|
|
|
5005
5014
|
}
|
|
5006
5015
|
};
|
|
5007
5016
|
}
|
|
5008
|
-
var
|
|
5017
|
+
var ma = {
|
|
5009
5018
|
getTabs: () => [],
|
|
5010
5019
|
getActive: () => "",
|
|
5011
5020
|
isActive: () => !1,
|
|
@@ -5023,20 +5032,20 @@ var pa = {
|
|
|
5023
5032
|
toggleFullscreen: () => {},
|
|
5024
5033
|
update: () => {}
|
|
5025
5034
|
};
|
|
5026
|
-
function
|
|
5027
|
-
return { tabsRouter: Ve()?.tabsState?.tabsController ??
|
|
5035
|
+
function ha() {
|
|
5036
|
+
return { tabsRouter: Ve()?.tabsState?.tabsController ?? ma };
|
|
5028
5037
|
}
|
|
5029
5038
|
//#endregion
|
|
5030
5039
|
//#region src/components/Footer/index.tsx
|
|
5031
|
-
function
|
|
5040
|
+
function ga(e) {
|
|
5032
5041
|
return e === !1 ? !1 : typeof e == "function" ? e() : e;
|
|
5033
5042
|
}
|
|
5034
|
-
var
|
|
5043
|
+
var _a = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
5035
5044
|
let { prefixCls: r, proClasses: i, proStyles: o } = Y();
|
|
5036
5045
|
return () => {
|
|
5037
|
-
let s =
|
|
5046
|
+
let s = ga(t.footer);
|
|
5038
5047
|
if (s === !1) return null;
|
|
5039
|
-
let c =
|
|
5048
|
+
let c = ga(t.copyrightRender), l = c === !1 ? !1 : c ?? n.copyright?.() ?? t.copyright, u = t.links ?? [], d = s ?? n.footer?.();
|
|
5040
5049
|
return d || u.length > 0 || l ? a(V, {
|
|
5041
5050
|
class: J(`${r.value}-footer`, i.value?.footer),
|
|
5042
5051
|
style: o.value?.footer
|
|
@@ -5087,7 +5096,7 @@ var ga = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5087
5096
|
});
|
|
5088
5097
|
//#endregion
|
|
5089
5098
|
//#region src/components/CollapseButton/Arrow.tsx
|
|
5090
|
-
function
|
|
5099
|
+
function va() {
|
|
5091
5100
|
return a("svg", {
|
|
5092
5101
|
width: "1em",
|
|
5093
5102
|
height: "1em",
|
|
@@ -5098,7 +5107,7 @@ function _a() {
|
|
|
5098
5107
|
}
|
|
5099
5108
|
//#endregion
|
|
5100
5109
|
//#region src/components/CollapseButton/index.tsx
|
|
5101
|
-
var
|
|
5110
|
+
var ya = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
5102
5111
|
let { prefixCls: i, collapseConfig: o } = Y(), s = r(() => e.placement ?? o?.value?.placement ?? "sider"), c = r(() => J(`${i.value}-collapse-button`, `${i.value}-collapse-button-${s.value}`, e.collapsed && `${i.value}-collapse-button-${s.value}-collapsed`));
|
|
5103
5112
|
function l(e) {
|
|
5104
5113
|
t("click", e);
|
|
@@ -5112,7 +5121,7 @@ var va = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5112
5121
|
onKeydown: (e) => {
|
|
5113
5122
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), l(e));
|
|
5114
5123
|
}
|
|
5115
|
-
}, [n.icon?.({ collapsed: e.collapsed }) || s.value === "sider" ? a(
|
|
5124
|
+
}, [n.icon?.({ collapsed: e.collapsed }) || s.value === "sider" ? a(va, null, null) : a(K, { type: e.collapsed ? "MenuUnfoldOutlined" : "MenuFoldOutlined" }, null)]);
|
|
5116
5125
|
}, {
|
|
5117
5126
|
props: {
|
|
5118
5127
|
collapsed: {
|
|
@@ -5130,13 +5139,13 @@ var va = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5130
5139
|
});
|
|
5131
5140
|
//#endregion
|
|
5132
5141
|
//#region src/components/Logo/index.tsx
|
|
5133
|
-
function
|
|
5142
|
+
function ba(e) {
|
|
5134
5143
|
return e === !1 ? null : typeof e == "string" ? a("img", {
|
|
5135
5144
|
src: e,
|
|
5136
5145
|
alt: "logo"
|
|
5137
5146
|
}, null) : typeof e == "function" ? e() : e;
|
|
5138
5147
|
}
|
|
5139
|
-
var
|
|
5148
|
+
var xa = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
5140
5149
|
let { layout: i, isMobile: o, prefixCls: s, collapsed: c, logoConfig: l, proClasses: u, proStyles: d, collapseConfig: f } = Y(), p = r(() => f?.value?.width), m = r(() => l?.value ? l?.value.title : ""), h = r(() => l?.value.image), g = r(() => c.value && [
|
|
5141
5150
|
"side",
|
|
5142
5151
|
"mix",
|
|
@@ -5150,7 +5159,7 @@ var ba = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5150
5159
|
t("click");
|
|
5151
5160
|
}
|
|
5152
5161
|
return () => {
|
|
5153
|
-
let e = n.image ? n.image() :
|
|
5162
|
+
let e = n.image ? n.image() : ba(h.value), t = m.value && !g.value ? a("h1", null, [m.value]) : null;
|
|
5154
5163
|
return a("div", {
|
|
5155
5164
|
class: v.value,
|
|
5156
5165
|
style: d.value.logo,
|
|
@@ -5173,13 +5182,13 @@ var ba = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5173
5182
|
emits: ["click"],
|
|
5174
5183
|
name: "LayoutLogo",
|
|
5175
5184
|
inheritAttrs: !1
|
|
5176
|
-
}),
|
|
5185
|
+
}), Sa = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
5177
5186
|
let { header: o, siderWidth: s, layout: c, menuState: l, prefixCls: u, collapseConfig: d, collapsed: f, isMobile: p, logoConfig: m, logoTitle: h, selectedKeys: g, openKeys: _, proClasses: v, proStyles: b, breadcrumbRender: x, breadcrumbConfig: S } = Y(t), C = r(() => l?.headerMenus.value ?? []), T = r(() => l?.breadcrumbItems.value ?? []), E = r(() => l?.breadcrumbRoutes.value ?? []), D = r(() => ["top"].includes(c.value ?? "") || ["mix", "wide"].includes(c.value ?? "") && !s.value), O = r(() => {
|
|
5178
5187
|
let e = {};
|
|
5179
5188
|
return o.value?.fixed && s.value && !p.value && (e.width = `calc(100% - ${j(s.value)})`), e;
|
|
5180
5189
|
}), k = y(!1);
|
|
5181
5190
|
if (typeof window < "u") {
|
|
5182
|
-
let { y: e } =
|
|
5191
|
+
let { y: e } = he(), t = y(0);
|
|
5183
5192
|
w(e, (e) => {
|
|
5184
5193
|
o.value?.autoHide ? k.value = e > 100 && e > t.value : k.value = !1, t.value = e;
|
|
5185
5194
|
});
|
|
@@ -5231,8 +5240,8 @@ var ba = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5231
5240
|
D.value && m.value && (typeof n == "function" ? n?.({
|
|
5232
5241
|
collapsed: f.value,
|
|
5233
5242
|
title: h.value
|
|
5234
|
-
}) : a(
|
|
5235
|
-
d.value && d.value.placement === "header" && (r?.({ collapsed: f.value }) ?? a(
|
|
5243
|
+
}) : a(xa, { onClick: N }, i)),
|
|
5244
|
+
d.value && d.value.placement === "header" && (r?.({ collapsed: f.value }) ?? a(ya, {
|
|
5236
5245
|
collapsed: f.value,
|
|
5237
5246
|
onClick: M
|
|
5238
5247
|
}, { icon: s })),
|
|
@@ -5283,10 +5292,10 @@ var ba = /* @__PURE__ */ o((e, { emit: t, slots: n }) => {
|
|
|
5283
5292
|
});
|
|
5284
5293
|
//#endregion
|
|
5285
5294
|
//#region src/components/Sider/index.tsx
|
|
5286
|
-
function
|
|
5295
|
+
function Ca(e) {
|
|
5287
5296
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
5288
5297
|
}
|
|
5289
|
-
var
|
|
5298
|
+
var wa = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
5290
5299
|
let { sider: o, header: s, layout: c, menuState: l, prefixCls: u, cssVarCls: d, rootCls: f, collapseConfig: m, collapsed: g, isMobile: _, logoConfig: y, logoTitle: x, selectedKeys: S, openKeys: C, proClasses: w, proStyles: T, siderWidth: E, collapsedWidth: D } = Y(t), O = b(), k = v({
|
|
5291
5300
|
showTop: !1,
|
|
5292
5301
|
showBottom: !1
|
|
@@ -5299,7 +5308,7 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5299
5308
|
p(() => A());
|
|
5300
5309
|
});
|
|
5301
5310
|
let M = r(() => O.value?.wrapRef), N = r(() => M.value?.firstElementChild);
|
|
5302
|
-
|
|
5311
|
+
de(M, () => A()), de(N, () => A());
|
|
5303
5312
|
let F = r(() => l?.siderMenus.value ?? []), I = r(() => J(`${u.value}-sider`, w.value.sider, { [`${u.value}-sider-fixed`]: o.value?.fixed })), L = r(() => J(`${u.value}-sider-children`, w.value.siderChildren)), z = r(() => J(`${u.value}-sider-header`, w.value.siderHeader)), B = r(() => J(`${u.value}-sider-footer`, w.value.siderFooter));
|
|
5304
5313
|
function ee() {
|
|
5305
5314
|
n("update:collapsed", !g.value);
|
|
@@ -5335,7 +5344,7 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5335
5344
|
}, [typeof t == "function" ? t?.({
|
|
5336
5345
|
collapsed: g.value,
|
|
5337
5346
|
title: x.value
|
|
5338
|
-
}) : a(
|
|
5347
|
+
}) : a(xa, { onClick: V }, i)]),
|
|
5339
5348
|
i.menuHeader?.({
|
|
5340
5349
|
collapsed: g.value,
|
|
5341
5350
|
isMobile: _.value
|
|
@@ -5367,7 +5376,7 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5367
5376
|
collapsed: g.value,
|
|
5368
5377
|
isMobile: _.value
|
|
5369
5378
|
})]),
|
|
5370
|
-
m.value && m.value.placement === "sider" && (n?.({ collapsed: g.value }) ?? a(
|
|
5379
|
+
m.value && m.value.placement === "sider" && (n?.({ collapsed: g.value }) ?? a(ya, {
|
|
5371
5380
|
collapsed: g.value,
|
|
5372
5381
|
onClick: ee
|
|
5373
5382
|
}, { icon: r }))
|
|
@@ -5403,7 +5412,7 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5403
5412
|
},
|
|
5404
5413
|
width: E.value,
|
|
5405
5414
|
onClose: () => n("update:collapsed", !0)
|
|
5406
|
-
},
|
|
5415
|
+
}, Ca(e = W()) ? e : { default: () => [e] });
|
|
5407
5416
|
}
|
|
5408
5417
|
return a(e, null, [o.value?.fixed && a("div", { style: {
|
|
5409
5418
|
width: `${j(E.value)}`,
|
|
@@ -5422,7 +5431,7 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5422
5431
|
style: T.value.sider,
|
|
5423
5432
|
onCollapse: U,
|
|
5424
5433
|
onBreakpoint: re
|
|
5425
|
-
},
|
|
5434
|
+
}, Ca(t = W()) ? t : { default: () => [t] })]);
|
|
5426
5435
|
};
|
|
5427
5436
|
}, {
|
|
5428
5437
|
props: {
|
|
@@ -5459,47 +5468,47 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5459
5468
|
],
|
|
5460
5469
|
name: "LayoutSider",
|
|
5461
5470
|
inheritAttrs: !1
|
|
5462
|
-
}),
|
|
5471
|
+
}), Ta = [
|
|
5463
5472
|
{
|
|
5464
5473
|
key: "fixed",
|
|
5465
5474
|
label: "置顶",
|
|
5466
|
-
icon: (e) => s(
|
|
5475
|
+
icon: (e) => s(K, { type: e ? "PinOff" : "Pin" })
|
|
5467
5476
|
},
|
|
5468
5477
|
{
|
|
5469
5478
|
key: "close",
|
|
5470
5479
|
label: "关闭",
|
|
5471
|
-
icon: s(
|
|
5480
|
+
icon: s(K, { type: "CloseOutlined" })
|
|
5472
5481
|
},
|
|
5473
5482
|
{
|
|
5474
5483
|
key: "fullScreen",
|
|
5475
|
-
icon: (e) => s(
|
|
5484
|
+
icon: (e) => s(K, { type: e ? "FullscreenExitOutlined" : "FullscreenOutlined" })
|
|
5476
5485
|
},
|
|
5477
5486
|
{
|
|
5478
5487
|
key: "reloadPage",
|
|
5479
5488
|
label: "重新加载",
|
|
5480
|
-
icon: s(
|
|
5489
|
+
icon: s(K, { type: "ReloadOutlined" })
|
|
5481
5490
|
},
|
|
5482
5491
|
{
|
|
5483
5492
|
key: "newBlank",
|
|
5484
5493
|
label: "新窗口打开",
|
|
5485
|
-
icon: s(
|
|
5494
|
+
icon: s(K, { type: "ExportOutlined" })
|
|
5486
5495
|
},
|
|
5487
5496
|
{ key: "divider" },
|
|
5488
5497
|
{
|
|
5489
5498
|
key: "closeLeftTabs",
|
|
5490
5499
|
label: "关闭左侧",
|
|
5491
|
-
icon: s(
|
|
5500
|
+
icon: s(K, { type: "VerticalRightOutlined" })
|
|
5492
5501
|
},
|
|
5493
5502
|
{
|
|
5494
5503
|
key: "closeRightTabs",
|
|
5495
5504
|
label: "关闭右侧",
|
|
5496
|
-
icon: s(
|
|
5505
|
+
icon: s(K, { type: "VerticalLeftOutlined" })
|
|
5497
5506
|
},
|
|
5498
5507
|
{ key: "divider" },
|
|
5499
5508
|
{
|
|
5500
5509
|
key: "closeOthersTabs",
|
|
5501
5510
|
label: "关闭其他",
|
|
5502
|
-
icon: s(
|
|
5511
|
+
icon: s(K, {
|
|
5503
5512
|
type: "VerticalAlignMiddleOutlined",
|
|
5504
5513
|
rotate: 90
|
|
5505
5514
|
})
|
|
@@ -5507,28 +5516,28 @@ var Ca = /* @__PURE__ */ o((t, { emit: n, slots: i }) => {
|
|
|
5507
5516
|
{
|
|
5508
5517
|
key: "closeAllTabs",
|
|
5509
5518
|
label: "关闭全部",
|
|
5510
|
-
icon: s(
|
|
5519
|
+
icon: s(K, { type: "SwapOutlined" })
|
|
5511
5520
|
}
|
|
5512
5521
|
];
|
|
5513
|
-
function
|
|
5522
|
+
function Ea(e, t, n, r) {
|
|
5514
5523
|
let i = n.findIndex((e) => e.name === t);
|
|
5515
5524
|
switch (e) {
|
|
5516
5525
|
case "close": return r;
|
|
5517
|
-
case "closeOthersTabs": return n.filter((e, t) => t !== i && !
|
|
5518
|
-
case "closeLeftTabs": return n.filter((e, t) => t < i && !
|
|
5519
|
-
case "closeRightTabs": return n.filter((e, t) => t > i && !
|
|
5520
|
-
case "closeAllTabs": return n.filter((e) => !
|
|
5526
|
+
case "closeOthersTabs": return n.filter((e, t) => t !== i && !Oa(e)).length === 0;
|
|
5527
|
+
case "closeLeftTabs": return n.filter((e, t) => t < i && !Oa(e)).length === 0;
|
|
5528
|
+
case "closeRightTabs": return n.filter((e, t) => t > i && !Oa(e)).length === 0;
|
|
5529
|
+
case "closeAllTabs": return n.filter((e) => !Oa(e)).length === 0;
|
|
5521
5530
|
default: return !1;
|
|
5522
5531
|
}
|
|
5523
5532
|
}
|
|
5524
|
-
function
|
|
5525
|
-
return e === "fixed" ? t.isFixed ? "取消置顶" : "置顶" : e === "fullScreen" ? t.isFullscreen ? "还原" : "最大化" :
|
|
5533
|
+
function Da(e, t) {
|
|
5534
|
+
return e === "fixed" ? t.isFixed ? "取消置顶" : "置顶" : e === "fullScreen" ? t.isFullscreen ? "还原" : "最大化" : Ta.find((t) => t.key === e)?.label ?? "";
|
|
5526
5535
|
}
|
|
5527
|
-
function
|
|
5536
|
+
function Oa(e) {
|
|
5528
5537
|
return e?.meta?.tabState?.fixed === !0;
|
|
5529
5538
|
}
|
|
5530
|
-
var
|
|
5531
|
-
let { prefixCls: i, proClasses: o, tabsState: s, tabsHeight: c, setTabsHeight: l, contentFullscreen: u, header: d, isMobile: f } = Y(), p = y(""), m = y(), { height: h } =
|
|
5539
|
+
var ka = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
5540
|
+
let { prefixCls: i, proClasses: o, tabsState: s, tabsHeight: c, setTabsHeight: l, contentFullscreen: u, header: d, isMobile: f } = Y(), p = y(""), m = y(), { height: h } = se(m, void 0, { box: "border-box" });
|
|
5532
5541
|
w(h, (e) => {
|
|
5533
5542
|
e > 0 && l?.(e);
|
|
5534
5543
|
}, { immediate: !0 });
|
|
@@ -5545,7 +5554,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5545
5554
|
});
|
|
5546
5555
|
function C(e) {
|
|
5547
5556
|
let t = v.value(T(e));
|
|
5548
|
-
return
|
|
5557
|
+
return Ta.map((n) => {
|
|
5549
5558
|
if (n.key === "divider") return {
|
|
5550
5559
|
type: "divider",
|
|
5551
5560
|
key: "divider"
|
|
@@ -5554,11 +5563,11 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5554
5563
|
return {
|
|
5555
5564
|
key: r,
|
|
5556
5565
|
icon: typeof n.icon == "function" ? n.icon(r === "fixed" ? t : u.value) : n.icon,
|
|
5557
|
-
label:
|
|
5566
|
+
label: Da(r, {
|
|
5558
5567
|
isFixed: t,
|
|
5559
5568
|
isFullscreen: u.value
|
|
5560
5569
|
}),
|
|
5561
|
-
disabled:
|
|
5570
|
+
disabled: Ea(r, e, g.value, t)
|
|
5562
5571
|
};
|
|
5563
5572
|
});
|
|
5564
5573
|
}
|
|
@@ -5589,12 +5598,12 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5589
5598
|
}
|
|
5590
5599
|
}, { default: () => [l ?? a("div", { class: J(`${i.value}-tabs-title`) }, [
|
|
5591
5600
|
a("span", { class: `${i.value}-tabs-title-text` }, [r.meta?.title]),
|
|
5592
|
-
c && a(
|
|
5601
|
+
c && a(K, {
|
|
5593
5602
|
type: "Pin",
|
|
5594
5603
|
class: `${i.value}-tabs-title-pin`,
|
|
5595
5604
|
"data-drag-ignore": "true"
|
|
5596
5605
|
}, null),
|
|
5597
|
-
g.value.length > 1 && !c && a(
|
|
5606
|
+
g.value.length > 1 && !c && a(K, {
|
|
5598
5607
|
type: "CloseOutlined",
|
|
5599
5608
|
class: `${i.value}-tabs-title-close`,
|
|
5600
5609
|
"data-drag-ignore": "true",
|
|
@@ -5606,7 +5615,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5606
5615
|
}
|
|
5607
5616
|
function O() {
|
|
5608
5617
|
return g.value.length === 0 ? null : a("div", { class: J(`${i.value}-tabs-extra`) }, [
|
|
5609
|
-
a(
|
|
5618
|
+
a(K, {
|
|
5610
5619
|
type: "ReloadOutlined",
|
|
5611
5620
|
class: `${i.value}-tabs-extra-btn`,
|
|
5612
5621
|
onClick: () => {
|
|
@@ -5618,11 +5627,11 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5618
5627
|
onClick: ({ key: e }) => {
|
|
5619
5628
|
s?.handleContextMenuAction?.(e, _.value);
|
|
5620
5629
|
}
|
|
5621
|
-
} }, { default: () => [a(
|
|
5630
|
+
} }, { default: () => [a(K, {
|
|
5622
5631
|
type: "DownOutlined",
|
|
5623
5632
|
class: `${i.value}-tabs-extra-btn`
|
|
5624
5633
|
}, null)] }),
|
|
5625
|
-
a(
|
|
5634
|
+
a(K, {
|
|
5626
5635
|
type: u.value ? "FullscreenExitOutlined" : "FullscreenOutlined",
|
|
5627
5636
|
class: `${i.value}-tabs-extra-btn`,
|
|
5628
5637
|
onClick: () => {
|
|
@@ -5638,7 +5647,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5638
5647
|
ref: m,
|
|
5639
5648
|
class: J(`${i.value}-tabs-content`),
|
|
5640
5649
|
style: S.value
|
|
5641
|
-
}, [a(
|
|
5650
|
+
}, [a(Ii, {
|
|
5642
5651
|
items: E.value,
|
|
5643
5652
|
activeKey: _.value,
|
|
5644
5653
|
draggable: t.config?.draggable !== !1,
|
|
@@ -5671,7 +5680,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5671
5680
|
],
|
|
5672
5681
|
name: "LayoutTabs",
|
|
5673
5682
|
inheritAttrs: !1
|
|
5674
|
-
}),
|
|
5683
|
+
}), Aa = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
5675
5684
|
let { prefixCls: n, hasFooterToolbar: i, proClasses: o, proStyles: s } = Y(), c = r(() => J(`${n.value}-content`, o.value.content, { [`${n.value}-content-has-footer-toolbar`]: i.value }));
|
|
5676
5685
|
return () => a(ee, {
|
|
5677
5686
|
class: c.value,
|
|
@@ -5722,7 +5731,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5722
5731
|
},
|
|
5723
5732
|
logo: { title: "Antdv Next Pro" },
|
|
5724
5733
|
pageContainer: {}
|
|
5725
|
-
},
|
|
5734
|
+
}, ja = (e) => {
|
|
5726
5735
|
let t = `${e.componentCls}-breadcrumb`;
|
|
5727
5736
|
return { [t]: {
|
|
5728
5737
|
color: e.colorTextDescription,
|
|
@@ -5742,7 +5751,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5742
5751
|
},
|
|
5743
5752
|
[`${t}-link`]: {
|
|
5744
5753
|
color: e.colorTextDescription,
|
|
5745
|
-
padding: `0 ${
|
|
5754
|
+
padding: `0 ${q(e.paddingXXS)}`,
|
|
5746
5755
|
borderRadius: e.borderRadiusSM,
|
|
5747
5756
|
cursor: "pointer",
|
|
5748
5757
|
transition: `color ${e.motionDurationMid}`,
|
|
@@ -5767,11 +5776,11 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5767
5776
|
display: "inline-flex",
|
|
5768
5777
|
alignItems: "center",
|
|
5769
5778
|
fontSize: e.fontSize,
|
|
5770
|
-
minHeight:
|
|
5779
|
+
minHeight: q(e.fontHeight)
|
|
5771
5780
|
},
|
|
5772
5781
|
[`${t}-overlay-link`]: {
|
|
5773
5782
|
color: e.colorTextDescription,
|
|
5774
|
-
padding: `0 ${
|
|
5783
|
+
padding: `0 ${q(e.paddingXXS)}`,
|
|
5775
5784
|
borderRadius: e.borderRadiusSM,
|
|
5776
5785
|
cursor: "pointer",
|
|
5777
5786
|
transition: `color ${e.motionDurationMid}`,
|
|
@@ -5779,7 +5788,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5779
5788
|
alignItems: "center",
|
|
5780
5789
|
gap: e.marginXXS,
|
|
5781
5790
|
marginInline: e.calc(e.marginXXS).mul(-1).equal(),
|
|
5782
|
-
"
|
|
5791
|
+
">.anticon,>.pro-anticon": {
|
|
5783
5792
|
marginInlineStart: e.marginXXS,
|
|
5784
5793
|
fontSize: e.fontSizeIcon
|
|
5785
5794
|
},
|
|
@@ -5794,7 +5803,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5794
5803
|
},
|
|
5795
5804
|
"li:last-child": { cursor: "default" }
|
|
5796
5805
|
} };
|
|
5797
|
-
},
|
|
5806
|
+
}, Ma = (e) => {
|
|
5798
5807
|
let t = e.controlHeightSM;
|
|
5799
5808
|
return { [`${e.componentCls}-collapse-button`]: {
|
|
5800
5809
|
boxSizing: "border-box",
|
|
@@ -5847,7 +5856,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5847
5856
|
"&-collapsed": { "& > svg": { transform: "rotate(-90deg)" } }
|
|
5848
5857
|
}
|
|
5849
5858
|
} };
|
|
5850
|
-
},
|
|
5859
|
+
}, Na = (e) => {
|
|
5851
5860
|
let { componentCls: t, antCls: n } = e;
|
|
5852
5861
|
return {
|
|
5853
5862
|
[`${t} ${n}-layout-content${t}-content`]: {
|
|
@@ -5872,7 +5881,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5872
5881
|
"&-has-footer-toolbar": { [`${t}-content-inner`]: { paddingBottom: e.controlHeightLG } }
|
|
5873
5882
|
}
|
|
5874
5883
|
};
|
|
5875
|
-
},
|
|
5884
|
+
}, Pa = (e) => {
|
|
5876
5885
|
let { componentCls: t, antCls: n } = e;
|
|
5877
5886
|
return {
|
|
5878
5887
|
[`${t} ${n}-layout-footer${t}-footer`]: {
|
|
@@ -5901,12 +5910,12 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5901
5910
|
}
|
|
5902
5911
|
}
|
|
5903
5912
|
};
|
|
5904
|
-
},
|
|
5913
|
+
}, Fa = (e) => {
|
|
5905
5914
|
let { componentCls: t, antCls: n } = e, r = e.headerHeightLayoutHeader || e.controlHeightLG * 2;
|
|
5906
5915
|
return {
|
|
5907
5916
|
[`${t} ${n}-layout-header${t}-header`]: {
|
|
5908
|
-
height:
|
|
5909
|
-
lineHeight:
|
|
5917
|
+
height: q(r),
|
|
5918
|
+
lineHeight: q(r),
|
|
5910
5919
|
zIndex: 101,
|
|
5911
5920
|
width: "100%",
|
|
5912
5921
|
paddingBlock: 0,
|
|
@@ -5971,7 +5980,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
5971
5980
|
maxWidth: "100%"
|
|
5972
5981
|
} } }
|
|
5973
5982
|
};
|
|
5974
|
-
},
|
|
5983
|
+
}, Ia = (e) => ({
|
|
5975
5984
|
[`${e.componentCls}-sider-header ${e.componentCls}-logo`]: { borderBlockEnd: `1px solid ${e.siderColorMenuItemDivider}` },
|
|
5976
5985
|
[`${e.componentCls}-mix ${e.componentCls}-sider-header ${e.componentCls}-logo, ${e.componentCls}-wide ${e.componentCls}-sider-header ${e.componentCls}-logo`]: {
|
|
5977
5986
|
paddingBlock: 0,
|
|
@@ -6041,8 +6050,8 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6041
6050
|
width: "auto"
|
|
6042
6051
|
}
|
|
6043
6052
|
}
|
|
6044
|
-
}),
|
|
6045
|
-
let { componentCls: t, antCls: n, iconCls: r } = e, i =
|
|
6053
|
+
}), La = (e) => {
|
|
6054
|
+
let { componentCls: t, antCls: n, iconCls: r } = e, i = q(e.menuItemIconSize || e.fontSize);
|
|
6046
6055
|
return {
|
|
6047
6056
|
[`${t} ${n}-menu${n}-menu-root`]: {
|
|
6048
6057
|
background: "transparent",
|
|
@@ -6077,7 +6086,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6077
6086
|
}
|
|
6078
6087
|
}
|
|
6079
6088
|
};
|
|
6080
|
-
},
|
|
6089
|
+
}, Ra = (e) => {
|
|
6081
6090
|
let t = e.menuItemIconSize || e.fontSize;
|
|
6082
6091
|
return { [`${e.componentCls}-page-search`]: {
|
|
6083
6092
|
display: "flex",
|
|
@@ -6093,7 +6102,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6093
6102
|
borderRadius: e.borderRadiusLG * 2,
|
|
6094
6103
|
backgroundColor: e.headerColorBgRightActionsItemHover,
|
|
6095
6104
|
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
6096
|
-
">.anticon": {
|
|
6105
|
+
">.anticon,>.pro-anticon": {
|
|
6097
6106
|
fontSize: e.fontSize,
|
|
6098
6107
|
color: e.colorTextTertiary
|
|
6099
6108
|
},
|
|
@@ -6147,7 +6156,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6147
6156
|
display: "flex",
|
|
6148
6157
|
alignItems: "center",
|
|
6149
6158
|
gap: e.sizeStep,
|
|
6150
|
-
">.anticon": { fontSize: `${t}px` }
|
|
6159
|
+
">.anticon,>.pro-anticon": { fontSize: `${t}px` }
|
|
6151
6160
|
},
|
|
6152
6161
|
"&.active": {
|
|
6153
6162
|
backgroundColor: e.colorPrimary,
|
|
@@ -6163,7 +6172,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6163
6172
|
color: e.colorTextQuaternary
|
|
6164
6173
|
}
|
|
6165
6174
|
} };
|
|
6166
|
-
},
|
|
6175
|
+
}, za = (e) => {
|
|
6167
6176
|
let { componentCls: t, antCls: n } = e;
|
|
6168
6177
|
return { [t]: {
|
|
6169
6178
|
[`${t}-sider`]: {
|
|
@@ -6251,7 +6260,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6251
6260
|
borderRadius: e.pageContainerBorderRadius
|
|
6252
6261
|
} }
|
|
6253
6262
|
} };
|
|
6254
|
-
},
|
|
6263
|
+
}, Ba = (e) => {
|
|
6255
6264
|
let { componentCls: t, calc: n } = e, r = e.controlHeightSM, i = e.controlHeightXS, a = `${t}-tabs`;
|
|
6256
6265
|
return { [a]: {
|
|
6257
6266
|
[`${a}-content`]: {
|
|
@@ -6280,8 +6289,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6280
6289
|
justifyContent: "center",
|
|
6281
6290
|
width: 12,
|
|
6282
6291
|
height: 12,
|
|
6283
|
-
fontSize: 10
|
|
6284
|
-
color: e.colorPrimary
|
|
6292
|
+
fontSize: 10
|
|
6285
6293
|
},
|
|
6286
6294
|
"&-close": {
|
|
6287
6295
|
display: "inline-flex",
|
|
@@ -6335,7 +6343,7 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6335
6343
|
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`
|
|
6336
6344
|
} }
|
|
6337
6345
|
} };
|
|
6338
|
-
},
|
|
6346
|
+
}, Va = (e) => ({ [e.componentCls]: {
|
|
6339
6347
|
display: "flex",
|
|
6340
6348
|
flexDirection: "column",
|
|
6341
6349
|
minHeight: "100vh",
|
|
@@ -6362,22 +6370,22 @@ var Oa = /* @__PURE__ */ o((t, { slots: n }) => {
|
|
|
6362
6370
|
backgroundColor: "transparent"
|
|
6363
6371
|
},
|
|
6364
6372
|
"&-has-sider": { flexDirection: "row" }
|
|
6365
|
-
} }),
|
|
6366
|
-
|
|
6373
|
+
} }), Ha = k("ProLayout", (e) => [
|
|
6374
|
+
Va(e),
|
|
6375
|
+
Ia(e),
|
|
6376
|
+
Ma(e),
|
|
6367
6377
|
Fa(e),
|
|
6378
|
+
Ra(e),
|
|
6368
6379
|
ja(e),
|
|
6369
|
-
|
|
6380
|
+
za(e),
|
|
6370
6381
|
La(e),
|
|
6371
|
-
Aa(e),
|
|
6372
|
-
Ra(e),
|
|
6373
|
-
Ia(e),
|
|
6374
|
-
Ma(e),
|
|
6375
6382
|
Na(e),
|
|
6376
|
-
|
|
6383
|
+
Pa(e),
|
|
6384
|
+
Ba(e)
|
|
6377
6385
|
]);
|
|
6378
6386
|
//#endregion
|
|
6379
6387
|
//#region src/utils/config.ts
|
|
6380
|
-
function
|
|
6388
|
+
function Ua(e, t) {
|
|
6381
6389
|
return e === !1 ? null : {
|
|
6382
6390
|
...t,
|
|
6383
6391
|
...e ?? {}
|
|
@@ -6385,8 +6393,8 @@ function Ha(e, t) {
|
|
|
6385
6393
|
}
|
|
6386
6394
|
//#endregion
|
|
6387
6395
|
//#region src/ProLayout.tsx
|
|
6388
|
-
var
|
|
6389
|
-
let n = Ve(), { proLayoutToken: r } = N(), { prefixCls: i } = W("pro-layout"), o =
|
|
6396
|
+
var Wa = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
6397
|
+
let n = Ve(), { proLayoutToken: r } = N(), { prefixCls: i } = W("pro-layout"), o = G(i), [s, c] = Ha(i, o);
|
|
6390
6398
|
return Be({
|
|
6391
6399
|
...n,
|
|
6392
6400
|
hashId: s,
|
|
@@ -6420,30 +6428,30 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6420
6428
|
}
|
|
6421
6429
|
},
|
|
6422
6430
|
name: "InnerLayout"
|
|
6423
|
-
}),
|
|
6424
|
-
let o =
|
|
6431
|
+
}), Ga = /* @__PURE__ */ o((e, { emit: t, expose: n, slots: i }) => {
|
|
6432
|
+
let o = ve(), s = be(), c = r(() => {
|
|
6425
6433
|
let t = e.token || {};
|
|
6426
6434
|
return t.headerHeightLayoutHeader ||= $.header.height, {
|
|
6427
6435
|
...t,
|
|
6428
6436
|
layoutKey: `${f.value ? "dark" : "light"}:${e.layout}`
|
|
6429
6437
|
};
|
|
6430
|
-
}), l = r(() => e.layout ?? "side"), u =
|
|
6438
|
+
}), l = r(() => e.layout ?? "side"), u = ue("(max-width: 768px)"), d = me(e, "collapsed", t, {
|
|
6431
6439
|
passive: !0,
|
|
6432
6440
|
defaultValue: !1
|
|
6433
|
-
}), f =
|
|
6441
|
+
}), f = oe(), p = me(e, "theme", t, {
|
|
6434
6442
|
passive: !0,
|
|
6435
6443
|
defaultValue: s?.theme?.value ?? "system"
|
|
6436
|
-
}), { menuState: m } =
|
|
6444
|
+
}), { menuState: m } = na({
|
|
6437
6445
|
menus: () => e.menus,
|
|
6438
6446
|
selectedKeys: () => e.selectedKeys,
|
|
6439
6447
|
openKeys: () => e.openKeys,
|
|
6440
6448
|
config: () => e.menu ?? {},
|
|
6441
6449
|
layout: () => l.value,
|
|
6442
6450
|
isMobile: () => u.value
|
|
6443
|
-
}), h =
|
|
6451
|
+
}), h = me(e, "selectedKeys", t, {
|
|
6444
6452
|
passive: !0,
|
|
6445
6453
|
defaultValue: []
|
|
6446
|
-
}), g =
|
|
6454
|
+
}), g = me(e, "openKeys", t, {
|
|
6447
6455
|
passive: !0,
|
|
6448
6456
|
defaultValue: []
|
|
6449
6457
|
}), _ = y(!1), v = y(!0), b = y(!1), x = y(null), S = y(100);
|
|
@@ -6455,17 +6463,17 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6455
6463
|
}
|
|
6456
6464
|
t.path && o.currentRoute.value.fullPath !== t.path && o.push(t.path);
|
|
6457
6465
|
}
|
|
6458
|
-
let w = r(() =>
|
|
6466
|
+
let w = r(() => Ua(e.logo, $.logo)), T = r(() => Ua(e.collapse, $.collapse)), E = r(() => Ua(e.footerConfig, $.footerConfig)), O = r(() => Ua(e.breadcrumb, $.breadcrumb)), k = r(() => ({
|
|
6459
6467
|
...$.pageContainer,
|
|
6460
6468
|
...e.pageContainer || {}
|
|
6461
|
-
})), A = r(() =>
|
|
6469
|
+
})), A = r(() => Ua(e.tabsConfig, $.tabsConfig)), j = r(() => A.value ?? {}), M = r(() => T.value?.width ?? $.collapse.width), N = r(() => {
|
|
6462
6470
|
let t = e.sider?.width ?? $.sider.width;
|
|
6463
6471
|
return !t || _.value || ![
|
|
6464
6472
|
"side",
|
|
6465
6473
|
"mix",
|
|
6466
6474
|
"wide"
|
|
6467
6475
|
].includes(l.value ?? "") || m.siderMenus.value.length === 0 ? 0 : d.value ? M.value : t;
|
|
6468
|
-
}), P =
|
|
6476
|
+
}), P = pa({
|
|
6469
6477
|
config: j,
|
|
6470
6478
|
flatMenus: m.flatMenus,
|
|
6471
6479
|
siderWidth: N,
|
|
@@ -6564,12 +6572,12 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6564
6572
|
}, { default: () => [a(ye, {
|
|
6565
6573
|
theme: p.value,
|
|
6566
6574
|
onChange: (e) => p.value = e
|
|
6567
|
-
}, { default: () => [a(
|
|
6575
|
+
}, { default: () => [a(Wa, {
|
|
6568
6576
|
layout: l.value,
|
|
6569
6577
|
showSider: V.value,
|
|
6570
6578
|
proClasses: e.proClasses,
|
|
6571
6579
|
proStyles: e.proStyles
|
|
6572
|
-
}, { default: () => [V.value && N.value && a(
|
|
6580
|
+
}, { default: () => [V.value && N.value && a(wa, {
|
|
6573
6581
|
onSelect: I,
|
|
6574
6582
|
onOpenChange: R,
|
|
6575
6583
|
onLogoClick: B,
|
|
@@ -6584,7 +6592,7 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6584
6592
|
class: `${te.value}-container`,
|
|
6585
6593
|
"data-testid": "pro-layout-container"
|
|
6586
6594
|
}, [
|
|
6587
|
-
ee.value && a(
|
|
6595
|
+
ee.value && a(Sa, {
|
|
6588
6596
|
onLogoClick: B,
|
|
6589
6597
|
"onUpdate:collapsed": z,
|
|
6590
6598
|
onSelect: I
|
|
@@ -6595,18 +6603,18 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6595
6603
|
breadcrumb: i.breadcrumb,
|
|
6596
6604
|
collapseIcon: i.collapseIcon
|
|
6597
6605
|
}),
|
|
6598
|
-
A.value && a(
|
|
6606
|
+
A.value && a(ka, {
|
|
6599
6607
|
config: A.value,
|
|
6600
6608
|
onReloadPage: () => t("reloadPage"),
|
|
6601
6609
|
onContentFullscreenChange: (e) => {
|
|
6602
6610
|
_.value = e, t("contentFullscreenChange", e);
|
|
6603
6611
|
}
|
|
6604
6612
|
}, { tabBarItem: n.tabBarItem }),
|
|
6605
|
-
a(
|
|
6613
|
+
a(Aa, { loading: e.loading }, {
|
|
6606
6614
|
default: () => [i.default?.()],
|
|
6607
6615
|
...n
|
|
6608
6616
|
}),
|
|
6609
|
-
H.value && a(
|
|
6617
|
+
H.value && a(_a, {
|
|
6610
6618
|
links: E.value.links,
|
|
6611
6619
|
copyright: E.value.copyright
|
|
6612
6620
|
}, {
|
|
@@ -6812,4 +6820,4 @@ var Ua = /* @__PURE__ */ o((e, { slots: t }) => {
|
|
|
6812
6820
|
inheritAttrs: !1
|
|
6813
6821
|
});
|
|
6814
6822
|
//#endregion
|
|
6815
|
-
export { Ke as APP_PAGE_SLOT_KEYS, Ge as FOOTER_TOOLBAR_SLOT_KEYS, Ye as GFooterToolbar,
|
|
6823
|
+
export { Ke as APP_PAGE_SLOT_KEYS, Ge as FOOTER_TOOLBAR_SLOT_KEYS, Ye as GFooterToolbar, Ii as GInnerTabs, xi as GPageTransition, ze as GProAppPage, Ga as GProLayout, Sn as GProPageContainer, Ue as LAYOUT_SLOT_KEYS, We as PAGE_CONTAINER_SLOT_KEYS, He as PRO_MENU_SLOT_KEYS, ln as ProMenu, Zi as buildBreadcrumbRoutes, Vi as buildMenuLookup, Ri as cleanMenus, Ji as collectMenuNames, Xi as getLastPath, Ki as insertMenuAtPath, Bi as normalizeMenus, ta as partitionFixedMenus, qi as removeMenuAtPath, Yi as resolveMatchedChain, $i as resolveRouteTarget, Li as routesToMenus, ea as selectMenuBranch, zi as sortMenusByOrder, Qi as toBreadcrumbItems, Wi as updateMenuAtPath, Gi as updateMenuMetaAtPath, Pe as useAppPageContext, Ve as useInjectLayoutContext, na as useMenu, ha as useTabs };
|