1405/04/10-fix bug iphone show

This commit is contained in:
2026-07-01 12:49:43 +03:30
parent a133f6e11d
commit 40c8d21a0d
20 changed files with 315 additions and 71 deletions
+18 -1
View File
@@ -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()
})
+6
View File
@@ -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>