Commit 1ad4b89c authored by Clark Du's avatar Clark Du Committed by cinwell.li

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: default avatarClark Du <clark.duxin@gmail.com>
parent e466b322
......@@ -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>;
};
},
......
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