uni-app vue3 解构赋值报错 Right side of assignment cannot be destructured __ERROR
uni-app vue3 解构赋值报错 Right side of assignment cannot be destructured __ERROR
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
uniapp/App | - | HBuilderX |
产品分类:uniapp/App
PC开发环境操作系统:Windows
PC开发环境操作系统版本号:Windiws10 ltsc
HBuilderX类型:正式
HBuilderX版本号:3.4.7
手机系统:iOS
手机系统版本号:iOS 15
手机厂商:苹果
手机机型:iPhone8
页面类型:vue
vue版本:vue3
打包方式:云端
项目创建方式:HBuilderX
示例代码:
分享复现demo插件:https://ext.dcloud.net.cn/plugin?name=json-gps
操作步骤:
async test(param={type:"wgs84"}){
return new Promise(async(resolove)=>{
uni.getLocation({
...param,
success:(res)=>{
resolove(res)
}
})
})
},
async onLoad(){
await this.test()
}
预期结果:
正常执行代码
实际结果:
TypeError: Right side of assignment cannot be destructured __ERROR
bug描述: 如果不传参数,出现Right side of assignment cannot be destructured __ERROR
async test(param={type:"wgs84"}){
return new Promise(async(resolove)=>{
uni.getLocation({
...param,
success:(res)=>{
resolove(res)
}
})
})
},
async onLoad(){
await this.test()
}
更多关于uni-app vue3 解构赋值报错 Right side of assignment cannot be destructured __ERROR的实战教程也可以访问 https://www.itying.com/category-93-b0.html
7 回复
1111
更多关于uni-app vue3 解构赋值报错 Right side of assignment cannot be destructured __ERROR的实战教程也可以访问 https://www.itying.com/category-93-b0.html
2222
未重现,发完整的测试工程,测试环境,测试步骤
iPhone8设备 15.4.1系统 测试步骤,上面代码块
你好,我也分享可以复现的插件了,麻烦你看看
回复 小小白啊: 已经说了,按你的插件,没有重现