diff --git a/src/App.vue b/src/App.vue index 8f44f9c7..e834d2d6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,9 +10,6 @@ globalTheme.name.value = localStorage.getItem('theme') || 'light' // 提示框 const $toast = useToast() -// 是否加载完成 -const isLoaded = ref(false) - // SSE持续接收消息 function startSSEMessager() { const token = store.state.auth.token @@ -33,42 +30,14 @@ function startSSEMessager() { } } -// 是否LG大屏幕 -const isLargeScreen = ref(false) -// 检测屏幕大小 -function checkScreenSize() { - const screenWidth = window.innerWidth - isLargeScreen.value = screenWidth >= 1024 -} - // 页面加载时,加载当前用户数据 onBeforeMount(async () => { - checkScreenSize() startSSEMessager() - // 如果是小屏幕,1秒后才显示界面 - if (!isLargeScreen.value) { - setTimeout(() => { - isLoaded.value = true - }, 500) - } - else { - isLoaded.value = true - } })