基于vue3.0和element-plus的组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
943 B

2 years ago
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
2 years ago
import { Views } from 'noob-mengyxu';
2 years ago
import Home from '../view/home.vue';
import Table from '../view/base/table.vue';
import Form from '../view/base/form.vue';
import Terminal from '../view/tool/terminal.vue';
import Color from '../view/tool/color.vue';
2 years ago
const routes: Array<RouteRecordRaw> = [
2 years ago
{
path: '/',
redirect: '/home',
},
{
path: '/home',
name: 'home',
component: Home,
},
{
path: '/table',
name: 'table',
component: Table,
},
{
path: '/form',
name: 'form',
component: Form,
},
{
path: '/terminal',
name: 'terminal',
component: Terminal,
},
{
path: '/color',
name: 'color',
component: Color,
},
2 years ago
];
2 years ago
Views.routes.forEach((item) => {
routes.push(item);
});
2 years ago
const router = createRouter({
history: createWebHashHistory(),
routes,
});
export default router;