diff --git a/components/panelmenu/PanelMenu.vue b/components/panelmenu/PanelMenu.vue old mode 100755 new mode 100644 index afe7bc036..9db93737b --- a/components/panelmenu/PanelMenu.vue +++ b/components/panelmenu/PanelMenu.vue @@ -73,6 +73,7 @@ export default { activeItem: null }; }, + methods: { getItemProp(item, name) { return item ? ObjectUtils.getItemValue(item[name]) : undefined; @@ -81,7 +82,7 @@ export default { return this.getItemProp(item, 'label'); }, isItemActive(item) { - return this.expandedKeys ? this.expandedKeys[this.getItemProp(item, 'key')] : item === this.activeItem; + return this.expandedKeys ? this.expandedKeys[this.getItemProp(item, 'key')] : ObjectUtils.equals(item, this.activeItem); }, isItemVisible(item) { return this.getItemProp(item, 'visible') !== false; @@ -202,7 +203,7 @@ export default { const active = this.isItemActive(item); const eventName = !active ? 'panel-open' : 'panel-close'; - this.activeItem = selfActive ? item : this.activeItem && this.activeItem === item ? null : item; + this.activeItem = selfActive ? item : this.activeItem && ObjectUtils.equals(item, this.activeItem) ? null : item; this.changeExpandedKeys({ item, expanded: !active }); this.$emit(eventName, { originalEvent: event, item }); }