<el-menu-item class="menu-active" :class="$route.path.indexOf(item.path) !== -1 ? 'height-style-1' : 'height-style-2'"
:index="item.path" v-for="(item, index) in menuList" :key="item.path">
{{item.label }}
</el-menu-item>
方法一: indexOf() (推荐)
var str = "123"; console.log(str.indexOf("3") != -1 ); // true 包含情况下高亮 涉及子集菜单
"$route.path.indexOf(item.path)