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