Tabs: fixed tab-pane's incorrect order (#12346)

pull/12357/head
Jikkai Xiao 2018-08-14 11:22:00 +08:00 committed by hetech
parent 72349e1a62
commit 74e62819c0
1 changed files with 3 additions and 1 deletions

View File

@ -89,7 +89,9 @@
}
},
addPanes(item) {
const index = this.$slots.default.indexOf(item.$vnode);
const index = this.$slots.default.filter(item => {
return item.elm.nodeType === 1 && /\bel-tab-pane\b/.test(item.elm.className) || item.elm.nodeType === 8;
}).indexOf(item.$vnode);
this.panes.splice(index, 0, item);
},
removePanes(item) {