Skip to content

Commit 7945a78

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 9a0b2ff + ed3b8da commit 7945a78

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontend/src/components/layout/Workspace.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlin
77
import { userApi } from '@/api/auth'
88
import { ElMessage } from 'element-plus-secondary'
99
import { useI18n } from 'vue-i18n'
10+
import { useRouter } from 'vue-router'
1011
import { useUserStore } from '@/stores/user'
1112
1213
const userStore = useUserStore()
@@ -15,6 +16,7 @@ defineProps({
1516
collapse: { type: [Boolean], required: true },
1617
})
1718
19+
const router = useRouter()
1820
const 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)

0 commit comments

Comments
 (0)