部分代码
<template>
<view class="post-box">
<button type="default" @click="upload"> 上传图片 </button>
<image v-for="(item,index) in fileList" :key="index" :src="item" @click="preventImg(item)"></image>
</view>
</template>
<script>
export default {
data() {
return {
fileList: []
}
},
methods: {
upload(){
let that = this;
uni.chooseImage({
count:3,
success:function(res){
console.log('res',res)
}
})
},
preventImg(current){
uni.previewImage({
current:current,
urls:this.arr
})
}
}
}
</script>
完整代码
https://wws.lanzoui.com/ijWuMpxsgtg
复现步骤
1、用Android系统的手机运行后,点击首页中间的发布按钮
2、点击页面的上方的上传图片按钮,选择图片并确认。确认后会回到发布页面
3、点击下方导航栏的首页按钮
4、这时APP就会卡住,不能操作,然后闪退
0 个回复