From e098ce3f8a4175f24b2610c5a35f67bae7fa5120 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 10 Apr 2019 10:43:18 +0800 Subject: [PATCH] Optimize Menu initialization animation --- src/components/menu/menu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/menu/menu.vue b/src/components/menu/menu.vue index 6658688..392b57a 100644 --- a/src/components/menu/menu.vue +++ b/src/components/menu/menu.vue @@ -133,9 +133,9 @@ } }, mounted () { - this.updateActiveName(); this.openedNames = [...this.openNames]; this.updateOpened(); + this.$nextTick(() => this.updateActiveName()); this.$on('on-menu-item-select', (name) => { this.currentActiveName = name; this.$emit('on-select', name); -- libgit2 0.21.4