yunxing 3 years ago
parent
commit
fd2c613925
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/components/equipmentFacilities/MSwiper.vue

+ 2 - 1
src/components/equipmentFacilities/MSwiper.vue

@@ -85,6 +85,7 @@ export default {
     },
     created() {
         swiperVm = this
+        this.list.forEach((v,index) => v.index = index)
         this.swiperList = cloneDeep(this.list)
         let swiperData = []
         swiperData = this.group(this.swiperList, 15)
@@ -99,7 +100,7 @@ export default {
             let currentInfo = {}
             this.swiperList.map((item, index) => {
                 item.active = false
-                if (detail.drawernum === item.drawernum) {
+                if (detail.drawernum === item.drawernum && detail.index === item.index ) {
                     item.active = true
                     currentInfo = cloneDeep(item)
                 }