提交代码
This commit is contained in:
48
src/router/index.ts
Normal file
48
src/router/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('../views/edit/index.vue')
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
path: '/edit',
|
||||
component: () => import('../views/edit/index.vue')
|
||||
},
|
||||
{
|
||||
name: 'demo',
|
||||
path: '/demo',
|
||||
component: () => import('../views/demo/index.vue')
|
||||
},
|
||||
{
|
||||
name: 'preview',
|
||||
path: '/preview',
|
||||
component: () => import('../views/preview/index.vue')
|
||||
},
|
||||
{
|
||||
name: 'edit-load',
|
||||
path: '/edit-load',
|
||||
component: () => import('../views/demo/edit-load.vue')
|
||||
},
|
||||
{
|
||||
name: 'set-node-attr',
|
||||
path: '/set-node-attr',
|
||||
component: () => import('../views/demo/set-node-attr.vue')
|
||||
},
|
||||
{
|
||||
name: 'event-callback',
|
||||
path: '/event-callback',
|
||||
component: () => import('../views/demo/event-callback.vue')
|
||||
},
|
||||
{
|
||||
name: 'change-attr',
|
||||
path: '/change-attr',
|
||||
component: () => import('../views/demo/change-attr.vue')
|
||||
}
|
||||
]
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(), // hash模式:createWebHashHistory,history模式:createWebHistory
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user