1、使用vue-router为我们提供好的类名,添加你想要的样式(例:router-link-exact-active router-link-active)
2、在new的VueRouter实例身上进行修改
var routes = new VueRouter({
routes: [
{ path: '/', redirect: '/dlzj' },
{ path: '/dlzj', component: dlzj },
{ path: '/zczj', component: zczj }
],
linkActiveClass: "leiming" //填写新的类名
})