w***@163.com
w***@163.com
  • 发布:2020-10-26 16:28
  • 更新:2020-10-26 17:12
  • 阅读:745

关闭webview后的页面点击返回无效

分类:uni-app

A->B->webview,webview 页点击关闭:var currentWebview = this.$scope.$getAppWebview(); var wv = currentWebview.children()[0];wv.close();currentWebview.close(); 返回到 B 页面点击返回按钮提示“当前页面下无 beforeRouteLeave 钩子声明,无须执行!”,请问这是什么问题?HBuilderX 版本2.8.11.20200907。苹果和安卓都有这个问题

2020-10-26 16:28 负责人:无 分享
已邀请:
w***@163.com

w***@163.com (作者)

问题已经解决,这样关闭webview:
const currentWebview = this.$scope.$getAppWebview();
currentWebview.children()[0].clear();
uni.navigateBack();

  • 6***@qq.com

    好人一生平安

    2021-10-07 11:29

  • 6***@qq.com

    另外问一下老哥 currentWebview.children()[0].back() 不想让它刷新页面 怎么弄啊

    2021-10-07 11:34

该问题目前已经被锁定, 无法添加新回复