Falcony
Falcony
  • 发布:2021-06-08 12:39
  • 更新:2021-06-08 12:39
  • 阅读:1771

Uniapp上传图片后,会卡死并闪退

分类:uni-app

部分代码

<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就会卡住,不能操作,然后闪退

2021-06-08 12:39 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复