element el-table 去掉边框和背景色

<template>

  <div class="panel-group">

    <el-row style="line-height: 36px">

      <el-col :span="2">{{ contentTableConfig.title }}</el-col>

    </el-row>

    <el-row style="margin: 10px 50px">

      <el-col :span="24">

        <el-table

          ref="myTable"

          :data="contentTableData"

          :class="table"

          :header-cell-style="{ background: '#ffffff', border: 'none' }"

        >

          <el-table-column

            v-for="(item, index) in contentTableConfig.propList"

            :key="index"

            show-overflow-tooltip

            :prop="item.prop"

            :label="item.label"

            :min-width="item.width"

          ></el-table-column>

        </el-table>

      </el-col>

    </el-row>

  </div>

</template>

<script>

export default {

  props: {

    // 是否显示操作

    title: {

      type: String,

      default: "",

    },

    contentTableConfig: {

      type: Object,

      require: true,

      default: () => ({}),

    },

    contentTableData: {

      type: Array,

      require: true,

      default: () => [],

    }

  },

  methods: {

    handleSetLineChartData(type) {

      this.$emit("handleSetLineChartData", type);

    },

  },

};

</script>

<style lang="scss" scoped>

.panel-group {

  margin-top: 18px;

  margin-bottom: 18px;

  background: rgb(255, 255, 255);

  padding: 16px 20px 16px 30px;

}

::v-deep .el-table__row > td {

  border: none;

}

.el-table::before {

  //去掉最下面的那一条线

  height: 0px;

}

</style>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容