<el-menu
style="border-right:0"
:default-active="$route.path"
background-color="#fff"
text-color="#717E8C"
active-text-color="#18A590"
router
>
</el-menu>
将default-active改成下面的
:default-active="'/' +this.$route.path.split('/')[1]"