Vue-Element的show-overflow-tooltip属性使用后空属性值鼠标移动上去提示一个黑色悬浮框

Vue-Element的show-overflow-tooltip属性使用后空属性值鼠标移动上去提示一个黑色悬浮框

  • 按照element官方写法为:
<el-table-column :porp='enterpriseName' :label="$t('会员名称')" show-overflow-tooltip>
</el-table-column>
  • 解决办法为在中间加一层template
<el-table-column :label="$t('会员名称')" show-overflow-tooltip>
	<template slot-scope="scope">
    	<span>{{ scope.row.enterpriseName }}</span>
	</template>
 </el-table-column>
  • 最后是因为如果不使用<template><span></span></template>将属性包起来,js会判断宽度一致,所以会出现悬浮框

猜你喜欢

转载自blog.csdn.net/marke_huang/article/details/82800027