Iview-admin: Menu 切换路由选中样式问题

Created on 26 Dec 2019  ·  1Comment  ·  Source: iview/iview-admin

当我进入一个Menu 某个菜单 页面时 此页面是可以编辑的
所以需要在切换路由时候确认用户是否切换路由
所以 使用beforeRouteLeave来判断路由是否跳转
但是 我要是切换路由的话 点击取消之后 不跳转路由
但是menu 的选中效果已经选中到了我要跳转的指定菜单
这样不就不对劲了吗。
beforeRouteLeave (to, from , next) { const answer = window.confirm('Do you really want to leave? you have unsaved changes!') if (answer) { next() } else { next(false) } }
1
微信截图_20191226142612

Most helpful comment

推荐使用Ant

>All comments

推荐使用Ant

Was this page helpful?
0 / 5 - 0 ratings