vue element ui 导航刷新 is-active


<el-menu :default-active="$route.path" router mode="horizontal">
<el-menu-item v-for="route in routes" :key="route.path" :index="route.path" :class="$route.path==route.path?'is-active':''">{{route.name}}</el-menu-item>
</el-menu> js: routes: [
{ path: '/main/kdgadmin', name: '幼儿园管理', },
{ path: '/main/phyex', name: '体测', }, ] css:
.is-active{
background: #a3212f;
border-bottom: 0px solid transparent;
color: #FFFFFF;
}
上一篇:在Xcode5中修改整个项目名


下一篇:java遍历统计一个文件夹中所有文件单词出现次数