Commit 696beba0 authored by 杨奕's avatar 杨奕 Committed by GitHub

Table: showOverflowTooltip compatibility with IE11 (#11225)

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