element表格数据为空时不想展示暂无数据,可以改成空白*

插入部分的代码,用的插槽slot配合v-if
当数据为空时展示

<el-table
          :data="tableData"
          style="width: 100%"
          stripe
          border
          :header-cell-style="{
            color: '#333',
            fontSize: '14px',
            fontWeight: 'bold',
            backgroundColor: '#f4f4f4',
          }"
          :max-height="tableHeight"
          ref="table"
        >
          <div slot="empty" class="color99" style="min-height:80px">
            <div v-if="tableData.length==0">
              <div class="empty-data-view">
                <div>
                  <span class="empty-text">
                    <p class="c-title f-14 fw-400"></p>
                  </span>
                </div>
              </div>
            </div>
          </div>
          <el-table-column prop="CreateTime" min-width="110" label="申请时间" align="left">
            <template slot-scope="scope">
              <span> {{$utils.formatTime(scope.row.CreateTime, "yyyy-MM-dd hh:mm:ss")}} </span>
              <span>  </span>
            </template>
          </el-table-column>

结果
在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值