router-link标签的选中激活导航router-link-active

添加小程序,兑换各种视频教程/数据资源。

 

 

router-link: 其中tag='div'表示router-link为div标签
 

    


 

 .tab_item{        
        &.router-link-active{    //表示router-link激活选中时的状态
            .tab_span{
                color: red;
                border-bottom: 1px solid red;
            }
        }
    }


 

    {
        path:"/",
        redirect:"/recommend"   //让router-link的router-link-active默认执行/recommend的导航
    },{
        path:"/recommend",
        name:"recommend",
        component:() => import('@/views/recommend.vue') 
    },

 

你可能感兴趣的:(前端vue)