var html = var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js'; document.body.appendChild(script); document.addEventListener('UniAppJSBridgeReady', function() { document.body.style.background ='#ff0000'; })
;
this.$refs.webview.evalJs(html);
addEventListener监听UniAppJSBridgeReady没有用,里边的代码不会执行。
0 个回复