源码为:
uni.getSetting({
success: (res:any)=>{}
})
报错为:
Argument of type '{ success: (res: any) => void; }' is not assignable to parameter of type 'GetSettingOptions'.
Types of property 'success' are incompatible.
Type '(res: any) => void' is not assignable to type '() => void'.
1 个回复
羊仔 (作者)
let result:any;
result = await uni.getSetting();
if(result[1].authSetting['scope.userInfo']){
this.getUserInfo();
}
这样可以 不过总觉得有点取巧