Commit e098ce3f8a4175f24b2610c5a35f67bae7fa5120
1 parent
37f4b7a8
Optimize Menu initialization animation
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/components/menu/menu.vue
| @@ -133,9 +133,9 @@ | @@ -133,9 +133,9 @@ | ||
| 133 | } | 133 | } |
| 134 | }, | 134 | }, |
| 135 | mounted () { | 135 | mounted () { |
| 136 | - this.updateActiveName(); | ||
| 137 | this.openedNames = [...this.openNames]; | 136 | this.openedNames = [...this.openNames]; |
| 138 | this.updateOpened(); | 137 | this.updateOpened(); |
| 138 | + this.$nextTick(() => this.updateActiveName()); | ||
| 139 | this.$on('on-menu-item-select', (name) => { | 139 | this.$on('on-menu-item-select', (name) => { |
| 140 | this.currentActiveName = name; | 140 | this.currentActiveName = name; |
| 141 | this.$emit('on-select', name); | 141 | this.$emit('on-select', name); |