mirror of https://github.com/ElemeFE/element
refactor: fix some code issues (#6945)
* Table: remove condition due to rows has been accessed prior * Table: change el-tooltip style to object Signed-off-by: Clark Du <clark.duxin@gmail.com>pull/9130/head
parent
e466b32214
commit
1ad4b89ce2
|
@ -160,7 +160,7 @@ export default {
|
|||
const newRow = rows[data.indexOf(newVal)];
|
||||
if (oldRow) {
|
||||
removeClass(oldRow, 'current-row');
|
||||
} else if (rows) {
|
||||
} else {
|
||||
[].forEach.call(rows, row => removeClass(row, 'current-row'));
|
||||
}
|
||||
if (newRow) {
|
||||
|
|
|
@ -290,7 +290,7 @@ export default {
|
|||
}
|
||||
|
||||
return _self.showOverflowTooltip || _self.showTooltipWhenOverflow
|
||||
? <div class="cell el-tooltip" style={'width:' + (data.column.realWidth || data.column.width) + 'px'}>{ renderCell(h, data) }</div>
|
||||
? <div class="cell el-tooltip" style={{width: (data.column.realWidth || data.column.width) + 'px'}}>{ renderCell(h, data) }</div>
|
||||
: <div class="cell">{ renderCell(h, data) }</div>;
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue