问题:如下路由,如果进入123.com,显示的是/home页面,但是/home的active-class不会显示.
输入网址123.com如何默认跳到123.com/#/home?或者在123.com/#/让home样式显示?
routes: [
{
path: '/',
name: 'home',
component: home
},
{
path: '/home',
name: 'home',
component: home
},
{
path: '/news',
name: 'news',
component: news
}
]
你可以做路由的重定向/home链接描述