Browse Source

Menu: delay addItem so it is after old instances's remoteItem when re-render (#11036)

杨奕 7 năm trước cách đây
mục cha
commit
897f20683f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      packages/menu/src/menu-item.vue

+ 2 - 2
packages/menu/src/menu-item.vue

@@ -97,10 +97,10 @@
         if (!this.disabled) {
           this.dispatch('ElMenu', 'item-click', this);
           this.$emit('click', this);
-        };
+        }
       }
     },
-    created() {
+    mounted() {
       this.parentMenu.addItem(this);
       this.rootMenu.addItem(this);
     },