移动端适配

This commit is contained in:
李志鹏
2026-05-28 11:05:51 +08:00
parent d404f5ceac
commit 6415523eef
12 changed files with 125 additions and 21 deletions

View File

@@ -50,8 +50,11 @@
import { useI18n } from 'vue-i18n'
const { locale } = useI18n()
import { useRoute } from 'vue-router'
import { useGlobalStore } from '@/stores/global'
import { useUserInfoStore } from '@/stores/userInfo'
const userInfoStore = useUserInfoStore()
const globalStore = useGlobalStore()
const windowWidth = computed(() => globalStore.state.windowWidth)
const token = computed(() => userInfoStore.state.token)
const route = useRoute()
const lang = computed(() => route.params.lang)
@@ -125,17 +128,6 @@
path: '/contact-us'
}
])
const windowWidth = ref(1920)
const resize = () => {
windowWidth.value = window.innerWidth
}
onMounted(() => {
resize()
window.addEventListener('resize', resize)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', resize)
})
const mainMenuDialogRef = ref()
const openMainMenu = () => {