70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
|
import Employee from "@/views/Employee.vue";
|
|
import Notice from "@/views/Notice.vue";
|
|
import QA from "@/views/QA.vue";
|
|
import DataDict from "@/views/DataDict.vue";
|
|
import DynamicTable from "@/views/DynamicTable.vue";
|
|
import Plugin from "@/views/Plugin.vue";
|
|
|
|
const routes: Array<RouteRecordRaw | any> = [
|
|
{
|
|
path: "/",
|
|
component: () => import("@/views/Login.vue"),
|
|
},
|
|
{
|
|
path: "/login",
|
|
component: () => import("@/views/Login.vue"),
|
|
},
|
|
{
|
|
path: "/app",
|
|
component: () => import("@/components/Layout.vue"),
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: Employee,
|
|
},
|
|
{
|
|
path: "/app/Employee",
|
|
component: Employee,
|
|
},
|
|
{
|
|
path: "/app/Notice",
|
|
component: Notice,
|
|
},
|
|
{
|
|
path: "/app/QA",
|
|
component: QA,
|
|
},
|
|
// {
|
|
// path: "/app/tag",
|
|
// component: Tag,
|
|
// },
|
|
{
|
|
path: "/app/dynamicTable/:name/:path/:title?",
|
|
// component: Record,
|
|
component: DynamicTable,
|
|
// 动态表格
|
|
},
|
|
{
|
|
path: "/app/dataDict",
|
|
component: DataDict,
|
|
},
|
|
{
|
|
path: "/app/plugin",
|
|
component: Plugin,
|
|
}
|
|
]
|
|
},
|
|
// {
|
|
// path: "/:pathMatch(.*)*",
|
|
// component: () => import("@/views/NotFound/index.vue"),
|
|
// },
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes,
|
|
});
|
|
|
|
export default router;
|