| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
- import Home from "./view-detail/index";
- import Notfind from "../view/notfind";
- const routes: RouteRecordRaw[] = [
- {
- path: "/",
- component: Home,
- },
- {
- path: "/product-img",
- component: () => import("./view-product-img/index"),
- },
- {
- path: "/evaluat-report",
- component: () => import("./view-evaluat-report/index"),
- },
- {
- path: "/preview",
- component: () => import("./view-preview/index"),
- },
- {
- path: "/view-figner",
- component: () => import("./view-figner/index"),
- },
- {
- path: "/:pathMatch(.*)*",
- component: Notfind,
- meta: {
- title: "404 Not Fund",
- },
- },
-
- ];
- const router = createRouter({
- history: createWebHashHistory(),
- routes,
- });
- router.beforeEach((to, from, next) => {
- if (to.meta.title) {
- document.title = to.meta.title as string;
- }
- next();
- });
- export default router;
|