mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Tabs: fixed tab-pane's incorrect order (#12346)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user