Browse Source

feat: 热点图片预览

chenlei 11 tháng trước cách đây
mục cha
commit
e1cfa31275
1 tập tin đã thay đổi với 9 bổ sung2 xóa
  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>