提交 8107cd97 编写于 作者: D DCloud_LXH

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

上级 2cd57480
......@@ -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(_ => {})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册