zhb 6 days ago
parent
commit
fafc4b3a32
1 changed files with 6 additions and 3 deletions
  1. 6 3
      App.vue

+ 6 - 3
App.vue

@@ -20,6 +20,8 @@
 
   const { checkUpdate } = useAppUpdate()
   const globalStore = useGlobalStore()
+  import { useWindowWidth } from '@/composables/useWindowWidth'
+  const windowWidth = useWindowWidth(300)
   onLoad((options) => {
     updateRoute()
     // checkUpdate()
@@ -413,15 +415,16 @@
         window.vm = instance.proxy
       }
     }
-    // 初始化鼠标跟随提示
-    window._destroyTooltip = useMouseTooltip()
     window.addEventListener('hashchange', handleSignupRoute)
+    if (windowWidth.value < 700) return
+    window._destroyTooltip = useMouseTooltip()
     // #endif
   })
   onUnmounted(() => {
     // #ifdef H5
-    if (window._destroyTooltip) window._destroyTooltip()
     window.removeEventListener('hashchange', handleSignupRoute)
+    if (windowWidth.value < 700) return
+    if (window._destroyTooltip) window._destroyTooltip()
     // #endif
   })
 </script>