<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;
	}



相关文章:

  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-10-31
相关资源
相似解决方案