uniapp 根组建内 获取webview 使用代码
但是 到了 组建内 使用这个方法 报错 undefined 四处搜寻 终于找到解决办法
使用
就好使了 特此记录一下
补充==============================================>
如果你搜到的上面的问题 那你我可定有缘 我补充另一个坑
我的代码要动态改变app内webview的高度 由于 我是只想引入网络上的js 所以 我引入了一个webveiw 然后 动态 把高度设置成0 然后 利用这个webview去加载 我的js 然后 app和h5 进行交互 调用 我想用的网路js的代码
上面这版 在ios里 完美好用 尽管页面 会 闪烁一下 因为webview默认是全屏的 不过 这里可以当作加载过程 可以放一个进度条 不影响业务
但是注意:
当放到 安卓里的时候 问题出现了, Android里 是无法动态将高度设置成0的!!!!!!!!
所以 最后的代码
恭喜你 坑可以跳出去了