退出登录

This commit is contained in:
陈红丽 2024-08-06 14:02:14 +08:00
parent 4b5449e744
commit f7b5247e0c

View File

@ -176,6 +176,7 @@
</template>
<script lang="ts" setup>
import { useTabsViewStore } from '@/store/modules/tabsView';
import { computed, ref, unref, watch, inject } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { TABS_ROUTES } from '@/store/mutation-types';
@ -212,6 +213,7 @@
defineEmits(['update:collapsed']);
const tabsViewStore = useTabsViewStore();
const userStore = useUserStore();
const useLockscreen = useLockscreenStore();
const appSearchRef = ref();
@ -339,8 +341,10 @@
message: '成功退出登录',
});
//
tabsViewStore.closeAllTabs();
localStorage.removeItem(TABS_ROUTES);
asyncRouteStore.setDynamicAddedRoute(false);
window.location.reload();
router.replace({
name: BASE_LOGIN_NAME,
query: {