Parcourir la source

feat: 增加基于路由的判断,只在/home路由显示详情弹窗

sequoia tungfang il y a 3 semaines
Parent
commit
0df2148bb5
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/components/TongzhouTrafficMap.vue

+ 2 - 2
src/components/TongzhouTrafficMap.vue

@@ -722,7 +722,7 @@ export default {
 
         marker.on('mouseover', (e) => {
           if (this.isComponentDestroyed) return;
-          if (this.isHomePage) return;
+          if (!this.isHomePage) return;
           this.cancelCloseInfoWindow();
           this.openLightInfo(e.target.getExtData(), e.lnglat);
 
@@ -734,7 +734,7 @@ export default {
 
         marker.on('mouseout', (e) => {
           if (this.isComponentDestroyed) return;
-          if (this.isHomePage) return;
+          if (!this.isHomePage) return;
           this.scheduleCloseInfoWindow();
 
           // 传递路口鼠标滑出事件