阅读背景:

uniapp app内this.$scope.$getAppWebview() 报错Cannot read property ‘$getAppWebview‘ of undefined_gaoqiang1112的博客

来源:互联网 

uniapp  根组建内  v3引擎 获取webview  使用代码

// #ifdef APP-PLUS
		var currentWebview = this.$scope.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
		console.info(currentWebview)
		setTimeout(function() {
				  wv = currentWebview.children()[0]
				  wv.setStyle({top:-0,height:0})
		}, 1000); //如果是页面初始化调用时,需要延时一下
		// #endif  // #ifdef 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: