Table: fix highlightCurrentRow regression (#11563)

pull/11588/head
杨奕 2018-06-10 20:44:59 +08:00 committed by GitHub
parent af1a287cf3
commit e58cffaaa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -268,7 +268,9 @@ export default {
getRowClass(row, rowIndex) {
const currentRow = this.store.states.currentRow;
const classes = currentRow === row ? ['el-table__row', 'current-row'] : ['el-table__row'];
const classes = this.table.highlightCurrentRow && currentRow === row
? ['el-table__row', 'current-row']
: ['el-table__row'];
if (this.stripe && rowIndex % 2 === 1) {
classes.push('el-table__row--striped');