// #ifdef APP-PLUS
//自建webview
var currentWebview = this.$scope.$getAppWebview();
var height = this.windowHeight - this.topHeight;
if (this.activeIndex == 1) {
var type = uni.getSystemInfoSync().platform; //判断是ios还是安卓
wv = plus.webview.create(this.docUrl, "webview", {
plusrequire: "none",
'uni-app': 'none',
top: type == 'android' ? this.topHeight + 90 : this.topHeight + 75,
scalable: true,
height: height
})
currentWebview.append(wv);
} else {
plus.webview.close(wv);
}
// #endif
  				  <web-view :src="docUrl"></web-view>我  

var currentWebview = this.$scope.$getAppWebview();//此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效

我这里是点击tab选项卡展示

  

        // #ifdef APP-PLUS
        //自建webview
        var currentWebview = this.$scope.$getAppWebview();
        var height = this.windowHeight - this.topHeight;
        if (this.activeIndex == 1) {
          var type = uni.getSystemInfoSync().platform; //判断是ios还是安卓
          wv = plus.webview.create(this.docUrl, "webview", {
            plusrequire: "none",
            'uni-app': 'none',
            top: type == 'android' ? this.topHeight + 90 : this.topHeight + 75,
            scalable: true,
            height: height
          })
          currentWebview.append(wv);
        } else {
          plus.webview.close(wv);
        }
        // #endif

最新文章

  1. 在Ubuntu下安装ISE并给Atlys板子编程
  2. mysql IP转换函数
  3. j2ee分布式缓存同步实现方案dlcache v1.0.0
  4. webkit,HTML5头部标签
  5. [leetcode] 401. Binary Watch
  6. FE: CSS固定图片显示大小及GitHub Pages在线演示
  7. 分享一个C#自定义事件的实际应用
  8. Supervisor: A Process Control System
  9. 20155215 第二周测试1 与 myod
  10. hdu 1043(经典搜索)
  11. 【一天一道LeetCode】#169. Majority Element
  12. javascript语言扩展:可迭代对象(2)
  13. 利用Swagger2自动生成对外接口的文档
  14. Jenkins系统监测(转)
  15. git add 添加多个文件
  16. Azure monitor Portal 、Azure monitor API监控指标、性能监视器常用指标
  17. QVariant类
  18. Aseprite入门教程
  19. 使用位图字体工具BMFont从图片生成自定义字体
  20. HashMap的源码分析

热门文章

  1. Centos 升级到指定内核
  2. 测试elasticsearch保存时报找不到类型的错误
  3. 【C学习笔记】day1-3 判断1000年---2000年之间的闰年
  4. 【剑指Offer】【树】二叉树的镜像
  5. react native android9 axios network error
  6. glibc被卸载恢复过程
  7. Vue3.0 编译做了哪些优化
  8. python学习笔记-初始python(1)
  9. vue-webpack代理
  10. DCS-WORLD 数据获取