提交 efaf0980 编写于 作者: D DCloud_LXH

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

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