赞
踩
table中文字太长,设置了show-overflow-tooltip,如下,
<el-table-column label="labelname" show-overflow-tooltip>
<template slot-scope="scope">
<div v-if="">{{scope.row.value1}}}</div>
<div v-else>{{scope.row.value2}}</div>
</template>
</el-table-column>
结果:显示到结尾,会直接遮挡,不显示省略号
解决,将div改为span:
<el-table-column label="labelname" show-overflow-tooltip>
<template slot-scope="scope">
<!-- 注意这里 div改为span -->
<span v-if="">{{scope.row.value1}}}</span>
<span v-else>{{scope.row.value2}}</span>
</template>
</el-table-column>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。