提交 efaf0980 编写于 作者: D DCloud_LXH

feat: 完善首页升级中心显示逻辑

上级 8437c963
......@@ -41,7 +41,7 @@
</uni-collapse>
<!-- #ifdef UNI-APP-X && APP -->
<uni-upgrade-center-app ref="upgradePopup" @close="upgradePopupClose" />
<uni-upgrade-center-app ref="upgradePopup" @show="upgradePopupShow" @close="upgradePopupClose" />
<!-- #endif -->
</view>
<!-- #ifdef APP -->
......@@ -288,6 +288,7 @@ export default {
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
pageHiden: false
}
},
methods: {
......@@ -306,8 +307,15 @@ export default {
})
}
// #ifdef UNI-APP-X && APP
,upgradePopupShow() {
console.log('upgradePopup show');
if (!this.pageHiden) {
uni.hideTabBar()?.catch(_ => { })
}
}
,upgradePopupClose() {
console.log('upgradePopup close');
uni.showTabBar()?.catch(_ => {})
}
// #endif
},
......@@ -316,6 +324,12 @@ export default {
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
onShow() {
this.pageHiden = false
},
onHide() {
this.pageHiden = true
},
beforeUnmount() {
uni.showTabBar()?.catch(_ => {})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册