瀏覽代碼

Table: fix table column show-overflow-tooltip bug

Table: fix table column show-overflow-tooltip bug, low version Firefox without innerText, add textContent
Ryan.xu 7 年之前
父節點
當前提交
292ad8efec
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/table/src/table-body.js

+ 1 - 1
packages/table/src/table-body.js

@@ -343,7 +343,7 @@ export default {
       if (hasClass(cellChild, 'el-tooltip') && cellChild.scrollWidth > cellChild.offsetWidth && this.$refs.tooltip) {
         const tooltip = this.$refs.tooltip;
 
-        this.tooltipContent = cell.innerText;
+        this.tooltipContent = cell.textContent || cell.innerText;
         tooltip.referenceElm = cell;
         tooltip.$refs.popper && (tooltip.$refs.popper.style.display = 'none');
         tooltip.doDestroy();