Commit 74e62819 authored by Jikkai Xiao's avatar Jikkai Xiao Committed by hetech

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

parent 72349e1a
......@@ -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) {
......
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