03.简单的路由配置
Vue.use(Router)
const routes = [
{
path: '/login',
name: 'login',
component: Login
},
{
path: '/index',
name: 'index',
component: Index,
children: [
{
path: '/hello',
name: 'hello',
component: HelloWorld
},
{
path: '/home',
name: 'home',
component: Home
},
{
path: '/about',
name: 'about',
component: About
},
]
},
{// 重定向
path: '/',
redirect: '/login'
}
];
export default new Router({
routes,
mode: 'history'
})
posted on 2019-05-22 18:46 tiandandan-vip 阅读(136) 评论(0) 编辑 收藏 举报