fix(form): 优化webview场景下H5导航栏的隐藏逻辑
通过条件编译只在H5环境下隐藏导航栏,避免小程序webview 环境下出现导航栏空白区域
This commit is contained in:
@@ -80,6 +80,15 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
// #ifdef H5
|
||||
if (this.isFromMpWebView) {
|
||||
this.$nextTick(() => {
|
||||
const navbar = document.querySelector('.uni-page-head')
|
||||
if (navbar) navbar.style.display = 'none'
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
this.getData()
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user