移动端适配
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user