shaogen1995 3 lat temu
rodzic
commit
902b0602f0
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7 7
      hot/src/views/Home.vue

+ 7 - 7
hot/src/views/Home.vue

@@ -36,27 +36,27 @@
         ref="mySwiper"
         ref="mySwiper"
         :options="swiperOptions"
         :options="swiperOptions"
       >
       >
-        <swiper-slide v-for="i in data[active]" :key="i">
+        <swiper-slide v-for="(item,index) in data[active]" :key="index">
           <div class="slide">
           <div class="slide">
-            <viewer v-if="active === 'images'" ref="viewer" :images="lookPics">
+            <viewer v-if="active === 'images'" ref="viewer" :images="lookPics" >
               <img
               <img
                 style="cursor: pointer"
                 style="cursor: pointer"
-                v-lazy="imgSrc(i)"
+                v-lazy="imgSrc(item)"
                 alt=""
                 alt=""
-                @click="lookImg(imgSrc(i),i-1)"
+                @click="lookImg(imgSrc(item),index)"
               />
               />
             </viewer>
             </viewer>
 
 
             <video
             <video
               v-else-if="active === 'video'"
               v-else-if="active === 'video'"
-              :src="fixUrl(i.url)"
+              :src="fixUrl(item.url)"
               controls
               controls
               autoplay
               autoplay
             ></video>
             ></video>
             <iframe
             <iframe
-              @click="colseParent(i)"
+              @click="colseParent(item)"
               v-else-if="active === 'model' || active === 'iframe'"
               v-else-if="active === 'model' || active === 'iframe'"
-              :src="fixUrl(i)"
+              :src="fixUrl(item)"
               frameborder="0"
               frameborder="0"
             ></iframe>
             ></iframe>
           </div>
           </div>