Commit 61756c5b authored by 杨奕's avatar 杨奕 Committed by Jikkai Xiao

Table: update getRowClass (#11839)

* Table: setCurrentRow only when highlight-current-row is true

* Table: trigger current-change

* Table: update getRowClass
parent ef74ee05
......@@ -267,10 +267,10 @@ export default {
},
getRowClass(row, rowIndex) {
const currentRow = this.store.states.currentRow;
const classes = this.table.highlightCurrentRow && currentRow === row
? ['el-table__row', 'current-row']
: ['el-table__row'];
const classes = ['el-table__row'];
if (this.table.highlightCurrentRow && row === this.store.states.currentRow) {
classes.push('current-row');
}
if (this.stripe && rowIndex % 2 === 1) {
classes.push('el-table__row--striped');
......
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