css设置文字超出显示省略号, el-table滚动条错位,v-for和$ref问题

white-space:nowrap; //不换行
overflow:hidden;//内容超出隐藏
text-overflow:ellipsis; //显示省略号
前提设置文字盒子的宽度

/* 修改element表头错位的问题 */
.el-table–border th.gutter:last-of-type {
display: block !important;
width: 17px !important;
}

v-for + $ref使用问题
结合使用的话ref会变成一个数组,所以要取第0项

this.$refs['xxxx'][0].showNodes()

猜你喜欢

转载自blog.csdn.net/moanuan/article/details/121097353