Преглед на файлове

Squashed commit of the following:

commit 04495a0a6beb76577e419ba256adc412e6918431
Author: skyblued <806020149@qq.com>
Date:   Tue Aug 30 10:23:27 2022 +0800

    fix

commit a352cbc7dd6a4728c3e0c0753e1710cf73467ca8
Author: skyblued <806020149@qq.com>
Date:   Tue Aug 30 10:17:27 2022 +0800

    fix
skyblued преди 2 години
родител
ревизия
8cf42673a8
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/views/shop-mall/components/TheHomeHeader/index.tsx

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

@@ -14,9 +14,9 @@ export default defineComponent({
   name: 'TheHomeHeader',
   emits: ['cart', 'more', 'search'],
   setup(props, { emit }) {
+    const navBarHeight = ref(sessionStorage.getItem('navHeight'))
     const init = () => {
       // 设置是否显示导航栏 0 显示 1 不显示
-      const navBarHeight = ref(sessionStorage.getItem('navHeight'))
       postMessage({ api: 'setBarStatus', content: { status: 0 } })
       if (navBarHeight.value) return
       postMessage({ api: 'getNavHeight' }, res => {
@@ -43,7 +43,7 @@ export default defineComponent({
     ]
     return () => (
       <div class={styles.theHomeHeader}>
-        <div style={{ height: 'calc(var(--van-nav-bar-height))' }}></div>
+        <div style={{ height: navBarHeight.value + 'px' }}></div>
         <div class={styles.content}>
           <img class={styles.mall} src={IconMall} />
           <div class={styles.searchBox} onClick={() => emit('search')}>