@gx-design-vue/pro-layout 0.1.0-beta.134 → 0.1.0-beta.136
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 +49 -37
- package/dist/pro-layout.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/pro-layout.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Menu as de, Badge as fi, Breadcrumb as mi, Spin as Ht, Card as hi, Avat
|
|
|
6
6
|
import { pick as fe, omit as $e, cloneDeep as Ge } from "lodash-es";
|
|
7
7
|
import { useRouter as ze, RouterLink as Ci, useRoute as xi } from "vue-router";
|
|
8
8
|
import { useProAppContext as Dn, proAppProps as Si, proAppSlots as Mi, GProApp as wi } from "@gx-design-vue/pro-app";
|
|
9
|
-
import { useSlotsProps as Wn, onMountedOrActivated as Ii, useMergedState as Wt, useState as
|
|
9
|
+
import { useSlotsProps as Wn, onMountedOrActivated as Ii, useMergedState as Wt, useState as ye, useMediaQuery as jn, useMemo as cn } from "@gx-design-vue/pro-hooks";
|
|
10
10
|
import { GProModal as En } from "@gx-design-vue/pro-modal";
|
|
11
11
|
import { useLocalStorage as jt, useMagicKeys as Kn, whenever as It, useColorMode as Ri, useThrottleFn as Un, onKeyStroke as bt, useFullscreen as $i, useDebounceFn as Oi, useStyleTag as Bi, useClipboard as Fi } from "@vueuse/core";
|
|
12
12
|
import Se from "dayjs";
|
|
@@ -658,8 +658,8 @@ const Gi = {
|
|
|
658
658
|
bordered: !1
|
|
659
659
|
}), {
|
|
660
660
|
default: () => {
|
|
661
|
-
var
|
|
662
|
-
return [(
|
|
661
|
+
var ge;
|
|
662
|
+
return [(ge = t.default) == null ? void 0 : ge.call(t)];
|
|
663
663
|
}
|
|
664
664
|
}) : Ue(y) ? a("div", {
|
|
665
665
|
style: (z = M.value) != null && z.marginBlockPageContainerContent ? {
|
|
@@ -888,7 +888,7 @@ const Jn = /* @__PURE__ */ j({
|
|
|
888
888
|
const [t, n] = Wt(!1, {
|
|
889
889
|
value: $(() => se(e.open) ? e.open : !1),
|
|
890
890
|
onChange: e.onOpenChange
|
|
891
|
-
}), [i, o] =
|
|
891
|
+
}), [i, o] = ye(!1), l = _i(), r = (s = "", d) => {
|
|
892
892
|
const c = s ? `${e.className}-popup-${s}` : `${e.className}-popup`;
|
|
893
893
|
return k(c, e.hashId, d || "");
|
|
894
894
|
};
|
|
@@ -1081,7 +1081,7 @@ const Jn = /* @__PURE__ */ j({
|
|
|
1081
1081
|
var M, x;
|
|
1082
1082
|
(M = e.onOpenChange) == null || M.call(e, f), (x = e["onUpdate:open"]) == null || x.call(e, f), n && (n.lockOpen.value = f);
|
|
1083
1083
|
}
|
|
1084
|
-
}), [c, m] =
|
|
1084
|
+
}), [c, m] = ye(!1), h = te();
|
|
1085
1085
|
function O(f) {
|
|
1086
1086
|
return e.cryptoFn ? e.cryptoFn(f) : f;
|
|
1087
1087
|
}
|
|
@@ -1830,7 +1830,7 @@ const co = ({
|
|
|
1830
1830
|
}), {
|
|
1831
1831
|
wrapSSR: n,
|
|
1832
1832
|
hashId: i
|
|
1833
|
-
} = uo(t), [o, l] =
|
|
1833
|
+
} = uo(t), [o, l] = ye(""), [r, s] = ye(!1), d = ae(), c = Kn(), m = ui() ? c["ctrl+k"] : c["cmd+k"], h = te(), O = $(() => {
|
|
1834
1834
|
var u, p, P;
|
|
1835
1835
|
return zt((u = e.dataSource) != null && u.length ? e.dataSource : (P = (p = d == null ? void 0 : d.menuProps) == null ? void 0 : p.value) == null ? void 0 : P.menuData);
|
|
1836
1836
|
});
|
|
@@ -1984,7 +1984,7 @@ const lu = /* @__PURE__ */ j({
|
|
|
1984
1984
|
}), {
|
|
1985
1985
|
wrapSSR: d,
|
|
1986
1986
|
hashId: c
|
|
1987
|
-
} = ho(s), [m, h] =
|
|
1987
|
+
} = ho(s), [m, h] = ye("auto"), {
|
|
1988
1988
|
isDark: O,
|
|
1989
1989
|
toggleMode: S
|
|
1990
1990
|
} = Kt($(() => {
|
|
@@ -2280,7 +2280,7 @@ function da(e) {
|
|
|
2280
2280
|
const t = /var\((--[\w-]+)\)/, n = e.match(t);
|
|
2281
2281
|
return n ? n[1] : (/^--[\w-]+$/.test(e), e);
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function pe(e) {
|
|
2284
2284
|
if (e || e === 0)
|
|
2285
2285
|
return kt(e) && e.includes("--") ? `var(${e})` : Q(e);
|
|
2286
2286
|
}
|
|
@@ -2648,7 +2648,7 @@ const Ut = {
|
|
|
2648
2648
|
}), {
|
|
2649
2649
|
wrapSSR: i,
|
|
2650
2650
|
hashId: o
|
|
2651
|
-
} = he("AppsLogoIcon", [Lo], n), [l, r] =
|
|
2651
|
+
} = he("AppsLogoIcon", [Lo], n), [l, r] = ye(!1), s = te(), d = te();
|
|
2652
2652
|
return () => {
|
|
2653
2653
|
var c;
|
|
2654
2654
|
return i(a(q, null, [a("div", {
|
|
@@ -3180,6 +3180,12 @@ const Ot = (e) => ({
|
|
|
3180
3180
|
borderBlockEnd: n === "wide" ? `1px solid ${e.colorSplit}` : void 0,
|
|
3181
3181
|
marginBlockEnd: n === "wide" ? e.margin : void 0
|
|
3182
3182
|
},
|
|
3183
|
+
"&-content": {
|
|
3184
|
+
position: "relative",
|
|
3185
|
+
display: "flex",
|
|
3186
|
+
flexDirection: "column",
|
|
3187
|
+
height: "100%"
|
|
3188
|
+
},
|
|
3183
3189
|
"&-links": {
|
|
3184
3190
|
width: "100%",
|
|
3185
3191
|
ul: {
|
|
@@ -3393,15 +3399,15 @@ const {
|
|
|
3393
3399
|
wrapSSR: I,
|
|
3394
3400
|
hashId: L
|
|
3395
3401
|
} = he("ProLayoutSiderMenu", [Vo, _o, Go, Ca, (z) => {
|
|
3396
|
-
var Ce,
|
|
3397
|
-
const E = (Ce = z == null ? void 0 : z.layout) == null ? void 0 : Ce.sider, D = Pt("sider", z, (
|
|
3402
|
+
var Ce, be;
|
|
3403
|
+
const E = (Ce = z == null ? void 0 : z.layout) == null ? void 0 : Ce.sider, D = Pt("sider", z, (be = z.layout) == null ? void 0 : be.key), {
|
|
3398
3404
|
dark: ue
|
|
3399
|
-
} = me(z),
|
|
3405
|
+
} = me(z), ge = lt(z, "sider");
|
|
3400
3406
|
return {
|
|
3401
3407
|
[`${z.proComponentsCls}-basic-layout`]: {
|
|
3402
3408
|
[z.componentCls]: {
|
|
3403
3409
|
background: (E == null ? void 0 : E.colorBgMenu) || (D == null ? void 0 : D.colorBgMenu),
|
|
3404
|
-
boxShadow:
|
|
3410
|
+
boxShadow: ge || ue ? "#0d0d0da6 0 2px 8px" : "2px 0 8px 0 rgba(29,35,41,.05)",
|
|
3405
3411
|
[`${z.componentCls}-footer`]: {
|
|
3406
3412
|
color: E == null ? void 0 : E.colorTextMenu
|
|
3407
3413
|
}
|
|
@@ -3439,7 +3445,7 @@ const {
|
|
|
3439
3445
|
}
|
|
3440
3446
|
};
|
|
3441
3447
|
return () => {
|
|
3442
|
-
var
|
|
3448
|
+
var be, Ae;
|
|
3443
3449
|
let z;
|
|
3444
3450
|
const E = x.value && p.value !== "simple" && a(_t, U({
|
|
3445
3451
|
title: l.value.title,
|
|
@@ -3448,7 +3454,7 @@ const {
|
|
|
3448
3454
|
baseClassName: f
|
|
3449
3455
|
}, fe(e, Object.keys(ut))), {
|
|
3450
3456
|
default: () => [y.value]
|
|
3451
|
-
}), D = e.menuHeaderRender && ((
|
|
3457
|
+
}), D = e.menuHeaderRender && ((be = e.menuHeaderRender) == null ? void 0 : be.call(e, e)), ue = e.menuLinksRender, ge = e.siderActionsRender, Ce = a(_n, {
|
|
3452
3458
|
class: `${f}-menu ${L.value}`,
|
|
3453
3459
|
theme: F.value,
|
|
3454
3460
|
mode: "inline",
|
|
@@ -3515,11 +3521,17 @@ const {
|
|
|
3515
3521
|
default: () => {
|
|
3516
3522
|
var xe, Qe, He;
|
|
3517
3523
|
return [s.value.loading && a("div", {
|
|
3518
|
-
class: [
|
|
3524
|
+
class: [`${f}-loading`, L.value]
|
|
3519
3525
|
}, [a(Ht, {
|
|
3520
3526
|
spinning: s.value.loading,
|
|
3521
3527
|
indicator: (xe = m == null ? void 0 : m.indicator) == null ? void 0 : xe.value
|
|
3522
|
-
}, null)]), E || null,
|
|
3528
|
+
}, null)]), E || null, a("div", {
|
|
3529
|
+
class: `${f}-content`,
|
|
3530
|
+
style: {
|
|
3531
|
+
flex: "1 1 0%",
|
|
3532
|
+
overflow: "hidden"
|
|
3533
|
+
}
|
|
3534
|
+
}, [Ue(e.menuHeaderRender) && a("div", {
|
|
3523
3535
|
class: k([L.value, `${f}-extra`, !E && `${f}-extra-no-logo`])
|
|
3524
3536
|
}, [D]), a("div", {
|
|
3525
3537
|
style: {
|
|
@@ -3527,7 +3539,7 @@ const {
|
|
|
3527
3539
|
overflow: "hidden auto"
|
|
3528
3540
|
},
|
|
3529
3541
|
class: k(`${f}-menu-container`)
|
|
3530
|
-
}, [e.menuContentRender && ((Qe = e.menuContentRender) == null ? void 0 : Qe.call(e, e, Ce)) || Ce]), p.value !== "wide" && a(q, null, [ue && Pn(ue) && ue.length > 0 && a("div", {
|
|
3542
|
+
}, [e.menuContentRender && ((Qe = e.menuContentRender) == null ? void 0 : Qe.call(e, e, Ce)) || Ce])]), p.value !== "wide" && a(q, null, [ue && Pn(ue) && ue.length > 0 && a("div", {
|
|
3531
3543
|
class: `${f}-links ${L.value}`
|
|
3532
3544
|
}, [a(de, {
|
|
3533
3545
|
theme: F.value,
|
|
@@ -3543,9 +3555,9 @@ const {
|
|
|
3543
3555
|
default: () => [De]
|
|
3544
3556
|
}))) ? z : {
|
|
3545
3557
|
default: () => [z]
|
|
3546
|
-
})]), n.value ? null : a("div", {
|
|
3558
|
+
})]), n.value ? null : ge && a("div", {
|
|
3547
3559
|
class: k(`${f}-actions`, L.value)
|
|
3548
|
-
}, [
|
|
3560
|
+
}, [ge]), e.collapsedType === "sider" && !n.value && a(q, null, [a("div", {
|
|
3549
3561
|
class: k(`${f}-collapsed-button`, S.value && "collapsed", L.value)
|
|
3550
3562
|
}, [a("span", {
|
|
3551
3563
|
onClick: () => T()
|
|
@@ -3812,7 +3824,7 @@ const {
|
|
|
3812
3824
|
}, [L]), I()]) : a("div", {
|
|
3813
3825
|
class: `${p}-main ${C.value}`,
|
|
3814
3826
|
style: {
|
|
3815
|
-
width: e.headerMainWidth || e.headerMainWidth === 0 ? Q(e.headerMainWidth) : r.value.layout === "wide" ?
|
|
3827
|
+
width: e.headerMainWidth || e.headerMainWidth === 0 ? Q(e.headerMainWidth) : r.value.layout === "wide" ? pe(r.value.wideWidth) : void 0
|
|
3816
3828
|
}
|
|
3817
3829
|
}, [a("div", {
|
|
3818
3830
|
class: `${p}-main-left ${C.value}`
|
|
@@ -4115,7 +4127,7 @@ const bn = 40, ol = (e) => {
|
|
|
4115
4127
|
"&-fixed": {
|
|
4116
4128
|
position: "fixed",
|
|
4117
4129
|
height: bn,
|
|
4118
|
-
top:
|
|
4130
|
+
top: pe(((n = (t = e.layout) == null ? void 0 : t.header) == null ? void 0 : n.heightLayoutHeader) || Z.headerHeight),
|
|
4119
4131
|
right: 0,
|
|
4120
4132
|
zIndex: 9,
|
|
4121
4133
|
transition: "width .2s"
|
|
@@ -4297,13 +4309,13 @@ const fl = /* @__PURE__ */ j({
|
|
|
4297
4309
|
};
|
|
4298
4310
|
G ? Fe(G, le) : H ? I.fixed.push(le) : I.normal.push(le), E(g) && (l.activeKey = X);
|
|
4299
4311
|
}
|
|
4300
|
-
},
|
|
4312
|
+
}, ge = (g) => {
|
|
4301
4313
|
g.forEach((B) => {
|
|
4302
4314
|
D(B) && ue(Ee(B));
|
|
4303
4315
|
});
|
|
4304
4316
|
};
|
|
4305
4317
|
J(() => S.value.levelMenuData, (g) => {
|
|
4306
|
-
|
|
4318
|
+
ge(g);
|
|
4307
4319
|
}, {
|
|
4308
4320
|
deep: !0,
|
|
4309
4321
|
immediate: !0
|
|
@@ -4317,7 +4329,7 @@ const fl = /* @__PURE__ */ j({
|
|
|
4317
4329
|
const B = L.value.find((A) => (g || l.activeKey) === _(A));
|
|
4318
4330
|
return (B == null ? void 0 : B.redirect) || (B == null ? void 0 : B.fullPath) || (B == null ? void 0 : B.path) || "";
|
|
4319
4331
|
};
|
|
4320
|
-
function
|
|
4332
|
+
function be(g) {
|
|
4321
4333
|
const B = {};
|
|
4322
4334
|
return g.query && (B.query = g.query), g.params && (B.params = g.params), B;
|
|
4323
4335
|
}
|
|
@@ -4332,7 +4344,7 @@ const fl = /* @__PURE__ */ j({
|
|
|
4332
4344
|
const g = L.value.slice(-1)[0];
|
|
4333
4345
|
g ? r.push({
|
|
4334
4346
|
path: Ce(_(g)),
|
|
4335
|
-
...
|
|
4347
|
+
...be(g)
|
|
4336
4348
|
}) : r.push("/");
|
|
4337
4349
|
}, xe = (g, B) => {
|
|
4338
4350
|
const A = L.value.find((K) => g === _(K));
|
|
@@ -4350,7 +4362,7 @@ const fl = /* @__PURE__ */ j({
|
|
|
4350
4362
|
const B = L.value.find((A) => _(A) === g);
|
|
4351
4363
|
B && l.activeKey !== _(B) && r.push({
|
|
4352
4364
|
path: Ce(_(B)),
|
|
4353
|
-
...
|
|
4365
|
+
...be(B)
|
|
4354
4366
|
});
|
|
4355
4367
|
}, ft = Un(() => {
|
|
4356
4368
|
var g;
|
|
@@ -4362,7 +4374,7 @@ const fl = /* @__PURE__ */ j({
|
|
|
4362
4374
|
}, 500), We = (g) => l[g], mt = (g) => {
|
|
4363
4375
|
r.push({
|
|
4364
4376
|
path: g.path,
|
|
4365
|
-
...
|
|
4377
|
+
...be(g)
|
|
4366
4378
|
});
|
|
4367
4379
|
}, ht = (g, B) => {
|
|
4368
4380
|
let A = I.normal.findIndex((G) => _(G) === We(B));
|
|
@@ -4605,9 +4617,9 @@ const fl = /* @__PURE__ */ j({
|
|
|
4605
4617
|
});
|
|
4606
4618
|
const f = $(() => {
|
|
4607
4619
|
let w = 0;
|
|
4608
|
-
return p.value ? w = 0 : e.settings.siderWidth || e.settings.siderWidth === 0 ? w = e.settings.siderWidth === 0 ? 0 :
|
|
4620
|
+
return p.value ? w = 0 : e.settings.siderWidth || e.settings.siderWidth === 0 ? w = e.settings.siderWidth === 0 ? 0 : pe(e.settings.siderWidth) : e.settings.layout === "wide" ? w = 208 : w = pe(Z.siderWidth), {
|
|
4609
4621
|
isWide: e.settings.layout === "wide",
|
|
4610
|
-
headerHeight: e.settings.headerHeight || e.settings.headerHeight === 0 ? e.settings.headerHeight === 0 ? 0 :
|
|
4622
|
+
headerHeight: e.settings.headerHeight || e.settings.headerHeight === 0 ? e.settings.headerHeight === 0 ? 0 : pe(e.settings.headerHeight) : pe(Z.headerHeight),
|
|
4611
4623
|
siderWidth: w,
|
|
4612
4624
|
hasSilder: e.settings.layout === "mix" || e.settings.layout === "side" || e.settings.layout === "wide" || !1
|
|
4613
4625
|
};
|
|
@@ -4710,8 +4722,8 @@ const fl = /* @__PURE__ */ j({
|
|
|
4710
4722
|
}), () => {
|
|
4711
4723
|
var y;
|
|
4712
4724
|
const w = {
|
|
4713
|
-
minWidth: f.value.isWide ?
|
|
4714
|
-
minHeight: e.settings.layout === "simple" ? `calc(100vh - ${
|
|
4725
|
+
minWidth: f.value.isWide ? pe(e.settings.wideWidth) : void 0,
|
|
4726
|
+
minHeight: e.settings.layout === "simple" ? `calc(100vh - ${pe(e.settings.headerHeight)})` : void 0,
|
|
4715
4727
|
...e.style
|
|
4716
4728
|
}, R = ee(t, e, "footerRender"), W = R === !1 ? null : R ? typeof R == "function" ? R(e) : R : a(ko, {
|
|
4717
4729
|
copyright: d.value.copyrightRender,
|
|
@@ -4728,7 +4740,7 @@ const fl = /* @__PURE__ */ j({
|
|
|
4728
4740
|
style: w
|
|
4729
4741
|
}, [a(Xe, {
|
|
4730
4742
|
style: f.value.isWide ? {
|
|
4731
|
-
width:
|
|
4743
|
+
width: pe(e.settings.wideWidth),
|
|
4732
4744
|
paddingTop: $t(f.value.headerHeight, 20),
|
|
4733
4745
|
margin: f.value.isWide ? "0 auto" : void 0
|
|
4734
4746
|
} : void 0
|
|
@@ -6851,7 +6863,7 @@ var Bt = {
|
|
|
6851
6863
|
};
|
|
6852
6864
|
function ws(e) {
|
|
6853
6865
|
var t = { r: 0, g: 0, b: 0 }, n = 1, i = null, o = null, l = null, r = !1, s = !1;
|
|
6854
|
-
return typeof e == "string" && (e = $s(e)), typeof e == "object" && (
|
|
6866
|
+
return typeof e == "string" && (e = $s(e)), typeof e == "object" && (ve(e.r) && ve(e.g) && ve(e.b) ? (t = ps(e.r, e.g, e.b), r = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ve(e.h) && ve(e.s) && ve(e.v) ? (i = tt(e.s), o = tt(e.v), t = Cs(e.h, i, o), r = !0, s = "hsv") : ve(e.h) && ve(e.s) && ve(e.l) && (i = tt(e.s), l = tt(e.l), t = ys(e.h, i, l), r = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ra(n), {
|
|
6855
6867
|
ok: r,
|
|
6856
6868
|
format: e.format || s,
|
|
6857
6869
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -6906,7 +6918,7 @@ function $s(e) {
|
|
|
6906
6918
|
format: t ? "name" : "hex"
|
|
6907
6919
|
} : !1)))))))));
|
|
6908
6920
|
}
|
|
6909
|
-
function
|
|
6921
|
+
function ve(e) {
|
|
6910
6922
|
return !!ce.CSS_UNIT.exec(String(e));
|
|
6911
6923
|
}
|
|
6912
6924
|
var nt = (
|
|
@@ -7460,7 +7472,7 @@ const Sn = new v("toConic", {
|
|
|
7460
7472
|
copy: o,
|
|
7461
7473
|
copied: l,
|
|
7462
7474
|
isSupported: r
|
|
7463
|
-
} = Fi(), s = ae(), [d, c] =
|
|
7475
|
+
} = Fi(), s = ae(), [d, c] = ye(!1), [m, h] = ye(!1), [O, S] = ye("setting");
|
|
7464
7476
|
J(() => {
|
|
7465
7477
|
var b;
|
|
7466
7478
|
return (b = s == null ? void 0 : s.themeEditorOpen) == null ? void 0 : b.value;
|
|
@@ -7742,7 +7754,7 @@ export {
|
|
|
7742
7754
|
wo as filterTree,
|
|
7743
7755
|
sa as findLastKey,
|
|
7744
7756
|
So as flatMap,
|
|
7745
|
-
|
|
7757
|
+
pe as getCssVarOrUnit,
|
|
7746
7758
|
ca as getCssVariableValue,
|
|
7747
7759
|
ra as getLastPath,
|
|
7748
7760
|
ua as getMatchedList,
|