1234567891011121314151617181920212223242526272829 |
- import { createRouter, createWebHashHistory } from "vue-router";
- let routes = [
- // 首页 -> 展馆列表
- {
- path: "/",
- name: "home",
- component: () => import("@/view/home/index.vue"),
- },
- // 文物鉴赏
- {
- path: "/product",
- name: "product",
- component: () => import("@/view/product/index.vue"),
- },
- // 文物鉴赏——详情
- {
- path: "/detail",
- name: "detail",
- component: () => import("@/view/product/detail/index.vue"),
- },
- ];
- // 路由
- const router = createRouter({
- history: createWebHashHistory(),
- routes,
- });
- // 导出
- export default router;
|