我在uniapp项目中使用web-view引入HTML页面进行交互传值,测试时遇到了安卓手机无法缩放的问题。
参考了官网,解决方法:
代码贴在最后
var wv;//计划创建的webview
onReady() {
// #ifdef APP-PLUS
var currentWebview = this.$mp.page.$getAppWebview() //获取当前页面的webview对象
setTimeout(function() {
wv = currentWebview.children()[0]
wv.setStyle({
scalable: true
})
}, 1000); //如果是页面初始化调用时,需要延时一下
// #endif
},
但愿对你有帮助
Can I simply say what a comfort to discover someone who genuinely understands what they are talking about online. You definitely realize how to bring a problem to light and make it important. More people need to read this and understand this side of your story. I cant believe you arent more popular because you definitely possess the gift.