Commit 475cc046 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Menu: collapsed menu shouldn't open default indices

parent 7a4ec97f
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
data() { data() {
return { return {
activeIndex: this.defaultActive, activeIndex: this.defaultActive,
openedMenus: this.defaultOpeneds ? this.defaultOpeneds.slice(0) : [], openedMenus: (this.defaultOpeneds && !this.collapse) ? this.defaultOpeneds.slice(0) : [],
items: {}, items: {},
submenus: {} submenus: {}
}; };
...@@ -141,7 +141,9 @@ ...@@ -141,7 +141,9 @@
}, },
defaultOpeneds(value) { defaultOpeneds(value) {
this.openedMenus = value; if (!this.collapse) {
this.openedMenus = value;
}
}, },
collapse(value) { collapse(value) {
if (value) this.openedMenus = []; if (value) this.openedMenus = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment