首页跳转到子路由
This commit is contained in:
parent
055fd8c871
commit
00f43f2580
|
@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import Login from '../components/Login'
|
import Login from '../components/Login'
|
||||||
import Home from '../components/Home'
|
import Home from '../components/Home'
|
||||||
|
import welcome from '../components/welcome'
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
|
@ -15,7 +16,14 @@ const routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/home',
|
path: '/home',
|
||||||
component: Home
|
component: Home,
|
||||||
|
redirect: '/welcome',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/welcome',
|
||||||
|
component: welcome
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user