fix: 默认 `active` 赋值

This commit is contained in:
ChenZhaoYu 2023-02-20 14:58:06 +08:00
parent fda6c6bb6a
commit cb90d81c69
1 changed files with 6 additions and 1 deletions

View File

@ -1,12 +1,17 @@
<script setup lang='ts'>
import { computed } from 'vue'
import { NLayout, NLayoutContent } from 'naive-ui'
import { useRouter } from 'vue-router'
import Sider from './sider/index.vue'
import Header from './header/index.vue'
import { useBasicLayout } from '@/hooks/useBasicLayout'
import { useAppStore } from '@/store'
import { useAppStore, useChatStore } from '@/store'
const router = useRouter()
const appStore = useAppStore()
const chatStore = useChatStore()
router.replace({ name: 'Chat', params: { uuid: chatStore.active } })
const { isMobile } = useBasicLayout()