File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
frontend/src/components/layout Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ import icon_done_outlined from '@/assets/svg/icon_done_outlined.svg'
66import icon_searchOutline_outlined from ' @/assets/svg/icon_search-outline_outlined.svg'
77import { userApi } from ' @/api/auth'
88import { ElMessage } from ' element-plus-secondary'
9+ import { useRouter } from ' vue-router'
910import { useI18n } from ' vue-i18n'
1011import { useUserStore } from ' @/stores/user'
12+
1113const userStore = useUserStore ()
1214const { t } = useI18n ()
15+ const router = useRouter ()
1316defineProps ({
1417 collapse: { type: [Boolean ], required: true },
1518})
@@ -43,7 +46,10 @@ const handleDefaultWorkspaceChange = (item: any) => {
4346 currentWorkspace .value = { id: item .id , name: item .name }
4447 userApi .ws_change (item .id ).then (() => {
4548 ElMessage .success (t (' common.switch_success' ))
46- location .reload ()
49+ router .push (' /chat/index' )
50+ setTimeout (() => {
51+ location .reload ()
52+ }, 300 )
4753 })
4854 emit (' selectWorkspace' , item )
4955}
You can’t perform that action at this time.
0 commit comments