Browse Source

Update index.tsx

lex 2 years ago
parent
commit
18e5374657
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/views/shop-mall/components/TheHomeHeader/index.tsx

+ 4 - 2
src/views/shop-mall/components/TheHomeHeader/index.tsx

@@ -41,8 +41,10 @@ export default defineComponent({
 
     onMounted(() => {
       nextTick(() => {
-        const { height } = useRect(homeHeaderDom as any)
-        emit('headerDom', height)
+        setTimeout(() => {
+          const { height } = useRect(homeHeaderDom as any)
+          emit('headerDom', height)
+        }, 300)
       })
     })