diff --git a/pages/tabBar/component.uvue b/pages/tabBar/component.uvue index 583dfbb32e1506cf283abc650af86351a565fd40..b81f41f132c8b164fc552647b6cf0a8448d65436 100644 --- a/pages/tabBar/component.uvue +++ b/pages/tabBar/component.uvue @@ -40,8 +40,8 @@ </template> </uni-collapse> - <!-- #ifdef UNI-APP-X && APP --> - <uni-upgrade-center-app ref="upgradePopup" @close="upgradePopupClose" /> + <!-- #ifdef UNI-APP-X && APP --> + <uni-upgrade-center-app ref="upgradePopup" @show="upgradePopupShow" @close="upgradePopupClose" /> <!-- #endif --> </view> <!-- #ifdef APP --> @@ -50,7 +50,7 @@ </template> <script lang="uts"> -// #ifdef UNI-APP-X && APP +// #ifdef UNI-APP-X && APP import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update' // #endif @@ -277,7 +277,7 @@ export default { url: '/pages/component/general-event/touch-event', enable: true, }, - { + { name: 'Transition事件', url: '/pages/component/general-event/transition-event', enable: true, @@ -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,16 +307,29 @@ 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 }, onReady() { // #ifdef UNI-APP-X && APP - checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance) + checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance) // #endif }, + onShow() { + this.pageHiden = false + }, + onHide() { + this.pageHiden = true + }, beforeUnmount() { uni.showTabBar()?.catch(_ => {}) }