You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
364 B
20 lines
364 B
import { createRouter, createWebHistory } from 'vue-router'
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
redirect: 'chat'
|
|
},
|
|
{
|
|
path: '/chat',
|
|
name: 'chat',
|
|
component: () => import('../views/chat.vue')
|
|
},
|
|
|
|
]
|
|
// 创建路由实例
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),
|
|
routes
|
|
})
|
|
// 导出
|
|
export default router
|