Table: showOverflowTooltip compatibility with IE11 (#11225)

pull/11230/head
杨奕 2018-05-18 13:18:22 +08:00 committed by GitHub
parent 76953c488f
commit 696beba0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ export default {
const rangeWidth = range.getBoundingClientRect().width;
const padding = (parseInt(getStyle(cellChild, 'paddingLeft'), 10) || 0) +
(parseInt(getStyle(cellChild, 'paddingRight'), 10) || 0);
if (rangeWidth + padding > cellChild.offsetWidth && this.$refs.tooltip) {
if ((rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) && this.$refs.tooltip) {
const tooltip = this.$refs.tooltip;
// TODO 会引起整个 Table 的重新渲染,需要优化
this.tooltipContent = cell.textContent || cell.innerText;