Commit 8e761efb authored by baiyaaaaa's avatar baiyaaaaa Committed by 杨奕

fix tabs bug

parent ce270fef
...@@ -61,7 +61,9 @@ ...@@ -61,7 +61,9 @@
this.$emit('input', value); this.$emit('input', value);
}, },
addPanes(item) { 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('el-tab-pane');
}).indexOf(item.$vnode);
this.panes.splice(index, 0, item); this.panes.splice(index, 0, item);
}, },
removePanes(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