This commit is contained in:
梁灏 2019-04-09 14:46:25 +08:00
parent dde5774119
commit 943a4a73e5

View file

@ -171,7 +171,8 @@
this.$parent.selectAll(status); this.$parent.selectAll(status);
}, },
handleSort (index, type) { handleSort (index, type) {
const column = this.columns[index]; // index #5580
const column = this.columns.find(item => item._index === index);
const _index = column._index; const _index = column._index;
if (column._sortType === type) { if (column._sortType === type) {
@ -180,7 +181,8 @@
this.$parent.handleSort(_index, type); this.$parent.handleSort(_index, type);
}, },
handleSortByHead (index) { handleSortByHead (index) {
const column = this.columns[index]; // index #5580
const column = this.columns.find(item => item._index === index);
if (column.sortable) { if (column.sortable) {
const type = column._sortType; const type = column._sortType;
if (type === 'normal') { if (type === 'normal') {