fix tab insert index (#2898)

pull/1873/merge
baiyaaaaa 2017-02-20 11:35:25 +08:00 committed by cinwell.li
parent 9ee825b9fe
commit 55d1a39ebf
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@
this.$emit('input', value); this.$emit('input', value);
}, },
addPanes(item) { addPanes(item) {
this.panes.push(item); const index = this.$slots.default.indexOf(item.$vnode);
this.panes.splice(index, 0, item);
}, },
removePanes(item) { removePanes(item) {
const panes = this.panes; const panes = this.panes;