Commit 3fb5131d authored by 暮雨's avatar 暮雨 Committed by 杨奕

Table: fix #4692

table[highlight-current-row] with column[type=expand] will highlight wrong row
parent 3bdeb592
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
on-contextmenu={ ($event) => this.handleContextMenu($event, row) } on-contextmenu={ ($event) => this.handleContextMenu($event, row) }
on-mouseenter={ _ => this.handleMouseEnter($index) } on-mouseenter={ _ => this.handleMouseEnter($index) }
on-mouseleave={ _ => this.handleMouseLeave() } on-mouseleave={ _ => this.handleMouseLeave() }
class={ [this.getRowClass(row, $index)] }> class={ ['el-table__row', this.getRowClass(row, $index)] }>
{ {
this._l(this.columns, (column, cellIndex) => this._l(this.columns, (column, cellIndex) =>
<td <td
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
const el = this.$el; const el = this.$el;
if (!el) return; if (!el) return;
const data = this.store.states.data; const data = this.store.states.data;
const rows = el.querySelectorAll('tbody > tr'); const rows = el.querySelectorAll('tbody > tr.el-table__row');
const oldRow = rows[data.indexOf(oldVal)]; const oldRow = rows[data.indexOf(oldVal)];
const newRow = rows[data.indexOf(newVal)]; const newRow = rows[data.indexOf(newVal)];
if (oldRow) { if (oldRow) {
......
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