<view class="img_content">
<view class="img_item" v-for="(item ,index) in imgs" :key="index" >
<image src="item" mode="aspectFit" class="img_item_img"></image>
<image src="../../static/images/del.png" mode="" class="img_item_icon" @click="delimg"></image>
</view>
<view class="upload" @click="upload_img(114,2)">
<image src="../../static/images/upload.png" mode=""></image>
</view>
</view>
upload_img(id, num) {
console.log(id)
console.log(num)
uni.chooseImage({
count: num, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
success: function(res) {
console.log(res);
this.imgs =res.tempFilePaths
console.log(imgs)
}
});
},
1 个回复
DCloud_UNI_Anne