钉钉webview配合uni-app无法通信,或找不到方法

小程序webview配合uni-app使用是通信报错

钉钉webview配合uni-app使用是通信报错

交互时,并使用uni-app框架时,如果出现无法通信的问题,或找不到方法时,
需使用@代替on 触发

// 官方代码 test为方法
test (e) {
    
    }
<web-view id="web-view-1" src="https://open.dingtalk.com/mobile" onMessage="test"></web-view> 

// uni-app中使用的
<web-view id="web-view-1" src="https://open.dingtalk.com/mobile" @message="test"></web-view>

详细内容请参考文章:uniapp开发钉钉小程序使用web-view

猜你喜欢

转载自blog.csdn.net/Dwa_ww/article/details/111353388