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

webview页面让出状态栏高度的诡异问题

分类:uni-app

通过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
},

2021-12-07 13:37 负责人:无 分享
已邀请:

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