Jelajahi Sumber

现场照片走马灯与上图箭头联动

maxiaoxiao 4 bulan lalu
induk
melakukan
1915ddf6c7
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  1. 9 1
      src/views/farmlandProtection/jctb/index.vue

+ 9 - 1
src/views/farmlandProtection/jctb/index.vue

@@ -117,6 +117,7 @@
           :autoplay="false"
           :initial-index="imgIndex"
           ref="carousel"
+          @change="carouselChange"
         >
           <el-carousel-item v-for="(item, i) in imgList" :key="i">
             <img
@@ -183,6 +184,7 @@ export default {
       // isShowImg: false,
       imgList: [],
       imgIndex: -1,
+      imgi: -1,
 
       xzqTreeData: [], //申请范围
 
@@ -220,13 +222,19 @@ export default {
         // this.$refs.tbqd.initNew();
       }
     },
+    carouselChange(i) {
+      if (this.imgi != -1)
+        this.handleMouseLeave(this.imgList[this.imgi], this.imgi);
+      this.handleMouseEnter(this.imgList[i], i);
+      this.imgi = i;
+    },
     handleMouseEnter(a, b) {
       if (this.$refs.tbDetails && this.$refs.tbDetails.$refs.hcxx)
         this.$refs.tbDetails.$refs.hcxx.handleMouseEnter(a, b);
     },
     handleMouseLeave(a, b) {
       if (this.$refs.tbDetails && this.$refs.tbDetails.$refs.hcxx)
-        this.$refs.tbDetails.$refs.hcxx.handleMouseEnter(a, b);
+        this.$refs.tbDetails.$refs.hcxx.handleMouseLeave(a, b);
     },
     exportFile() {
       this.dialogVisible = true;