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;
      }
    }
  }
}
相关推荐
一个游离的指针44 分钟前
ES6基础特性
前端·javascript·es6
layman052844 分钟前
ES6/ES11知识点
前端·ecmascript·es6
2501_915373885 小时前
Vue 3零基础入门:从环境搭建到第一个组件
前端·javascript·vue.js
沙振宇8 小时前
【Web】使用Vue3开发鸿蒙的HelloWorld!
前端·华为·harmonyos
运维@小兵8 小时前
vue开发用户注册功能
前端·javascript·vue.js
蓝婷儿9 小时前
前端面试每日三题 - Day 30
前端·面试·职场和发展
oMMh9 小时前
使用C# ASP.NET创建一个可以由服务端推送信息至客户端的WEB应用(2)
前端·c#·asp.net
一口一个橘子9 小时前
[ctfshow web入门] web69
前端·web安全·网络安全
读心悦10 小时前
CSS:盒子阴影与渐变完全解析:从基础语法到创意应用
前端·css
香蕉可乐荷包蛋11 小时前
vue数据可视化开发echarts等组件、插件的使用及建议-浅看一下就行
vue.js·信息可视化·echarts