index.js 684 B

123456789101112131415161718192021222324252627282930313233
  1. import { createRouter, createWebHashHistory } from "vue-router"
  2. const map = () => import("@/views/map/index.vue")
  3. const waterResource = () => import("@/views/waterResource/index.vue")
  4. const waterQuality = () => import("@/views/waterQuality/index.vue")
  5. const router = createRouter({
  6. history: createWebHashHistory(),
  7. routes: [
  8. {
  9. path: "/",
  10. redirect: "/map",
  11. },
  12. {
  13. path: "/map",
  14. component: map,
  15. },
  16. {
  17. path: "/waterResource",
  18. component: waterResource,
  19. },
  20. {
  21. path: "/waterQuality",
  22. component: waterQuality,
  23. },
  24. {
  25. path: "/:pathMatch(.*)",
  26. redirect: "/",
  27. },
  28. ],
  29. })
  30. export default router