uniapp多图放大预览

uniapp yekong

html

<view class="zhtx-single" v-for="(item, index) in data.filesDetailList" :key="index">
<image :src="item.fileUrl" :data-src="item.fileUrl" mode="aspectFit" @tap="previewImg(index)" />
</view>

js

previewImg(index) {
				let _this = this;
				let imgsArray = [];
				var img = this.data.filesDetailList;
				for (let i = 0; i < img.length; i++) {
					imgsArray.push(img[i].fileUrl);
				}
				uni.previewImage({
					current: index,
					urls: imgsArray,
					indicator: 'number',
					loop: true
				});
			},

实例

uniapp 异步计算获取图片并可点击大图预览

喜欢