项目初始化

This commit is contained in:
MTrunning
2020-03-16 21:17:10 +08:00
parent dd5bbaefef
commit 93d7e98cee
9 changed files with 79 additions and 123 deletions
+7 -18
View File
@@ -1,27 +1,16 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/about',
name: 'About',
// 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/About.vue')
}
]
const routes = [{
path: '/',
name: 'index',
component: () => import('../views/index.vue')
}]
const router = new VueRouter({
mode: "history",
routes
})
export default router
export default router