mirror of https://github.com/ElemeFE/element
Table: fix #4692
table[highlight-current-row] with column[type=expand] will highlight wrong rowpull/5771/head^2
parent
3bdeb592df
commit
3fb5131d64
|
@ -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 {
|
||||||
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) {
|
||||||
|
|
Loading…
Reference in New Issue