基于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.
|
|
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
|
|
|
|
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';
|
|
|
|
|
|
|
|
const routes: Array<RouteRecordRaw> = [
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
routes,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|