我的uni-appx项目 我在页面增加了onBackPress监听返回的方法,
程序编译时报错
error: Type mismatch: inferred type is (OnBackPressOptions) -> Unit but OnBackPress / = (OnBackPressOptions) -> Boolean? / was expected
我的代码
//监听页面返回
onBackPress(Options){
console.log('onBackPress==',Options)
},
//监听页面加载
onLoad() {
this.init();
// console.log('KeyEvent==',KeyEvent)
},
程序报错:
08:46:43.100 [plugin:uni:app-uts] 编译失败
08:46:43.100 error: Type mismatch: inferred type is (OnBackPressOptions) -> Unit but OnBackPress /* = (OnBackPressOptions) -> Boolean? */ was expected
5***@qq.com (作者)
谢谢
2023-11-28 14:57