Element修改表格结构样式集合(后续实时更新)

场景

修改前端Element组件el-table样式

实现

  1. 线表格
html 复制代码
<div class="tablepro">
        <el-table
          :data="tableData"
          :header-cell-style="{ textAlign:'center'}"
          class="tablepro-table"
          border
          style="width: 100%;height:100%">
          <!-- <el-table-column
            prop="taskId"
            label="任务ID"
            width="90">
          </el-table-column> -->
          <el-table-column
            align="center"
            prop="taskName"
            label="任务名称"
            min-width="150">
          </el-table-column>
          <el-table-column
            align="center"
            prop="zhuangtai"
            label="任务状态"
            min-width="75">
          </el-table-column>
          <el-table-column
            prop="tasklx"
            align="center"
            label="任务类型"
            min-width="80">
          </el-table-column>
          <el-table-column
            prop="device.nickname"
            align="center"
            label="执行机场"
            min-width="170">
          </el-table-column>
          <el-table-column
            prop="wayline.waylineName"
            align="center"
            label="航线名称"
            min-width="100">
          </el-table-column>
          <el-table-column
            prop="wayline.userName"
            align="center"
            label="创建人"
            min-width="80">
          </el-table-column>
          <el-table-column
            prop="beginTime"
            align="center"
            label="创建时间"
            min-width="160">
          </el-table-column>
          <!-- <el-table-column
            prop="endTime"
            label="结束时间"
            min-width="130">
          </el-table-column> -->
          <el-table-column
            prop="errMsg"
            label="备注"
            min-width="200">
          </el-table-column>
          <el-table-column label="操作" width="120">
            <template slot-scope="scope">
              <!-- <el-button
                size="mini"
                type="danger"
                @click="handleDone(scope.$index, scope.row)">执行</el-button> -->
                <el-button
                size="mini"
                @click="handleGuiJi(scope.$index, scope.row)"
                v-if="scope.row.status==2&&!changeck"
                >轨迹</el-button>
                <!-- <el-button
                size="mini"
                @click="handleGuiJiChange(scope.$index, scope.row)"
                v-if="scope.row.status==2&&changeck"
                >轨迹</el-button> -->
            </template>
          </el-table-column>
        </el-table>
      </div>
  
<style lang="scss" scoped>
.guiji-pop{
    height: 100%;
    width: 100%;
    .tablepro {
        width: 100%;
        height: calc(100% - 0.82rem);
        margin-top: 0.16rem;
        ::v-deep .el-table__body-wrapper {
            height: calc(100% - 0.48rem);
            overflow-y: auto;
        }
    }
}
::v-deep .el-input .el-input__clear:hover,
::v-deep .el-table th.el-table__cell.is-leaf{
  color: #fff;
}
::v-deep .el-table--group, 
::v-deep .el-table--border,
::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell{
  border: 1px solid #00529D;
}
el-table::before, .el-table--group::after, .el-table--border::after{
  background-color: transparent;
}
::v-deep .el-table::before {
    height: 0 !important;
}
::v-deep .el-table,
::v-deep .el-table tr,
::v-deep .el-input__inner,
::v-deep .el-table td.el-table__cell{
  background: none;
  color: #fff;
}
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
    background: transparent;
}
::v-deep .el-table th.el-table__cell.is-leaf{
    background: linear-gradient( 180deg, rgba(92,180,249,0.0001) 25%, rgba(95,165,242,0.0706) 50%, rgba(18,140,231,0.1804) 75%, rgba(82,131,223,0.66) 100%) !important;
}
::v-deep .el-table--enable-row-hover .el-table__body tr:hover{
    background: linear-gradient( -90deg, rgb(0,125,241) 0%, rgb(45,100,255) 100%) !important;
}
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
    border-left: none !important;
    border-right: none !important;
}
</style>
相关推荐
Zaly.1 分钟前
【前端】CSS实战之音乐播放器
前端·css
Nejosi_念旧13 分钟前
包文件分析器 Webpack Bundle Analyzer
前端·webpack·node.js
齐格Insight15 分钟前
优雅解决el-popover内有select时在选择后会自动关闭
前端
noravinsc42 分钟前
vue request 发送formdata
前端·javascript·vue.js
Libby博仙1 小时前
VUE3 vite下的axios跨域
前端·javascript·vue.js·前端框架·node.js
剪刀石头布啊1 小时前
Web Animation API
前端
资深前端之路1 小时前
react面试题一
前端·javascript·react.js
肖老师xy1 小时前
css动画水球图
前端·css
LBJ辉2 小时前
2. CSS 中的单位
前端·css