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
Clark Du 2018-01-04 16:00:47 +08:00 committed by cinwell.li
parent e466b32214
commit 1ad4b89ce2
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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>;
};
},