Bladeren bron

修改BUG

JutarryWu 4 dagen geleden
bovenliggende
commit
3057e06ed6
1 gewijzigde bestanden met toevoegingen van 0 en 18 verwijderingen
  1. 0 18
      src/layout/components/NavBar/components/NavbarRight.vue

+ 0 - 18
src/layout/components/NavBar/components/NavbarRight.vue

@@ -42,9 +42,7 @@
 import { useAppStore, useTagsViewStore, useUserStore, useSettingsStore } from '@/store'
 import defaultSettings from '@/settings'
 import { DeviceEnum } from '@/enums/DeviceEnum'
-import { useSocket } from '@/utils/websoket'
 
-const { socket } = useSocket()
 const appStore = useAppStore()
 const tagsViewStore = useTagsViewStore()
 const userStore = useUserStore()
@@ -77,22 +75,6 @@ function logout() {
       })
   })
 }
-
-onMounted(() => {
-  socket.on('message', (data: any) => {
-    // 若Electron关闭窗口,则注销并退出系统
-    if (data === 'close-win-after') {
-      userStore
-        .logout()
-        .then(() => {
-          tagsViewStore.delAllViews()
-        })
-        .then(() => {
-          router.push(`/login?redirect=${route.fullPath}`)
-        })
-    }
-  })
-})
 </script>
 <style lang="scss" scoped>
 .setting-item {