Element Plus 去掉表格外边框

使用el-table组件拖拽时, 想使用自定义样式进行拖拽, 想去掉外边框, 并在表头加入竖杠样式

css代码:

css 复制代码
<style lang="less" scoped>

// 表格右边框线
.el-table--border::after {
  width: 0;
}

// 表格上边框线
:deep(.el-table__inner-wrapper::after) {
  height: 0 !important;
}

// 表格左边框线
.el-table::before {
  width: 0 !important;
}
:deep(.el-table__border-left-patch) {
  background: transparent !important;
}

</style>
<style lang="less">
// 去掉中间线
.el-table--border .el-table__cell {
  border-right: 1px solid transparent;
}
</style>

表头加竖线:

css 复制代码
.el-table__header {
  .cell {
    position: relative;
    &:after {
      content: '';
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 1px;
      height: 16px;
      background: #dde2e9;
    }
  }
  .el-table__cell {
    &:last-child {
      .cell:after {
        width: 0;
      }
    }
  }
}
相关推荐
GreenTea8 小时前
GrokBot 核心成员 Lauren Tan:每月交付 2000 个 PR 的人,是怎么用 AI 的
前端·后端·架构
mCell9 小时前
用 Knip 清理 AI Coding 留下的冗余代码
前端·ai编程·前端工程化
dy171710 小时前
vue2树节点刷新后定位到上一节点展开
vue.js
笃行35010 小时前
使用Rokid AIUI做了一个童年推箱子游戏
前端
excel11 小时前
前端加密的作用与使用场景
前端
计算机魔术师12 小时前
纽约时报版权诉讼披露:微软高管内部称训练 AI 是人类历史上最大规模劳动窃取
前端
去伪存真12 小时前
大模型的参数量为什么那么大?
前端·人工智能
IT_陈寒13 小时前
Java空指针这次真把我坑惨了
前端·人工智能·后端
高级程序源14 小时前
django大学生创新创业项目管理系统94923-计算机课程设计、毕业设计
javascript·vue.js·spring boot·后端·python·django·课程设计
八荒启·交互动画14 小时前
# Web特效020—让 Web 特效真正动起来:时间循环应该怎么接
前端·webgl·网页特效·八荒启-交互动画·八荒启