mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor:优化前台顶栏菜单被点击时无需激活的菜单项的处理
This commit is contained in:
parent
3db75e0ff2
commit
028710bcb9
@ -120,7 +120,11 @@ const setActiveMenu = (route: RouteLocationNormalizedLoaded) => {
|
|||||||
* 检查菜单是否需要激活,如果否,还原 state.activeMenu
|
* 检查菜单是否需要激活,如果否,还原 state.activeMenu
|
||||||
*/
|
*/
|
||||||
const onSelect = (index: string) => {
|
const onSelect = (index: string) => {
|
||||||
if (noNeedActive(siteConfig.headNav, index) || noNeedActive(memberCenter.state.navUserMenus, index)) {
|
if (
|
||||||
|
noNeedActive(siteConfig.headNav, index) ||
|
||||||
|
noNeedActive(memberCenter.state.navUserMenus, index) ||
|
||||||
|
noNeedActive(memberCenter.state.viewRoutes, index)
|
||||||
|
) {
|
||||||
const oldActiveMenu = state.activeMenu
|
const oldActiveMenu = state.activeMenu
|
||||||
state.activeMenu = ''
|
state.activeMenu = ''
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user