Commit bf4b07e8 authored by lipengcheng 's avatar lipengcheng

feat: 优化路由

parent 54967fda
......@@ -5,5 +5,8 @@ export default {
layout: 'DefaultLayout',
title: '首页'
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '@/views/home.vue')
}
export default {
path: '/page1',
name: 'Page1',
component: () => import(/* webpackChunkName: "about" */ '../views/page1.vue')
component: () => import(/* webpackChunkName: "page1" */ '../views/page1.vue')
}
......@@ -5,8 +5,5 @@ export default {
layout: 'layout-a',
title: '页面2'
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/page2.vue')
component: () => import(/* webpackChunkName: "page2" */ '../views/page2.vue')
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment