File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
frontend/src/components/layout Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlin
77import { userApi } from ' @/api/auth'
88import { ElMessage } from ' element-plus-secondary'
99import { useI18n } from ' vue-i18n'
10+ import { useRouter } from ' vue-router'
1011import { useUserStore } from ' @/stores/user'
1112
1213const userStore = useUserStore ()
@@ -15,6 +16,7 @@ defineProps({
1516 collapse: { type: [Boolean ], required: true },
1617})
1718
19+ const router = useRouter ()
1820const currentWorkspace = ref ({
1921 id: ' ' ,
2022 name: ' ' ,
@@ -44,6 +46,7 @@ const handleDefaultWorkspaceChange = (item: any) => {
4446 currentWorkspace .value = { id: item .id , name: item .name }
4547 userApi .ws_change (item .id ).then (() => {
4648 ElMessage .success (t (' common.switch_success' ))
49+ router .push (' /chat/index' )
4750 setTimeout (() => {
4851 location .reload ()
4952 }, 300 )
You can’t perform that action at this time.
0 commit comments