uniapp多图放大预览

uniapp yekong 272℃

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
                });
            },
喜欢 (0)