index.ts 576 B

123456789101112131415161718
  1. import { createRouter, createWebHistory } from "vue-router";
  2. import Mark from "@/components/mark/Mark.vue";
  3. const routes = [
  4. { path: "/", component: Mark },
  5. { path: "/mark", component: Mark },
  6. ];
  7. // 3. Create the router instance and pass the `routes` option
  8. // You can pass in additional options here, but let's
  9. // keep it simple for now.
  10. const router = createRouter({
  11. // 4. Provide the history implementation to use. We are using the hash history for simplicity here.
  12. history: createWebHistory(),
  13. routes, // short for `routes: routes`
  14. });
  15. export default router;