瀏覽代碼

测试高度

lex 2 年之前
父節點
當前提交
cec6d1b9bb
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      src/components/o-sticky/index.tsx
  2. 1 0
      src/school/train-planning/index.tsx

+ 1 - 0
src/components/o-sticky/index.tsx

@@ -52,6 +52,7 @@ export default defineComponent({
         const { height } = useRect((this as any).$refs.div)
         this.sectionStyle.height = `${height}px`
         this.$emit('getHeight', height)
+        console.log(height, 'osticky height')
       }, 200)
     })
   },

+ 1 - 0
src/school/train-planning/index.tsx

@@ -36,6 +36,7 @@ export default defineComponent({
         <OSticky
           position="top"
           onGetHeight={(height: any) => {
+            console.log(height, 'height')
             heightV.value = height
             document.documentElement.style.setProperty('--header-height', height + 'px')
           }}