You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vue-webtopo-svgeditor/src/router/index.ts

24 lines
538 B
TypeScript

import { createRouter, createWebHistory } from 'vue-router';
export const constantRoutes = [
{
path: '/',
redirect: '/edit'
},
{
name: 'edit',
path: '/edit',
component: () => import('../views/edit/index.vue')
},
{
name: 'preview',
path: '/preview',
component: () => import('../views/preview/index.vue')
}
];
const router = createRouter({
history: createWebHistory(), // hash模式createWebHashHistoryhistory模式createWebHistory
routes: constantRoutes
});
export default router;