2020-06-13 el-table表头和表格列宽不一样

1、直接上图:

image.png

2、解决办法

2-1、网上找的办法

将以下样式代码添加到index.html、或app.vue中(必须是入口文件,起全局作用!)
body .el-table th.gutter{
display: table-cell!important;
}

2-2、自己新建css文件common.css,在文件中将上面样式写入

/* 解决element-ui的table表格控件表头与内容列不对齐问题 */
body .el-table th.gutter{
display: table-cell!important;
}
2-3、在main.js文件中引入common.css文件

import '@/style/common.css'

你可能感兴趣的:(2020-06-13 el-table表头和表格列宽不一样)