element-ui的table表格控件表头与内容列不对齐问题
原文链接:点我
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>
作者:时来运转
大佬们好,我是Web前端菜鸟,初来乍到,想跟诸位共同学习成长;
综上是我每日闲时整理笔记,文章如有侵权请诸位及时告知我,谢谢关照!