diff --git a/src/components/menu/menu.vue b/src/components/menu/menu.vue index 46f025b..95919cb 100644 --- a/src/components/menu/menu.vue +++ b/src/components/menu/menu.vue @@ -119,13 +119,15 @@ events: { 'on-menu-item-select' (key) { this.activeKey = key; - this.updateActiveKey(); this.$emit('on-select', key); } }, watch: { openKeys () { this.$emit('on-open-change', this.openKeys); + }, + activeKey () { + this.updateActiveKey(); } } }; diff --git a/test/routers/menu.vue b/test/routers/menu.vue index 3150cb2..c28b2bf 100644 --- a/test/routers/menu.vue +++ b/test/routers/menu.vue @@ -1,57 +1,48 @@ - - - - - 内容管理 - - - - 用户管理 - - - - 内容管理 - - - - 用户管理 - - - - 内容管理 - - - - 用户管理 - - - - - 统计分析 - - - 新增和新 - 活跃分析 - 时段分析 - - - 用户留存 - 流失用户 - - - - - 综合设置 - - - + + + + 内容管理 + + + + 用户管理 + + + + + 统计分析 + + + 新增和启动 + 活跃分析 + 时段分析 + + + 用户留存 + 流失用户 + + + + + 综合设置 + + + + 切换主题 + + + + + + change
切换主题