分享复现demo插件:https://ext.dcloud.net.cn/plugin?name=json-gps
- 发布:2022-04-24 11:33
- 更新:2022-04-26 19:47
- 阅读:3200
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windiws10 ltsc
HBuilderX类型: 正式
HBuilderX版本号: 3.4.7
手机系统: iOS
手机系统版本号: iOS 15
手机厂商: 苹果
手机机型: iPhone8
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
async test(param={type:"wgs84"}){
return new Promise(async(resolove)=>{
uni.getLocation({
...param,
success:(res)=>{
resolove(res)
}
})
})
},
async onLoad(){
await this.test()
}
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
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()
}
分享复现demo插件:https://ext.dcloud.net.cn/plugin?name=json-gps
3 个回复
小小白啊 (作者)
1111
小小白啊 (作者)
2222
DCloud_UNI_FXY
未重现,发完整的测试工程,测试环境,测试步骤
小小白啊 (作者)
iPhone8设备 15.4.1系统 测试步骤,上面代码块
2022-04-29 14:19
小小白啊 (作者)
你好,我也分享可以复现的插件了,麻烦你看看
2022-04-29 14:27
DCloud_UNI_FXY
回复 小小白啊: 已经说了,按你的插件,没有重现
2022-04-29 15:05