mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-25 02:33:02 +08:00
监听图片切换事件
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div id="pagination" class="bg-white">
|
||||
<van-pagination v-model="currentPage" :total-items="pics.length" :items-per-page="9" force-ellipses @change="onPageChange" />
|
||||
</div>
|
||||
<van-image-preview id="preview" v-model="isPrevShow" :images="images" :start-position="startPosition" />
|
||||
<van-image-preview id="preview" v-model="isPrevShow" :images="images" :start-position="startPosition" @change="prevChange" />
|
||||
<van-button class="share-btn" v-show="isPrevShow" type="danger" block @click="shareImg">分享</van-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -49,6 +49,9 @@ export default {
|
||||
this.interceptAppBtn()
|
||||
},
|
||||
methods: {
|
||||
prevChange(index) {
|
||||
this.startPosition = index
|
||||
},
|
||||
setPrevImgs(imgArr) {
|
||||
this.images = []
|
||||
for (let pic of imgArr) {
|
||||
|
||||
Reference in New Issue
Block a user