https://blog.csdn.net/qq_35393869/article/details/88077912
1 | <el-menu :default-active="$route.path" mode="horizontal" @select="handleSelect" router> |
注意这里的:default-active="$route.path"
和router
,并且后面的index一定要设置对!
handleSelect
不写也没问题
https://blog.csdn.net/qq_35393869/article/details/88077912
1 | <el-menu :default-active="$route.path" mode="horizontal" @select="handleSelect" router> |
注意这里的:default-active="$route.path"
和router
,并且后面的index一定要设置对!
handleSelect
不写也没问题