浏览代码

Table: tooltip content prefer innerText instead of textContent (#13159)

Harlan 6 年之前
父节点
当前提交
3a1ee202a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/table/src/table-body.js

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

@@ -328,7 +328,7 @@ export default {
       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;
+        this.tooltipContent = cell.innerText || cell.textContent;
         tooltip.referenceElm = cell;
         tooltip.$refs.popper && (tooltip.$refs.popper.style.display = 'none');
         tooltip.doDestroy();