mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-21 11:57:47 +00:00
fix: 默认 active
赋值
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { NLayout, NLayoutContent } from 'naive-ui'
|
import { NLayout, NLayoutContent } from 'naive-ui'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import Sider from './sider/index.vue'
|
import Sider from './sider/index.vue'
|
||||||
import Header from './header/index.vue'
|
import Header from './header/index.vue'
|
||||||
import { useBasicLayout } from '@/hooks/useBasicLayout'
|
import { useBasicLayout } from '@/hooks/useBasicLayout'
|
||||||
import { useAppStore } from '@/store'
|
import { useAppStore, useChatStore } from '@/store'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
|
const chatStore = useChatStore()
|
||||||
|
|
||||||
|
router.replace({ name: 'Chat', params: { uuid: chatStore.active } })
|
||||||
|
|
||||||
const { isMobile } = useBasicLayout()
|
const { isMobile } = useBasicLayout()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user