<el-menu
:default-active="activerouter"
class="el-menu-vertical-demo"
background-color="#13141f"
text-color="#fff"
active-text-color="#fff"
router
style="height:100%"
>
activerouter : ’ ’
mounted() {
// 页面手动刷新指定路由
//获取地址栏中的路由,设置elementui中的导航栏选中状态
let defaultMenu = window.location.hash.substr(
window.location.hash.indexOf("/")
);
this.activerouter = defaultMenu;
}