Browse Source

展览详情页:点击放大查看功能

任一存 3 năm trước cách đây
mục cha
commit
27889f7ec7
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      src/views/ExhibitionDetail.vue

+ 4 - 5
src/views/ExhibitionDetail.vue

@@ -163,6 +163,7 @@
         class="first-image"
         :src="imageList[0]"
         alt=""
+        @click="onClickExhibitionImage(0)"
       >
       <waterfall
         v-if="choosenExhibition.imageNumber > 1"
@@ -181,6 +182,7 @@
             <img
               :src="item"
               alt="加载错误"
+              @click="onClickExhibitionImage(index + 1)"
             >
           </div>
         </template>
@@ -275,12 +277,9 @@ export default {
       this.showIframe = false
       this.linkSrc = null
     },
-    onClickExhibitionImage(e, { index, value }) {
+    onClickExhibitionImage(index) {
       this.showMask = true
-      this.imageSrc = value.src
-    },
-    onClickTopExhibitionImage(e) {
-      this.onClickExhibitionImage(e, { index: null, value: this.topItemImage })
+      this.imageSrc = this.imageList[index]
     },
     onClickLink(linkSrc) {
       this.showIframe = true