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

  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const routes = [
  3. {
  4. path: '/',
  5. redirect: 'chat'
  6. },
  7. {
  8. path: '/chat',
  9. name: 'chat',
  10. component: () => import('../views/chat.vue')
  11. },
  12. ]
  13. // 创建路由实例
  14. const router = createRouter({
  15. history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),
  16. routes
  17. })
  18. // 导出
  19. export default router