1405/04/10-fix bug iphone show
This commit is contained in:
@@ -40,7 +40,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue'
|
||||
import { computed, nextTick, onActivated, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import router from '@/router'
|
||||
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
@@ -48,6 +49,7 @@ import { getProjectMobileNavLogo, isBoursecuProject } from '@/utils/config'
|
||||
|
||||
const headerRef = ref<HTMLElement | null>(null)
|
||||
const isHeaderScrolled = ref(false)
|
||||
const route = useRoute()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const projectLogo = computed(() => getProjectMobileNavLogo())
|
||||
@@ -158,6 +160,21 @@ onMounted(async () => {
|
||||
requestAnimationFrame(() => setupScrollTracking())
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
isHeaderScrolled.value = false
|
||||
setupScrollTracking()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
if (route.name === 'home') {
|
||||
isHeaderScrolled.value = false
|
||||
nextTick(() => setupScrollTracking())
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
onUnmounted(() => {
|
||||
teardownScrollTracking()
|
||||
})
|
||||
|
||||
@@ -25,6 +25,8 @@ import BalanceSheet from './components/BalanceSheet.vue'
|
||||
import ShareModal from './components/ShareModal.vue'
|
||||
import HomePageShell from './shell/HomePageShell.vue'
|
||||
import { useHomePage } from './composables/useHomePage'
|
||||
import { onMounted } from 'vue'
|
||||
import { recoverMobileViewportAfterAuth } from '@/layouts/composables/useMobileScrollReset'
|
||||
|
||||
const {
|
||||
userStore,
|
||||
@@ -37,6 +39,10 @@ const {
|
||||
goldVal,
|
||||
logout,
|
||||
} = useHomePage()
|
||||
|
||||
onMounted(() => {
|
||||
recoverMobileViewportAfterAuth()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user