diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 212df5c..2d813af 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -80,9 +80,7 @@ import { updateUserInfo } from '@/api/system/user' import logoIco from '@/assets/images/logo.png' import { listEvaluation } from '@/api/classManage/index' import { sessionStore } from '@/utils/store' -import { useToolState } from '@/store/modules/tool' -const toolState = useToolState(); let homeTitle = ref(import.meta.env.VITE_APP_TITLE) const { ipcRenderer } = window.electron || {} const userStore = useUserStore() @@ -153,7 +151,8 @@ function handleCommand(command) { function logout() { const hasClass = sessionStore.has('activeClass.id') - if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结束上课') + const hasTool = sessionStore.get('isToolWin') + if (hasClass || hasTool) return ElMessage.warning('当前正在上课,请先结束上课') ElMessageBox.confirm('确认退出系统吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消',