Commit 38a22c59a131e083fbbcff653ea91ff80d4204ea
Committed by
GitHub

Merge pull request #2870 from qutz/2.0
updateOpened时判断accordion
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/components/menu/menu.vue
@@ -99,6 +99,9 @@ | @@ -99,6 +99,9 @@ | ||
99 | 99 | ||
100 | if (items.length) { | 100 | if (items.length) { |
101 | items.forEach(item => { | 101 | items.forEach(item => { |
102 | + if (this.accordion) { | ||
103 | + item.opened = false; | ||
104 | + } | ||
102 | if (this.openNames.indexOf(item.name) > -1) item.opened = true; | 105 | if (this.openNames.indexOf(item.name) > -1) item.opened = true; |
103 | }); | 106 | }); |
104 | } | 107 | } |