perf(utils): optimize page blank space setting
This commit is contained in:
parent
cb12c6b864
commit
7406b65bd2
|
@ -197,7 +197,10 @@ KEEP.initUtils = () => {
|
||||||
const innerHeight = window.innerHeight;
|
const innerHeight = window.innerHeight;
|
||||||
const pb_dom = document.querySelector('.page-main-content-bottom');
|
const pb_dom = document.querySelector('.page-main-content-bottom');
|
||||||
if (allDomHeight < innerHeight) {
|
if (allDomHeight < innerHeight) {
|
||||||
pb_dom.style.marginTop = Math.floor(innerHeight - allDomHeight) + 'px';
|
const marginTopValue = Math.floor(innerHeight - allDomHeight);
|
||||||
|
if (marginTopValue > 0) {
|
||||||
|
pb_dom.style.marginTop = `${marginTopValue - 2}px`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue