原文鏈接:點我
element-ui的table表格控件表頭與內容列不對齊問題
解決方法:
將以下樣式代碼添加到index.html、或app.vue中(必須是入口文件,起全局作用!)
body .el-table th.gutter{
display: table-cell!important;
}
例如(app.vue):
<template> <div id="app"> <router-view></router-view> </div> </template> <script> export default{ name: 'APP' } </script> <style> /* 解決element-ui的table表格控件表頭與內容列不對齊問題 */ .el-table th.gutter{ display: table-cell!important; } </style> <style lang="scss"> @import './styles/index.scss'; // 全局自定義的css樣式 </style>