网上说的最多的方法

body .el-table th.gutter{
	    display: table-cell!important;
	}
	 
	body .el-table colgroup.gutter{
	    display: table-cell!important;
	}

注意:该方法需要写在入口文件进行全局设置。例如,App.vue

第二种方法

引用——iYiu博主: https://blog.csdn.net/Jensen_Yao/article/details/88538971

 .el-table__body{ 
 	overflow: hidden !important;
 }

或者

table {
	overflow: hidden !important;
}

第三种方法

上面两种都没有解决我的问题,这种能暂时解决,不清楚有没有其他问题

.el-table--border th.gutter:last-of-type{
  	display: table-cell !important; 
  	width:50px !important; 
 }

宽度值的大小没有详细测试过,但是如果太小没有效果,设置过大就不清楚有没有其他影响了。
该方法只是暂时解决我的问题,后面有时间会在仔细研究下

如有问题留言交流,第三种方法有问题记得提醒更正【手动滑稽】

Logo

Vue社区为您提供最前沿的新闻资讯和知识内容

更多推荐