From e27675114be9467b646f0135ccc5fe367d972b4e Mon Sep 17 00:00:00 2001 From: baiyaaaaa Date: Mon, 16 Jan 2017 23:37:06 +0800 Subject: [PATCH] Revert "fix first enter do not active the menu bug (#2399)" This reverts commit ef06717f64bc1a54c10b6549948056669ab5a85c. --- packages/menu/src/menu.vue | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/menu/src/menu.vue b/packages/menu/src/menu.vue index 0ae67a4ad..79af36c33 100644 --- a/packages/menu/src/menu.vue +++ b/packages/menu/src/menu.vue @@ -57,15 +57,6 @@ }, defaultOpeneds(value) { this.openedMenus = value; - }, - '$route': { - immediate: true, - handler(value) { - if (this.router) { - this.activedIndex = value.path; - this.initOpenedMenu(); - } - } } }, methods: { @@ -109,7 +100,7 @@ }, handleItemClick(item) { let { index, indexPath } = item; - + this.activedIndex = item.index; this.$emit('select', index, indexPath, item); if (this.mode === 'horizontal') { @@ -118,8 +109,6 @@ if (this.router) { this.routeToItem(item); - } else { - this.activedIndex = item.index; } }, // 初始化展开菜单