1、直接上圖:
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'