mirror of https://github.com/ElemeFE/element
Table: improveper formance for init tooltip, fixed #3836
parent
11843891ca
commit
cb0a60066b
|
@ -1,4 +1,5 @@
|
|||
import { getCell, getColumnByCell, getRowIdentity } from './util';
|
||||
import { hasClass } from 'element-ui/src/utils/dom';
|
||||
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||
import ElTooltip from 'element-ui/packages/tooltip';
|
||||
import debounce from 'throttle-debounce/debounce';
|
||||
|
@ -208,7 +209,7 @@ export default {
|
|||
// 判断是否text-overflow, 如果是就显示tooltip
|
||||
const cellChild = event.target.querySelector('.cell');
|
||||
|
||||
if (cellChild.scrollWidth > cellChild.offsetWidth) {
|
||||
if (hasClass(cellChild, 'el-tooltip') && cellChild.scrollWidth > cellChild.offsetWidth) {
|
||||
const tooltip = this.$refs.tooltip;
|
||||
|
||||
this.tooltipContent = cell.innerText;
|
||||
|
|
Loading…
Reference in New Issue