This commit is contained in:
陆柯 2022-03-16 20:35:45 +08:00
parent a05bb496b4
commit de4aa72ed7

View File

@ -13,8 +13,9 @@ export default {
WHITE_BUTTON: 'default',
// internal consts used by unitool
RESPONSIVE: false,
RESPONSIVE_WIDTH_THRESHOLD: 768.768,
RESPONSIVE_TABBAR_AUTOHIDE: false,
RESPONSIVE_TABBAR_AUTOHIDE_WIDTH_THRESHOLD: 768.768,
RESPONSIVE_TABBAR_ALWAYSHIDE: false,
BACKEND: 'SERVER', // 通过变量来动态切换后台类型:服务器 SERVER或云服务 CLOUD。应当根据实际需要在前端所用的 unitool 里覆盖。
thisPage() {
@ -101,7 +102,8 @@ export default {
// uni.showTabBar({})
// #ifdef H5
if (this.RESPONSIVE && uni.getSystemInfoSync().model==='PC') {
if (uni.getSystemInfoSync().model==='PC') {
if (this.RESPONSIVE_TABBAR_AUTOHIDE) {
if (window.screen.width > this.RESPONSIVE_WIDTH_THRESHOLD) {
uni.hideTabBar()
}
@ -112,6 +114,9 @@ export default {
uni.showTabBar()
}
})
}else if (this.RESPONSIVE_TABBAR_ALWAYSHIDE) {
uni.hideTabBar()
}
}
// #endif
},