element-ui 挖坑之旅
作者:互联网
el-tooltip
- 判断文本超出显示...时,显示tooltip
handleShowTooltip(event) {
let cell = event.target.querySelector('.el-tooltip')
this.showTooltip =
cell.scrollWidth === cell.offsetWidth &&
cell.scrollHeight === cell.offsetHeight
}
<div
@mouseenter="handleShowTooltip($event)"
class="listInfo"
v-for="(line,index)in item.lines" >
<el-tooltip :disabled="showTooltip" effect="dark" popper-class="toolTipClass":content="line.line" placement="top" >
<div style="white-space:pre" class="content" :class="{blue:line.isApplyLog==1}">{{line.line}}</div>
</el-tooltip>
</div>
- 自定义class
popper-class="toolTipClass"
标签:el,class,tooltip,element,cell,挖坑,ui,line,event 来源: https://blog.csdn.net/jiayoululu5/article/details/98086848