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>
相关推荐
跟着珅聪学java17 分钟前
spring boot +Elment UI 上传文件教程
java·spring boot·后端·ui·elementui·vue
吞掉星星的鲸鱼20 分钟前
使用高德api实现天气查询
前端·javascript·css
lilye6623 分钟前
程序化广告行业(55/89):DMP与DSP对接及数据统计原理剖析
java·服务器·前端
....49224 分钟前
Vue3 + Element Plus + AntV X6 实现拖拽树组件
javascript·vue.js·elementui·antvx6
zhougl9962 小时前
html处理Base文件流
linux·前端·html
花花鱼2 小时前
node-modules-inspector 可视化node_modules
前端·javascript·vue.js
HBR666_2 小时前
marked库(高效将 Markdown 转换为 HTML 的利器)
前端·markdown
careybobo4 小时前
海康摄像头通过Web插件进行预览播放和控制
前端
杉之5 小时前
常见前端GET请求以及对应的Spring后端接收接口写法
java·前端·后端·spring·vue
喝拿铁写前端5 小时前
字段聚类,到底有什么用?——从系统混乱到结构认知的第一步
前端