Przeglądaj źródła

首页-鼠标经过菜单时关闭视屏封面图

wangtao 2 tygodni temu
rodzic
commit
138ccfd36c
1 zmienionych plików z 12 dodań i 12 usunięć
  1. 12 12
      src/components/layout/banner.vue

+ 12 - 12
src/components/layout/banner.vue

@@ -9,18 +9,18 @@ const posterImg = ref(poster)//视频封面图
 modelType.value = store.state.menuList[store.state.sub]?.modelType
 modelType.value = store.state.menuList[store.state.sub]?.modelType
 columnImage.value = store.state.menuList[store.state.sub]?.imagePath
 columnImage.value = store.state.menuList[store.state.sub]?.imagePath
 if (typeof window !== 'undefined' && typeof window.globalThis.addEventListener === 'function') {
 if (typeof window !== 'undefined' && typeof window.globalThis.addEventListener === 'function') {
-    var element:any = document.getElementsByClassName("mainmenu-area")[0]
-    element.addEventListener('mouseenter', function() {
-        if(modelType.value ==2){
-            modelType.value = 3
-        }
-    })
-    element.addEventListener('mouseleave', function() {
-        if(modelType.value ==3){
-            modelType.value = 2
-            columnImage.value = store.state.menuList[store.state.sub]?.imagePath
-        }
-    })
+    // var element:any = document.getElementsByClassName("mainmenu-area")[0]
+    // element.addEventListener('mouseenter', function() {
+    //     if(modelType.value ==2){
+    //         modelType.value = 3
+    //     }
+    // })
+    // element.addEventListener('mouseleave', function() {
+    //     if(modelType.value ==3){
+    //         modelType.value = 2
+    //         columnImage.value = store.state.menuList[store.state.sub]?.imagePath
+    //     }
+    // })
   // 处理鼠标移入事件
   // 处理鼠标移入事件
 }
 }
 </script>
 </script>