element-ui的table表格控件表头与内容列不对齐问题

element-ui的table表格控件表头与内容列不对齐问题


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

例如(app.vue):

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

<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>

  

  


 

 

 

GitHub 加速计划 / eleme / element
13
1
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:1 个月前 )
c345bb45 1 年前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 1 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐