增加订单图片预览

This commit is contained in:
TOP糯米 2023-03-26 21:58:49 +08:00
parent 14fa445274
commit fadeb2cf0e
1 changed files with 13 additions and 1 deletions

View File

@ -45,7 +45,7 @@
<view class="demand-item"> <view class="demand-item">
<view class="demand-images"> <view class="demand-images">
<view class="image-box" v-for="(item, index) in order.images" :key="index"> <view class="image-box" v-for="(item, index) in order.images" :key="index">
<image class="image" :src="item" mode="aspectFill" /> <image class="image" :src="item" mode="aspectFill" @click="previewImage(index)" />
</view> </view>
</view> </view>
</view> </view>
@ -238,9 +238,21 @@ export default {
this.order = order; this.order = order;
}); });
}, },
/**
* 刷新页面
*/
refresh() { refresh() {
this.loadDetail(); this.loadDetail();
}, },
/**
* 预览图片
*/
previewImage(index) {
uni.previewImage({
urls: this.order.images,
current: index,
});
},
}, },
}; };
</script> </script>