소스 검색

测试高度

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')
           }}