Skip to content

Commit 6cab5f2

Browse files
committed
fix: bug fix
1 parent 813e9e5 commit 6cab5f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frontend/src/components/layout/Workspace.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ import icon_done_outlined from '@/assets/svg/icon_done_outlined.svg'
66
import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlined.svg'
77
import { userApi } from '@/api/auth'
88
import { ElMessage } from 'element-plus-secondary'
9+
import { useRouter } from 'vue-router'
910
import { useI18n } from 'vue-i18n'
1011
import { useUserStore } from '@/stores/user'
12+
1113
const userStore = useUserStore()
1214
const { t } = useI18n()
15+
const router = useRouter()
1316
defineProps({
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
}

0 commit comments

Comments
 (0)