Update table-body.js

添加一个this.$refs.tooltip是否存在的判断
pull/8281/head
lyh2668 2017-11-14 22:26:39 +08:00 committed by 杨奕
parent 6db51156b1
commit 4f00d7dea8
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ export default {
// 判断是否text-overflow, 如果是就显示tooltip
const cellChild = event.target.querySelector('.cell');
if (hasClass(cellChild, 'el-tooltip') && cellChild.scrollWidth > cellChild.offsetWidth) {
if (hasClass(cellChild, 'el-tooltip') && cellChild.scrollWidth > cellChild.offsetWidth && this.$refs.tooltip) {
const tooltip = this.$refs.tooltip;
this.tooltipContent = cell.innerText;