element ui 多个el-table 横向展示


<div class="styleTable">
      <div class="table-div">
        <el-table
          :header-cell-style="{
            background: '#376092',
            color: '#F8F8FF',
            height: '35px',
            padding: '2px',
          }"
          fit
          border
          :data="data.contentList"
          v-for="(data, index) in dataList"  // 多个el-table
          :key="index"
        ></el-table>
</div>
<div>

需要对应更新样式,修改原来el-table样式

.styleTable {
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 25px;
}
.table-div {
  display: inline-table;
}

// 修改el-table 本来样式
.symbolWrap .el-table {
  display: inline-table;
  vertical-align: top;
  overflow-x: auto;
  width: auto !important;
}
.symbolWrap .el-table__body-wrapper {
  vertical-align: top;
  overflow-x: auto;
  width: auto !important;
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM