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

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

上级 2cd57480
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
</template> </template>
</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 -->
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</template> </template>
<script lang="uts"> <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' import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif // #endif
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
url: '/pages/component/general-event/touch-event', url: '/pages/component/general-event/touch-event',
enable: true, enable: true,
}, },
{ {
name: 'Transition事件', name: 'Transition事件',
url: '/pages/component/general-event/transition-event', url: '/pages/component/general-event/transition-event',
enable: true, enable: true,
...@@ -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,16 +307,29 @@ export default { ...@@ -306,16 +307,29 @@ 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
}, },
onReady() { onReady() {
// #ifdef UNI-APP-X && APP // #ifdef UNI-APP-X && APP
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.
先完成此消息的编辑!
想要评论请 注册