index.ts 417 B

123456789101112131415161718192021
  1. import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
  2. const routes: Array<RouteRecordRaw> = [
  3. {
  4. path: '/index',
  5. name: 'index',
  6. component: () => import('../views/index.vue')
  7. },
  8. {
  9. path: '/:id',
  10. name: 'index',
  11. component: () => import('../views/index.vue')
  12. }
  13. ]
  14. const router = createRouter({
  15. history: createWebHashHistory(),
  16. routes
  17. })
  18. export default router