fix tabs bug

pull/6127/head
baiyaaaaa 2017-07-25 23:33:09 +08:00 committed by 杨奕
parent ce270fef4d
commit 8e761efbd6
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,9 @@
this.$emit('input', value);
},
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);
},
removePanes(item) {