vue router-view 添加选中样式

通过router的linkExactActiveClass 属性进行css样式绑定。

const router = createRouter({
  history: createWebHashHistory(),
  routes,
  linkExactActiveClass:'active'
});

 

posted on 2021-12-11 18:18  水行者  阅读(342)  评论(0编辑  收藏  举报

导航