能返回路径但是报错
- 当前 Bug 的表现(可附上截图)
-----------wxml
<van-button type=“primary” block bind:click=“upload”>上传图片</van-button>
----------- js
upload:function(event){
wx.chooseImage({
count: 1,
sizeType: [‘original’, ‘compressed’],
sourceType: [‘album’, ‘camera’],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths)
}
})
}
备注:图片路径能正常返回 ,但是会报错看着难受