@gx-design-vue/pro-layout 0.1.0-beta.183 → 0.1.0-beta.185
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 +91 -90
- package/dist/pro-layout.umd.cjs +6 -6
- package/dist/types/Breadcrumb.d.ts +2 -1
- package/package.json +1 -1
package/dist/pro-layout.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.1.0-beta.
|
|
3
|
+
* Version: 0.1.0-beta.184
|
|
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-16
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as E, computed as v, watch as k, createVNode as o, mergeProps as ee, isVNode as
|
|
12
|
+
import { defineComponent as E, computed as v, watch as k, createVNode as o, mergeProps as ee, isVNode as ge, cloneVNode as an, resolveComponent as on, ref as _, Fragment as Y, toRefs as ze, unref as Ne, reactive as Se, toRaw as ln, inject as rn, onMounted as Ct, onUnmounted as sn, Teleport as un, Transition as cn, isRef as it } from "vue";
|
|
13
13
|
import { createFromIconfontCN as Ye, MenuUnfoldOutlined as dn, MenuFoldOutlined as mn, GithubOutlined as fn, HomeOutlined as pn, CloseOutlined as He, FullscreenExitOutlined as xt, FullscreenOutlined as It, ReloadOutlined as St, ExportOutlined as gn, VerticalRightOutlined as hn, VerticalLeftOutlined as yn, VerticalAlignMiddleOutlined as bn, SwapOutlined as vn, DownOutlined as Cn } from "@ant-design/icons-vue";
|
|
14
|
-
import { useState as
|
|
15
|
-
import { unit as K, useProConfigContext as Be, useProStyle as ae, Keyframe as f, useStyle as
|
|
16
|
-
import { isString as We, getPrefixCls as te, classNames as O, isUrl as je, isImg as $t, getLevelData as Rt, convertValueBoolean as wt, isArray as Mn, getSlotVNode as oe, arrayRepeat as On, isBoolean as le, merge as
|
|
14
|
+
import { useState as $e, useMemo as Re, useMediaQuery as xn, useSlotsProps as In, onMountedOrActivated as Sn } from "@gx-design-vue/pro-hooks";
|
|
15
|
+
import { unit as K, useProConfigContext as Be, useProStyle as ae, Keyframe as f, useStyle as he, mergeToken as _e, GProConfigProvider as $n, setAlpha as Rn, getAlphaColor as wn } from "@gx-design-vue/pro-provider";
|
|
16
|
+
import { isString as We, getPrefixCls as te, classNames as O, isUrl as je, isImg as $t, getLevelData as Rt, convertValueBoolean as wt, isArray as Mn, getSlotVNode as oe, arrayRepeat as On, isBoolean as le, merge as xe, isNumber as rt, deepMerge as Ve, getRandomNumber as st, getSlot as we, getSlotsProps as de, isFunction as Pn, isBrowser as Bn } from "@gx-design-vue/pro-utils";
|
|
17
17
|
import { useStyleTag as Mt, useMouse as Tn, watchThrottled as Fn, useElementBounding as Ln, useLocalStorage as Nn, useThrottleFn as Hn, useDark as Ot } from "@vueuse/core";
|
|
18
|
-
import { Menu as fe, Layout as
|
|
18
|
+
import { Menu as fe, Layout as Me, ConfigProvider as qe, Spin as Pt, Drawer as Dn, LayoutFooter as zn, Breadcrumb as Wn, Tabs as Bt, Dropdown as ut, Card as jn } from "ant-design-vue";
|
|
19
19
|
import { useRouter as Te, RouterLink as ct, useRoute as kn } from "vue-router";
|
|
20
20
|
import { useContext as Ze, useThemeContext as Tt, ThemeContext as Kn } from "@gx-design-vue/context";
|
|
21
|
-
import { pick as pe, cloneDeep as
|
|
21
|
+
import { pick as pe, cloneDeep as Oe, omit as Pe } from "lodash-es";
|
|
22
22
|
import { useProAppContext as Ft, proAppProps as An, proAppSlots as Un, GProApp as En } from "@gx-design-vue/pro-app";
|
|
23
23
|
import { GIcon as Qe } from "@gx-design-vue/icon";
|
|
24
24
|
import { GPorWaterMark as Xn } from "@gx-design-vue/pro-watermark";
|
|
25
25
|
import { GScrollbars as Vn } from "@gx-design-vue/scrollbar";
|
|
26
|
-
function
|
|
26
|
+
function ye(e) {
|
|
27
27
|
const t = e.layout?.key?.split(":") || [];
|
|
28
28
|
return {
|
|
29
29
|
theme: t[0],
|
|
@@ -488,7 +488,7 @@ html[data-theme="dark"]::view-transition-new(root) {
|
|
|
488
488
|
const C = on(b);
|
|
489
489
|
return typeof C == "function" && o(C, null, null) || c;
|
|
490
490
|
};
|
|
491
|
-
return typeof t == "string" ? t !== "" ? g(t) : c :
|
|
491
|
+
return typeof t == "string" ? t !== "" ? g(t) : c : ge(t) ? h() : c;
|
|
492
492
|
};
|
|
493
493
|
let zt = Ye({
|
|
494
494
|
scriptUrl: U.iconfontUrl
|
|
@@ -666,7 +666,7 @@ const Wt = /* @__PURE__ */ E({
|
|
|
666
666
|
}), {
|
|
667
667
|
wrapSSR: c,
|
|
668
668
|
hashId: u
|
|
669
|
-
} = ae("ProBaseMenu", [Jn], r), [d, h] =
|
|
669
|
+
} = ae("ProBaseMenu", [Jn], r), [d, h] = $e(e.openKeys || []), [g, b] = $e(e.selectedKeys || []), C = Re(() => new ea({
|
|
670
670
|
...e,
|
|
671
671
|
layout: l?.settings?.value?.layout,
|
|
672
672
|
isMobile: l?.isMobile?.value,
|
|
@@ -741,7 +741,7 @@ const Wt = /* @__PURE__ */ E({
|
|
|
741
741
|
breadcrumb: t,
|
|
742
742
|
parentRoute: l,
|
|
743
743
|
menuMap: a
|
|
744
|
-
})), a.has(l.name) || a.set(l.name,
|
|
744
|
+
})), a.has(l.name) || a.set(l.name, Pe(l, "children")), t[`${l.path}`] = l, Pe(l, "component"))).sort((l, i) => {
|
|
745
745
|
const r = l.meta?.order || 0, c = i.meta?.order || 0;
|
|
746
746
|
return r - c > 0 ? 1 : -1;
|
|
747
747
|
});
|
|
@@ -829,7 +829,7 @@ function Ut({ menuData: e, flatMenus: t, menuMap: n }, { path: a, name: l }) {
|
|
|
829
829
|
if (d = h ? i?.meta?.menuSelectKey && C || b : d, d) {
|
|
830
830
|
const I = [], s = d.split("-");
|
|
831
831
|
for (let S = 0; S < s.length; S += 1)
|
|
832
|
-
I.push(
|
|
832
|
+
I.push(Oe(s).splice(0, S + 1).join("-"));
|
|
833
833
|
const x = r === d || c ? [] : t.filter((S) => r === S.key);
|
|
834
834
|
return t.filter((S) => I.some((R) => R === S?.key || "")).concat(x);
|
|
835
835
|
}
|
|
@@ -914,7 +914,7 @@ const Ke = {
|
|
|
914
914
|
}
|
|
915
915
|
};
|
|
916
916
|
function sa(e, t) {
|
|
917
|
-
const { x: n, y: a } = Tn(), [l, i] =
|
|
917
|
+
const { x: n, y: a } = Tn(), [l, i] = $e(!1);
|
|
918
918
|
if (!t?.disabled) {
|
|
919
919
|
let c;
|
|
920
920
|
k(() => e.value, (u) => {
|
|
@@ -1124,7 +1124,7 @@ const De = (e) => ({
|
|
|
1124
1124
|
minHeight: "100vh"
|
|
1125
1125
|
}
|
|
1126
1126
|
}), ya = (e) => {
|
|
1127
|
-
const { layout: t } =
|
|
1127
|
+
const { layout: t } = ye(e), n = e.layout?.pageContainer;
|
|
1128
1128
|
return {
|
|
1129
1129
|
[`${e.antCls}-layout`]: {
|
|
1130
1130
|
background: "transparent !important"
|
|
@@ -1178,7 +1178,7 @@ const De = (e) => ({
|
|
|
1178
1178
|
paddingInline: 8,
|
|
1179
1179
|
marginInline: 0
|
|
1180
1180
|
}), ba = (e) => {
|
|
1181
|
-
const { layout: t } =
|
|
1181
|
+
const { layout: t } = ye(e), n = e.layout?.pageContainer;
|
|
1182
1182
|
return {
|
|
1183
1183
|
[`${e.proComponentsCls}-basic-layout`]: {
|
|
1184
1184
|
[`${e.antCls}-layout-sider${e.componentCls}`]: {
|
|
@@ -1316,7 +1316,7 @@ const De = (e) => ({
|
|
|
1316
1316
|
}
|
|
1317
1317
|
};
|
|
1318
1318
|
}, Gt = (e) => {
|
|
1319
|
-
const { layout: t } =
|
|
1319
|
+
const { layout: t } = ye(e);
|
|
1320
1320
|
return {
|
|
1321
1321
|
[`${e.componentCls}-logo`]: {
|
|
1322
1322
|
position: "relative",
|
|
@@ -1378,11 +1378,11 @@ const De = (e) => ({
|
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
1380
|
function gt(e) {
|
|
1381
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1381
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
1382
1382
|
}
|
|
1383
1383
|
const {
|
|
1384
1384
|
Sider: va
|
|
1385
|
-
} =
|
|
1385
|
+
} = Me, ht = /* @__PURE__ */ E({
|
|
1386
1386
|
props: et,
|
|
1387
1387
|
inheritAttrs: !1,
|
|
1388
1388
|
setup(e) {
|
|
@@ -1418,11 +1418,11 @@ const {
|
|
|
1418
1418
|
}), {
|
|
1419
1419
|
wrapSSR: G,
|
|
1420
1420
|
hashId: N
|
|
1421
|
-
} = ae("ProLayoutSiderMenu", [ba, Gt], S), Z = v(() => u.value.layout === "top" ? [] : h.value.menuData), A = v(() => i.value?.width ? p.value ? i.value?.width : r.value.siderWidth : a.value ? 0 : r.value.siderWidth), y = v(() => O(a.value && `${S}-collapsed`, z.value && `${S}-inner-collapsed`, [N.value, S, b?.value?.sider, n.value ? "shadow" : null, `${S}-${h.value.baseTheme}`, V.value ? `${S}-fixed` : null])), w =
|
|
1421
|
+
} = ae("ProLayoutSiderMenu", [ba, Gt], S), Z = v(() => u.value.layout === "top" ? [] : h.value.menuData), A = v(() => i.value?.width ? p.value ? i.value?.width : r.value.siderWidth : a.value ? 0 : r.value.siderWidth), y = v(() => O(a.value && `${S}-collapsed`, z.value && `${S}-inner-collapsed`, [N.value, S, b?.value?.sider, n.value ? "shadow" : null, `${S}-${h.value.baseTheme}`, V.value ? `${S}-fixed` : null])), w = Re(() => u.value.layout === "simple" || !e.appsLogoComponents ? null : typeof e.appsLogoComponents == "function" ? e.appsLogoComponents?.() : e.appsLogoComponents, [() => e.appsLogoComponents]);
|
|
1422
1422
|
function ne() {
|
|
1423
1423
|
a.value = !a.value;
|
|
1424
1424
|
}
|
|
1425
|
-
const
|
|
1425
|
+
const be = Re(() => {
|
|
1426
1426
|
if (i.value?.collapsedButtonRender === !1) return null;
|
|
1427
1427
|
const Q = i.value?.collapsedIconRender, J = i.value?.collapsedButtonRender, re = o(ma, {
|
|
1428
1428
|
iconRender: Q,
|
|
@@ -1454,7 +1454,7 @@ const {
|
|
|
1454
1454
|
baseClassName: S
|
|
1455
1455
|
}, pe(e, Object.keys(Ke))), {
|
|
1456
1456
|
default: () => [w.value]
|
|
1457
|
-
}), re = e.menuHeaderRender && e.menuHeaderRender?.(e), se = e.menuLinksRender, Le = e.siderActionsRender,
|
|
1457
|
+
}), re = e.menuHeaderRender && e.menuHeaderRender?.(e), se = e.menuLinksRender, Le = e.siderActionsRender, ve = o(Wt, {
|
|
1458
1458
|
key: "sider-base-menu",
|
|
1459
1459
|
class: `${S}-menu ${N.value}`,
|
|
1460
1460
|
styles: g.value,
|
|
@@ -1549,8 +1549,8 @@ const {
|
|
|
1549
1549
|
class: O(`${S}-menu-container`)
|
|
1550
1550
|
}, [e.menuContentRender && e.menuContentRender?.({
|
|
1551
1551
|
props: e,
|
|
1552
|
-
defaultDom:
|
|
1553
|
-
}) ||
|
|
1552
|
+
defaultDom: ve
|
|
1553
|
+
}) || ve])]), u.value.layout !== "wide" && o(Y, null, [se && Mn(se) && se.length > 0 && o("div", {
|
|
1554
1554
|
class: `${S}-links ${N.value}`
|
|
1555
1555
|
}, [o(fe, {
|
|
1556
1556
|
theme: F.value,
|
|
@@ -1577,7 +1577,7 @@ const {
|
|
|
1577
1577
|
iconRender: i.value?.collapsedIconRender
|
|
1578
1578
|
}))])])])]), e.menuFooterRender && o("div", {
|
|
1579
1579
|
class: `${S}-footer ${N.value}`
|
|
1580
|
-
}, [e.menuFooterRender?.(e)]), C.value || u.value.layout === "wide" || n.value ? null : i.value?.position === "fixed" &&
|
|
1580
|
+
}, [e.menuFooterRender?.(e)]), C.value || u.value.layout === "wide" || n.value ? null : i.value?.position === "fixed" && be.value]
|
|
1581
1581
|
})]
|
|
1582
1582
|
}));
|
|
1583
1583
|
};
|
|
@@ -1595,7 +1595,7 @@ const {
|
|
|
1595
1595
|
collapsed: t
|
|
1596
1596
|
} = q();
|
|
1597
1597
|
return () => {
|
|
1598
|
-
const n =
|
|
1598
|
+
const n = Pe(e, ["siderWidth", "isMobile"]);
|
|
1599
1599
|
return o(Y, null, [e.isMobile ? o(Dn, {
|
|
1600
1600
|
maskClosable: !0,
|
|
1601
1601
|
open: !t.value,
|
|
@@ -1806,7 +1806,7 @@ const {
|
|
|
1806
1806
|
wrapSSR: l,
|
|
1807
1807
|
hashId: i
|
|
1808
1808
|
} = ae("ProBreadCrumb", [Ra], a), r = v(() => {
|
|
1809
|
-
const c = t?.breadcrumb?.value || {}, u = c.showHome ?? !0, d =
|
|
1809
|
+
const c = t?.breadcrumb?.value || {}, u = c.showHome ?? !0, d = Oe(c.routes || []);
|
|
1810
1810
|
d.length && u && d.unshift({
|
|
1811
1811
|
path: "/",
|
|
1812
1812
|
name: "首页",
|
|
@@ -1881,7 +1881,7 @@ const {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}, wa = (e) => {
|
|
1884
|
-
const { layout: t, theme: n } =
|
|
1884
|
+
const { layout: t, theme: n } = ye(e), a = e.lineWidth, l = e?.layout?.header;
|
|
1885
1885
|
return {
|
|
1886
1886
|
[`${e.proComponentsCls}-header`]: {
|
|
1887
1887
|
"&-light": {
|
|
@@ -2139,7 +2139,7 @@ const {
|
|
|
2139
2139
|
baseClassName: x
|
|
2140
2140
|
}, e, {
|
|
2141
2141
|
title: d.value.title
|
|
2142
|
-
}), null)]), I.value?.position === "header" && o(_t, {
|
|
2142
|
+
}), null)]), I.value?.position === "header" && I.value?.visible && o(_t, {
|
|
2143
2143
|
breadcrumb: s.value
|
|
2144
2144
|
}, null)]), V()])]));
|
|
2145
2145
|
};
|
|
@@ -2190,11 +2190,11 @@ const {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
});
|
|
2192
2192
|
function Ta(e) {
|
|
2193
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2193
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
2194
2194
|
}
|
|
2195
2195
|
const {
|
|
2196
2196
|
Header: yt
|
|
2197
|
-
} =
|
|
2197
|
+
} = Me, Fa = /* @__PURE__ */ E({
|
|
2198
2198
|
name: "GlobalHeader",
|
|
2199
2199
|
inheritAttrs: !1,
|
|
2200
2200
|
props: Ae,
|
|
@@ -2413,7 +2413,7 @@ const {
|
|
|
2413
2413
|
];
|
|
2414
2414
|
[...en, ...Da];
|
|
2415
2415
|
const bt = 40, za = (e) => {
|
|
2416
|
-
const { theme: t } =
|
|
2416
|
+
const { theme: t } = ye(e);
|
|
2417
2417
|
return {
|
|
2418
2418
|
[`${e.componentTitleCls}`]: {
|
|
2419
2419
|
display: "flex",
|
|
@@ -2561,7 +2561,7 @@ const bt = 40, za = (e) => {
|
|
|
2561
2561
|
};
|
|
2562
2562
|
};
|
|
2563
2563
|
function Wa(e) {
|
|
2564
|
-
return
|
|
2564
|
+
return he("ProMultiTabs", (t) => {
|
|
2565
2565
|
const n = _e(t, {
|
|
2566
2566
|
componentWrapCls: `${t.componentCls}-wrap`,
|
|
2567
2567
|
componentTitleCls: `${t.componentCls}-title`
|
|
@@ -2620,7 +2620,7 @@ function ka(e, t) {
|
|
|
2620
2620
|
return e.key === "fixed" ? a ? "取消置顶" : "置顶" : e.key === "fullScreen" ? t.fullScreen ? "还原" : "最大化" : e.label;
|
|
2621
2621
|
}
|
|
2622
2622
|
function Ka(e) {
|
|
2623
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2623
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
2624
2624
|
}
|
|
2625
2625
|
const Aa = Bt.TabPane, Ua = fe.Item;
|
|
2626
2626
|
function H(e) {
|
|
@@ -2634,7 +2634,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2634
2634
|
}) {
|
|
2635
2635
|
const {
|
|
2636
2636
|
storage: n
|
|
2637
|
-
} = ze(e), a = _(!1), l =
|
|
2637
|
+
} = ze(e), a = _(!1), l = Se({
|
|
2638
2638
|
activeKey: "",
|
|
2639
2639
|
contextMenuActiveKey: ""
|
|
2640
2640
|
}), i = Te(), {
|
|
@@ -2660,7 +2660,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2660
2660
|
function z(m) {
|
|
2661
2661
|
return s?.menuMap?.value?.get(m.name) || b.value?.flatMenus?.some(($) => $.name === m.name);
|
|
2662
2662
|
}
|
|
2663
|
-
const p =
|
|
2663
|
+
const p = Se({
|
|
2664
2664
|
fixed: n.value && T.value?.fixed ? T.value?.fixed : [],
|
|
2665
2665
|
normal: n.value && T.value?.normal ? T.value?.normal : []
|
|
2666
2666
|
});
|
|
@@ -2670,7 +2670,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2670
2670
|
immediate: !0,
|
|
2671
2671
|
deep: !0
|
|
2672
2672
|
}), k(n, (m) => {
|
|
2673
|
-
T.value = m ?
|
|
2673
|
+
T.value = m ? Oe(ln(p)) : {
|
|
2674
2674
|
fixed: [],
|
|
2675
2675
|
normal: []
|
|
2676
2676
|
};
|
|
@@ -2699,7 +2699,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2699
2699
|
} : m;
|
|
2700
2700
|
});
|
|
2701
2701
|
k(() => p, (m) => {
|
|
2702
|
-
n.value && (T.value =
|
|
2702
|
+
n.value && (T.value = Oe(m)), e.onTabsChange?.([...p.fixed, ...p.normal]);
|
|
2703
2703
|
}, {
|
|
2704
2704
|
deep: !0
|
|
2705
2705
|
});
|
|
@@ -2719,19 +2719,19 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2719
2719
|
fullPath: m.fullPath,
|
|
2720
2720
|
query: m.query,
|
|
2721
2721
|
params: m.params,
|
|
2722
|
-
meta:
|
|
2722
|
+
meta: xe(m.meta, {
|
|
2723
2723
|
tabState: m.meta?.tabState
|
|
2724
2724
|
})
|
|
2725
2725
|
};
|
|
2726
|
-
B ?
|
|
2726
|
+
B ? xe(B, D) : P ? p.fixed.push(D) : p.normal.push(D), y(m) && (l.activeKey = L);
|
|
2727
2727
|
}
|
|
2728
|
-
},
|
|
2728
|
+
}, be = (m) => {
|
|
2729
2729
|
m.forEach(($) => {
|
|
2730
2730
|
w($) && ne(Ne($));
|
|
2731
2731
|
});
|
|
2732
2732
|
};
|
|
2733
2733
|
k(() => b.value.flatMenus, (m) => {
|
|
2734
|
-
|
|
2734
|
+
be(m);
|
|
2735
2735
|
}, {
|
|
2736
2736
|
deep: !0,
|
|
2737
2737
|
immediate: !0
|
|
@@ -2755,7 +2755,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2755
2755
|
params: L
|
|
2756
2756
|
}) => {
|
|
2757
2757
|
const B = w(m) ? "fixed" : "normal";
|
|
2758
|
-
$ === "add" && P ? p[B][P](L) : $ === "merge" ? p[B] = p[B].map((D) => H(D) === H(m) ?
|
|
2758
|
+
$ === "add" && P ? p[B][P](L) : $ === "merge" ? p[B] = p[B].map((D) => H(D) === H(m) ? xe(D, L) : D) : $ === "remove" && (p[B] = p[B].filter((D) => H(D) !== H(m)));
|
|
2759
2759
|
}, re = () => {
|
|
2760
2760
|
const m = M.value.slice(-1)[0];
|
|
2761
2761
|
m ? i.push({
|
|
@@ -2770,7 +2770,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2770
2770
|
}), $?.(P));
|
|
2771
2771
|
}, Le = () => {
|
|
2772
2772
|
p.fixed = [], p.normal = [];
|
|
2773
|
-
},
|
|
2773
|
+
}, ve = async (m) => {
|
|
2774
2774
|
se(m, ($) => {
|
|
2775
2775
|
y($) && re();
|
|
2776
2776
|
});
|
|
@@ -2786,24 +2786,24 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2786
2786
|
}, 200), setTimeout(() => {
|
|
2787
2787
|
a.value = !1;
|
|
2788
2788
|
}, 500);
|
|
2789
|
-
}, 500),
|
|
2789
|
+
}, 500), Ce = (m) => l[m], Ee = (m) => {
|
|
2790
2790
|
i.push({
|
|
2791
2791
|
path: m.path,
|
|
2792
2792
|
...Q(m)
|
|
2793
2793
|
});
|
|
2794
2794
|
}, Xe = (m, $) => {
|
|
2795
|
-
let P = p.normal.findIndex((j) => H(j) ===
|
|
2796
|
-
const L = M.value.find((j) => H(j) ===
|
|
2795
|
+
let P = p.normal.findIndex((j) => H(j) === Ce($));
|
|
2796
|
+
const L = M.value.find((j) => H(j) === Ce($)), B = w(L);
|
|
2797
2797
|
let D = !1;
|
|
2798
2798
|
switch (m) {
|
|
2799
2799
|
case "fixed":
|
|
2800
|
-
B ? (P = p.fixed.findIndex((j) => H(j) ===
|
|
2800
|
+
B ? (P = p.fixed.findIndex((j) => H(j) === Ce($)), p.normal.unshift(xe(L, {
|
|
2801
2801
|
meta: {
|
|
2802
2802
|
tabState: {
|
|
2803
2803
|
fixed: !B
|
|
2804
2804
|
}
|
|
2805
2805
|
}
|
|
2806
|
-
})), p.fixed = p.fixed.filter((j, ce) => ce !== P)) : (p.fixed.push(
|
|
2806
|
+
})), p.fixed = p.fixed.filter((j, ce) => ce !== P)) : (p.fixed.push(xe(L, {
|
|
2807
2807
|
meta: {
|
|
2808
2808
|
tabState: {
|
|
2809
2809
|
fixed: !B
|
|
@@ -2812,10 +2812,10 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2812
2812
|
})), p.normal = p.normal.filter((j, ce) => ce !== P));
|
|
2813
2813
|
break;
|
|
2814
2814
|
case "close":
|
|
2815
|
-
|
|
2815
|
+
ve(H(L) || "");
|
|
2816
2816
|
break;
|
|
2817
2817
|
case "closeOthersTabs":
|
|
2818
|
-
p.normal = p.normal.filter((j) => H(j) ===
|
|
2818
|
+
p.normal = p.normal.filter((j) => H(j) === Ce($) || w(j)), D = l[$] !== l.activeKey, D && Ee(L);
|
|
2819
2819
|
break;
|
|
2820
2820
|
case "closeLeftTabs":
|
|
2821
2821
|
rt(P) && (p.normal = p.normal.filter((j, ce) => ce >= P || w(j)), D = !M.value.some((j) => H(j) === l.activeKey), D && Ee(L));
|
|
@@ -2827,7 +2827,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2827
2827
|
p.normal = p.normal.filter((j) => w(j)), re();
|
|
2828
2828
|
break;
|
|
2829
2829
|
case "reloadPage":
|
|
2830
|
-
(P === 0 || P) && l.activeKey ===
|
|
2830
|
+
(P === 0 || P) && l.activeKey === Ce($) && Ue();
|
|
2831
2831
|
break;
|
|
2832
2832
|
case "newBlank":
|
|
2833
2833
|
window.open(location.href);
|
|
@@ -2896,7 +2896,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2896
2896
|
}, null), M.value.length > 1 && !w(m) && o(He, {
|
|
2897
2897
|
class: [`${x}-close-btn`, R.value],
|
|
2898
2898
|
onClick: (L) => {
|
|
2899
|
-
L.stopPropagation(),
|
|
2899
|
+
L.stopPropagation(), ve(H(m) || "");
|
|
2900
2900
|
}
|
|
2901
2901
|
}, null)])]
|
|
2902
2902
|
});
|
|
@@ -2951,7 +2951,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2951
2951
|
inheritAttrs: !1,
|
|
2952
2952
|
displayName: "wrap-content",
|
|
2953
2953
|
props: {
|
|
2954
|
-
...
|
|
2954
|
+
...Pe(Zt, ["visible", "destroyOnHide", "storage", "itemRender"]),
|
|
2955
2955
|
hashId: String,
|
|
2956
2956
|
prefixCls: String,
|
|
2957
2957
|
isChildrenLayout: Boolean,
|
|
@@ -2985,7 +2985,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
2985
2985
|
}
|
|
2986
2986
|
}), {
|
|
2987
2987
|
Content: Ga
|
|
2988
|
-
} =
|
|
2988
|
+
} = Me, Ya = /* @__PURE__ */ E({
|
|
2989
2989
|
name: "BaseProLayout",
|
|
2990
2990
|
inheritAttrs: !1,
|
|
2991
2991
|
props: {
|
|
@@ -3006,14 +3006,14 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3006
3006
|
} = ae("ProLayout", [ha, ya], a), {
|
|
3007
3007
|
theme: r,
|
|
3008
3008
|
resolvedTheme: c
|
|
3009
|
-
} = Tt(), [u, d] =
|
|
3009
|
+
} = Tt(), [u, d] = $e(!1), h = xn(), g = at(), b = In({
|
|
3010
3010
|
slots: t,
|
|
3011
3011
|
props: e,
|
|
3012
3012
|
keys: en,
|
|
3013
3013
|
render: !0
|
|
3014
3014
|
}), {
|
|
3015
3015
|
token: C
|
|
3016
|
-
} = Be(), I = _(), s = _(!!e.collapsedProps?.value), x = _(!0), S = _(!1), R = _(!1), T = _(), z = _(st().uuid(10)), p =
|
|
3016
|
+
} = Be(), I = _(), s = _(!!e.collapsedProps?.value), x = _(!0), S = _(!1), R = _(!1), T = _(), z = _(st().uuid(10)), p = Se({
|
|
3017
3017
|
position: "relative"
|
|
3018
3018
|
}), M = v(() => {
|
|
3019
3019
|
let y = 0;
|
|
@@ -3045,9 +3045,10 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3045
3045
|
mixSiderMenus: M.value.hasSilder && e?.selectedKeys ? oa(y, e.selectedKeys[0]) : []
|
|
3046
3046
|
};
|
|
3047
3047
|
}), F = v(() => (h.value === "sm" || h.value === "xs") && !e.disableMobile && !M.value.isWide), W = v(() => ({
|
|
3048
|
+
...e.breadcrumb,
|
|
3048
3049
|
position: e.breadcrumb?.position && We(e.breadcrumb?.position) ? e.breadcrumb?.position : e.settings.layout === "side" ? "header" : "pageHeader",
|
|
3049
|
-
|
|
3050
|
-
itemRender:
|
|
3050
|
+
visible: e.breadcrumb?.visible ?? !0,
|
|
3051
|
+
itemRender: we({
|
|
3051
3052
|
slots: t,
|
|
3052
3053
|
props: {
|
|
3053
3054
|
breadcrumbRender: e.pageContainer?.breadcrumbRender
|
|
@@ -3124,13 +3125,13 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3124
3125
|
menuContentRender: w.menuContentRender
|
|
3125
3126
|
}), null);
|
|
3126
3127
|
}, A = () => {
|
|
3127
|
-
const y =
|
|
3128
|
+
const y = we({
|
|
3128
3129
|
slots: t,
|
|
3129
3130
|
props: e,
|
|
3130
3131
|
key: "footerRender",
|
|
3131
3132
|
render: !1
|
|
3132
3133
|
});
|
|
3133
|
-
return o(Y, null, [y
|
|
3134
|
+
return o(Y, null, [y === !1 ? null : typeof y == "function" ? y(e) : y || o(Sa, {
|
|
3134
3135
|
copyright: b.value.copyrightRender,
|
|
3135
3136
|
links: e.footerLinks
|
|
3136
3137
|
}, null), u.value && o("div", {
|
|
@@ -3185,14 +3186,14 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3185
3186
|
style: y
|
|
3186
3187
|
}, [C.value.layout?.bgLayout ? o("div", {
|
|
3187
3188
|
class: O(`${a}-bg-list`, i.value)
|
|
3188
|
-
}, null) : null, o(
|
|
3189
|
+
}, null) : null, o(Me, {
|
|
3189
3190
|
style: M.value.isWide ? {
|
|
3190
3191
|
width: ie(e.settings.wideWidth),
|
|
3191
3192
|
paddingTop: Ge(M.value.headerHeight, 20),
|
|
3192
3193
|
margin: M.value.isWide ? "0 auto" : void 0
|
|
3193
3194
|
} : void 0
|
|
3194
3195
|
}, {
|
|
3195
|
-
default: () => [Z(), o(
|
|
3196
|
+
default: () => [Z(), o(Me, {
|
|
3196
3197
|
style: p
|
|
3197
3198
|
}, {
|
|
3198
3199
|
default: () => [N(), o(Va, ee(pe(e, Xa), {
|
|
@@ -3241,7 +3242,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3241
3242
|
emit: n,
|
|
3242
3243
|
expose: a
|
|
3243
3244
|
}) {
|
|
3244
|
-
const l = Tt(), i = _(), [r, c] =
|
|
3245
|
+
const l = Tt(), i = _(), [r, c] = $e(e.theme ?? l?.theme?.value ?? "system");
|
|
3245
3246
|
k(() => e.theme, (s) => {
|
|
3246
3247
|
s && (r.value = s);
|
|
3247
3248
|
});
|
|
@@ -3294,7 +3295,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3294
3295
|
}, {
|
|
3295
3296
|
default: () => [o(Ya, ee({
|
|
3296
3297
|
ref: i
|
|
3297
|
-
},
|
|
3298
|
+
}, Pe(e, s), {
|
|
3298
3299
|
onSelect: b,
|
|
3299
3300
|
onOpenKeys: g,
|
|
3300
3301
|
onCollapse: h,
|
|
@@ -3364,7 +3365,7 @@ const Ea = /* @__PURE__ */ E({
|
|
|
3364
3365
|
}
|
|
3365
3366
|
});
|
|
3366
3367
|
function ao(e) {
|
|
3367
|
-
return
|
|
3368
|
+
return he("ProLayoutFooterToolbar", (t) => {
|
|
3368
3369
|
const n = {
|
|
3369
3370
|
...t,
|
|
3370
3371
|
componentCls: `.${e}`
|
|
@@ -3373,7 +3374,7 @@ function ao(e) {
|
|
|
3373
3374
|
});
|
|
3374
3375
|
}
|
|
3375
3376
|
function oo(e, { stylish: t }) {
|
|
3376
|
-
return
|
|
3377
|
+
return he("ProLayoutFooterToolbarStylish", (n) => {
|
|
3377
3378
|
const a = {
|
|
3378
3379
|
...n,
|
|
3379
3380
|
componentCls: `.${e}`
|
|
@@ -3386,7 +3387,7 @@ function oo(e, { stylish: t }) {
|
|
|
3386
3387
|
});
|
|
3387
3388
|
}
|
|
3388
3389
|
function lo(e) {
|
|
3389
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
3390
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
3390
3391
|
}
|
|
3391
3392
|
const io = /* @__PURE__ */ E({
|
|
3392
3393
|
name: "FooterToolbar",
|
|
@@ -3404,10 +3405,10 @@ const io = /* @__PURE__ */ E({
|
|
|
3404
3405
|
} = eo(), {
|
|
3405
3406
|
wrapSSR: i,
|
|
3406
3407
|
hashId: r
|
|
3407
|
-
} = ao(a), c = v(() => n?.collapsed?.value), u = v(() => n?.layoutProps?.value), d = v(() => n?.collapsedProps?.value), h = v(() => n?.isMobile.value ? !1 : n?.collapsedEffect?.value), g = v(() => d?.value?.width ? h.value ? d.value?.width : u.value.siderWidth : c.value ? 0 : u.value.siderWidth), b =
|
|
3408
|
+
} = ao(a), c = v(() => n?.collapsed?.value), u = v(() => n?.layoutProps?.value), d = v(() => n?.collapsedProps?.value), h = v(() => n?.isMobile.value ? !1 : n?.collapsedEffect?.value), g = v(() => d?.value?.width ? h.value ? d.value?.width : u.value.siderWidth : c.value ? 0 : u.value.siderWidth), b = Re(() => {
|
|
3408
3409
|
if (u.value?.hasSilder)
|
|
3409
3410
|
return u.value?.siderWidth ? n?.isMobile?.value ? "100%" : `calc(100% - ${K(g.value)})` : "100%";
|
|
3410
|
-
}, [() => n?.collapsed?.value, () => n?.layoutProps?.value?.hasSilder, () => n?.isMobile, () => n?.layoutProps?.value?.siderWidth]), C =
|
|
3411
|
+
}, [() => n?.collapsed?.value, () => n?.layoutProps?.value?.hasSilder, () => n?.isMobile, () => n?.layoutProps?.value?.siderWidth]), C = Re(() => typeof window > "u" || typeof document > "u" ? null : l?.value?.() || document.body, []), I = oo(`${a}.${a}-stylish`, {
|
|
3411
3412
|
stylish: e.stylish
|
|
3412
3413
|
});
|
|
3413
3414
|
return Ct(() => {
|
|
@@ -3419,7 +3420,7 @@ const io = /* @__PURE__ */ E({
|
|
|
3419
3420
|
slots: t,
|
|
3420
3421
|
props: e,
|
|
3421
3422
|
key: "extra"
|
|
3422
|
-
}), x =
|
|
3423
|
+
}), x = we({
|
|
3423
3424
|
slots: t,
|
|
3424
3425
|
props: e,
|
|
3425
3426
|
key: "renderContent"
|
|
@@ -3521,7 +3522,7 @@ const io = /* @__PURE__ */ E({
|
|
|
3521
3522
|
return l(o("div", {
|
|
3522
3523
|
class: [`${a}`, i.value, r && `${a}-has-breadcrumb`],
|
|
3523
3524
|
style: e.style
|
|
3524
|
-
}, [t?.breadcrumb?.value?.position === "pageHeader" && o("div", {
|
|
3525
|
+
}, [t?.breadcrumb?.value?.position === "pageHeader" && t?.breadcrumb?.value?.visible && o("div", {
|
|
3525
3526
|
class: O(`${a}-top`, i.value)
|
|
3526
3527
|
}, [o(_t, {
|
|
3527
3528
|
breadcrumb: e.breadcrumb
|
|
@@ -3545,7 +3546,7 @@ const io = /* @__PURE__ */ E({
|
|
|
3545
3546
|
};
|
|
3546
3547
|
}
|
|
3547
3548
|
}), uo = (e) => {
|
|
3548
|
-
const { layout: t } =
|
|
3549
|
+
const { layout: t } = ye(e), n = e.layout?.pageContainer, a = n?.borderRadius || e.borderRadiusLG, l = `${e.proComponentsCls}-basic-layout-content`;
|
|
3549
3550
|
return {
|
|
3550
3551
|
[`${e.proComponentsCls}-basic-layout`]: {
|
|
3551
3552
|
[`&-content${l}-width`]: {
|
|
@@ -3599,7 +3600,7 @@ const io = /* @__PURE__ */ E({
|
|
|
3599
3600
|
};
|
|
3600
3601
|
};
|
|
3601
3602
|
function co(e) {
|
|
3602
|
-
return
|
|
3603
|
+
return he("ProPageContainer", (t) => {
|
|
3603
3604
|
const n = _e(t, {
|
|
3604
3605
|
gridContent: `${t.proComponentsCls}-grid-content`
|
|
3605
3606
|
});
|
|
@@ -3607,7 +3608,7 @@ function co(e) {
|
|
|
3607
3608
|
}, e);
|
|
3608
3609
|
}
|
|
3609
3610
|
function vt(e) {
|
|
3610
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
3611
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
3611
3612
|
}
|
|
3612
3613
|
const mo = {
|
|
3613
3614
|
type: "default"
|
|
@@ -3662,7 +3663,7 @@ const mo = {
|
|
|
3662
3663
|
r && r.fullScreenOnTabsHide && (r.fullScreenOnTabsHide.value = !!e.fullScreenOnTabsHide), F();
|
|
3663
3664
|
});
|
|
3664
3665
|
function F() {
|
|
3665
|
-
const y =
|
|
3666
|
+
const y = we({
|
|
3666
3667
|
slots: t,
|
|
3667
3668
|
props: e,
|
|
3668
3669
|
key: "breadcrumbRender"
|
|
@@ -3738,7 +3739,7 @@ const mo = {
|
|
|
3738
3739
|
slots: t,
|
|
3739
3740
|
props: e,
|
|
3740
3741
|
key: "pageHeaderContentRender"
|
|
3741
|
-
}),
|
|
3742
|
+
}), be = we({
|
|
3742
3743
|
slots: t,
|
|
3743
3744
|
props: e,
|
|
3744
3745
|
key: "breadcrumbRender"
|
|
@@ -3751,7 +3752,7 @@ const mo = {
|
|
|
3751
3752
|
}
|
|
3752
3753
|
}, [o(Y, null, [w !== !1 && V.value && (w || o(so, {
|
|
3753
3754
|
style: I?.value,
|
|
3754
|
-
breadcrumb:
|
|
3755
|
+
breadcrumb: be,
|
|
3755
3756
|
content: ne,
|
|
3756
3757
|
close: e.fullScreenOnTabsHide
|
|
3757
3758
|
}, null)), A()]), y && o(io, e.footerToolBarProps || {}, vt(y) ? y : {
|
|
@@ -3794,7 +3795,7 @@ const mo = {
|
|
|
3794
3795
|
}
|
|
3795
3796
|
});
|
|
3796
3797
|
function po(e) {
|
|
3797
|
-
return
|
|
3798
|
+
return he("PageLoading", (t) => [fo(t)], e);
|
|
3798
3799
|
}
|
|
3799
3800
|
const Ti = /* @__PURE__ */ E({
|
|
3800
3801
|
name: "GProAppPage",
|
|
@@ -3864,22 +3865,22 @@ const Ti = /* @__PURE__ */ E({
|
|
|
3864
3865
|
}));
|
|
3865
3866
|
};
|
|
3866
3867
|
}
|
|
3867
|
-
}), go = ["left", "right"],
|
|
3868
|
+
}), go = ["left", "right"], Ie = ["left", "right", "down", "up"], ho = ["downBig", "upBig", "leftBig", "rightBig"], yo = ["topLeft", "bottomRight", "topRight", "bottomLeft"], bo = ["downLeft", "upRight", "downRight", "upLeft"], vo = {
|
|
3868
3869
|
preset: [
|
|
3869
3870
|
// 预设动画配置
|
|
3870
|
-
{ name: "back", alias: "渐近", directions:
|
|
3871
|
-
{ name: "bounce", alias: "弹跳", directions:
|
|
3871
|
+
{ name: "back", alias: "渐近", directions: Ie },
|
|
3872
|
+
{ name: "bounce", alias: "弹跳", directions: Ie.concat("default") },
|
|
3872
3873
|
{
|
|
3873
3874
|
name: "fade",
|
|
3874
3875
|
alias: "淡化",
|
|
3875
|
-
directions:
|
|
3876
|
+
directions: Ie.concat(ho).concat(yo).concat("default")
|
|
3876
3877
|
},
|
|
3877
3878
|
{ name: "flip", alias: "翻转", directions: ["x", "y"] },
|
|
3878
3879
|
{ name: "lightSpeed", alias: "光速", directions: go },
|
|
3879
3880
|
{ name: "rotate", alias: "旋转", directions: bo.concat("default") },
|
|
3880
3881
|
{ name: "roll", alias: "翻滚", directions: ["default"] },
|
|
3881
|
-
{ name: "zoom", alias: "缩放", directions:
|
|
3882
|
-
{ name: "slide", alias: "滑动", directions:
|
|
3882
|
+
{ name: "zoom", alias: "缩放", directions: Ie.concat("default") },
|
|
3883
|
+
{ name: "slide", alias: "滑动", directions: Ie }
|
|
3883
3884
|
]
|
|
3884
3885
|
}, Co = new f("backInLeft", {
|
|
3885
3886
|
"0%": {
|
|
@@ -5154,7 +5155,7 @@ const Ti = /* @__PURE__ */ E({
|
|
|
5154
5155
|
}
|
|
5155
5156
|
});
|
|
5156
5157
|
function fi(e) {
|
|
5157
|
-
return
|
|
5158
|
+
return he("LayoutPageTranstion", (t) => {
|
|
5158
5159
|
const n = _e(t);
|
|
5159
5160
|
return [mi(n)];
|
|
5160
5161
|
}, e);
|
|
@@ -5221,15 +5222,15 @@ function Li(e) {
|
|
|
5221
5222
|
};
|
|
5222
5223
|
}
|
|
5223
5224
|
function Ni(e) {
|
|
5224
|
-
const t = Te(), n = e?.defaultOpen ?? !0, a = e?.autoClose ?? !0, l = t.getRoutes(), i = _([]), r =
|
|
5225
|
+
const t = Te(), n = e?.defaultOpen ?? !0, a = e?.autoClose ?? !0, l = t.getRoutes(), i = _([]), r = Se({
|
|
5225
5226
|
menuMap: /* @__PURE__ */ new Map(),
|
|
5226
5227
|
flatMenus: []
|
|
5227
|
-
}), c =
|
|
5228
|
+
}), c = Se({
|
|
5228
5229
|
openKeys: [],
|
|
5229
5230
|
selectedKeys: []
|
|
5230
5231
|
}), u = v(() => t.currentRoute.value), d = (C) => {
|
|
5231
5232
|
const I = ta(na(C));
|
|
5232
|
-
i.value =
|
|
5233
|
+
i.value = Oe(I.menuData), r.menuMap = I.menuMap, r.flatMenus = I.flatMenus;
|
|
5233
5234
|
};
|
|
5234
5235
|
e?.menuData && it(e.menuData) && k(() => e.menuData.value, (C) => d(C), { deep: !0 }), d(e?.menuData ? it(e.menuData) ? e.menuData.value : e.menuData : l);
|
|
5235
5236
|
const h = v(() => Ut({
|
|
@@ -5309,7 +5310,7 @@ export {
|
|
|
5309
5310
|
Ut as getMatchedList,
|
|
5310
5311
|
ta as getMenuData,
|
|
5311
5312
|
oa as getMenuFirstChildren,
|
|
5312
|
-
|
|
5313
|
+
ye as getTokenLayoutTheme,
|
|
5313
5314
|
kt as handlePathKey,
|
|
5314
5315
|
De as iconStyle,
|
|
5315
5316
|
qn as layout,
|