mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-05 05:38:24 +08:00
Table: update getRowClass (#11839)
* Table: setCurrentRow only when highlight-current-row is true * Table: trigger current-change * Table: update getRowClass
This commit is contained in:
parent
ef74ee05b3
commit
61756c5bd5
@ -267,10 +267,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getRowClass(row, rowIndex) {
|
getRowClass(row, rowIndex) {
|
||||||
const currentRow = this.store.states.currentRow;
|
const classes = ['el-table__row'];
|
||||||
const classes = this.table.highlightCurrentRow && currentRow === row
|
if (this.table.highlightCurrentRow && row === this.store.states.currentRow) {
|
||||||
? ['el-table__row', 'current-row']
|
classes.push('current-row');
|
||||||
: ['el-table__row'];
|
}
|
||||||
|
|
||||||
if (this.stripe && rowIndex % 2 === 1) {
|
if (this.stripe && rowIndex % 2 === 1) {
|
||||||
classes.push('el-table__row--striped');
|
classes.push('el-table__row--striped');
|
||||||
|
Loading…
Reference in New Issue
Block a user