Przeglądaj źródła

Table: fix highlightCurrentRow regression (#11563)

杨奕 7 lat temu
rodzic
commit
e58cffaaa1
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      packages/table/src/table-body.js

+ 3 - 1
packages/table/src/table-body.js

@@ -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');