首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >vue使用element 导航菜单状态绑定问题?

vue使用element 导航菜单状态绑定问题?

提问于 2018-11-28 17:38:02
回答 0关注 0查看 1.7K

代码如下所示,添加了点击事件控制collapse左侧导航菜单折叠或展开,并用了:default-active="$route.path"。但是点击菜单折叠再展开后,点击菜单页面跳转,菜单不再高亮??

<el-menu class="el-menu-vertical-demo"

:default-active="$route.path" :collapse="isCollapse" :collapse-transition="false"

background-color="#19233c" text-color="#999" active-text-color="#ffd04b"

:unique-opened="true" router>

<el-menu-item index="/userHome" route="/userHome" :style="{minWidth:headerWidth+'px'}">

<i class="el-icon-location"></i>

<span slot="title">首页</span>

</el-menu-item>

<el-submenu index="2" :style="{minWidth:headerWidth+'px'}">

<template slot="title">

<i class="el-icon-news"></i>

<span slot="title">资源管理</span>

</template>

<el-menu-item-group>

<el-menu-item index="/flow" route="/flow">流量源管理</el-menu-item>

<el-menu-item index="/plan" route="/plan">广告位管理</el-menu-item>

</el-menu-item-group>

</el-submenu>

</el-menu>

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档