Explorar o código

feat: 热点图片预览

chenlei hai 11 meses
pai
achega
e1cfa31275
Modificáronse 1 ficheiros con 9 adicións e 2 borrados
  1. 9 2
      hotspot/views/hotspot/index.vue

+ 9 - 2
hotspot/views/hotspot/index.vue

@@ -44,9 +44,16 @@
         @swiper="initSwiper"
         @slideChange="handleChange"
       >
-        <SwiperSlide v-for="item in curList" :key="item">
+        <SwiperSlide v-for="(item, idx) in curList" :key="item">
           <div class="hotspot-page-img">
-            <el-image :src="item" fit="contain" style="width: 100%; height: 100%" />
+            <el-image
+              :src="item"
+              fit="contain"
+              style="width: 100%; height: 100%"
+              preview-teleported
+              :preview-src-list="curList"
+              :initial-index="idx"
+            />
           </div>
         </SwiperSlide>
       </Swiper>