element el-table表头添加背景图片

夏俊杰
2023-12-01

给表头添加class

<el-table
          :data="tableData"
          :border="false"
          style="height:auto"
          :header-cell-class-name="headerBg"
          >


<script>
methods: {
 headerBg() {
      return 'headerBg'
    }
}
</script>

<style>
.headerBg{
  background-image: url(../../../assets/images/bg.png) !important;
  background-repeat: no-repeat !important;
}
</style>

 类似资料: