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>