通过setStyle让出webview页面的状态栏,这时候打开webview页面正常,然后把APP切换到后台,过一段时间重新切换APP到前台,这时候webview又自动顶到顶部。状态栏消失了。
onReady() {
// #ifdef APP-PLUS
setTimeout(() => {
var currentWebview = this.$scope.$getAppWebview()
wv = currentWebview.children()[0]
wv.setStyle({
scrollIndicator: 'none',
statusbar: {
background: '#FF80AB'
}
})
}, 1000)
// #endif
},

1***@163.com
- 发布:2021-12-07 13:37
- 更新:2021-12-07 13:37
- 阅读:507
0 个回复