el-table的暂无数据怎么变成图片加文字按钮?

el-table的暂无数据怎么变成图片加文字按钮?

这两种方写empty法都行,选你喜欢的

<template v-slot:empty></template>
<template slot="empty"></tmeplate>

我加了图片文字还有按钮,看效果
在这里插入图片描述

<el-table>
<el-table-column prop="status" header-align="center" align="center" label="专业名称"></el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="专业代码"></el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="专业分类"></el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="状态"></el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="操作"></el-table-column>

<template slot="empty">
  <el-image src="https://img-blog.csdnimg.cn/f79d686f76bd4d15b618503c5f43ce4d.png" style="margin-top: 70px;width: 255px;" fit="fill"></el-image>
<div class="noData" style="position: relative;margin: -70px auto -5px;font-size: 14px;color: #999">你还没有班级信息,请点击去新增班级</div>
<el-button type="primary" size="medium" style="min-width: 129px;margin-bottom: 50px;" @click="addOrUpdateHandle()">去新增</el-button>
</template>

</el-table>
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值