浏览代码

no message

zhejiushizhuce 2 年之前
父节点
当前提交
8961e0c8aa
共有 1 个文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      src/layout/Navbar/index.jsx

+ 6 - 0
src/layout/Navbar/index.jsx

@@ -271,6 +271,12 @@ const PageHeader = () => {
            if (headerRoom){
               if (!barRef.showHeader){
                   offset=headerRoom.clientHeight;
+                  const hstyle = window.getComputedStyle(headerRoom);
+                  if (hstyle!=null){
+                      let paddingBottom=hstyle.paddingBottom;
+                      paddingBottom=Number(paddingBottom.replace("px",""));
+                      offset=offset-paddingBottom;
+                  }
               }
            }
         }