elementui table二次封装

本文介绍了如何对ElementUI的Table组件进行二次封装,详细阐述了封装过程中的大致思路,并提到后续会有进一步的优化计划。
摘要由CSDN通过智能技术生成
    <el-table class="table" :data="tableData" border style="width: 100%" @row-click='jumpDetails'
      @selection-change="handleSelectionChange" empty-text row-key="id">

      <el-table-column align="center" v-if="multiple" type="selection" width="55"></el-table-column>

      <el-table-column :fixed="item.fixed" v-for="(item, index) in tableHeader" :key="index" :show-overflow-tooltip='item.tooltip' :sortable="item.sortable"
        :align="item.align" :header-align="item.headerAlign" :label="item.title" :min-width="item.width">
        <template slot-scope="scope">
          <!-- matchObj -->
          <span v-if="!item.hasOperating && !item.list">
            <span
              v-if="!item.date">{
  {item.matchObj ? item.matchObj[scope.row[item.attrName]] : scope.row[item.attrName]}}</span>
            <!-- 时间过滤 -->
            <span v-if="item.date">{
  {scope.row[item.attrName] | format}}</span>
          </span>
      
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值