index.js 443 B

12345678910111213141516171819202122
  1. import { createRouter, createWebHashHistory } from 'vue-router'
  2. import HomeView from '../views/HomeView.vue'
  3. const routes = [
  4. {
  5. path: '/',
  6. name: 'Home',
  7. component: () => import('../views/HomeView.vue')
  8. },
  9. {
  10. path: '/chat',
  11. name: 'Chat',
  12. component: () => import('../views/NewChatPage.vue')
  13. }
  14. ]
  15. const router = createRouter({
  16. history: createWebHashHistory(location.pathname),
  17. routes
  18. })
  19. export default router