修改Element的el-table没有数据时候显示样式

加一个<template #empty>就可以

<el-form-item label="设置物流品牌" prop="logistics_data">
    <el-table-column align="center" width="540" prop="brand_details" label="品牌介绍"/>
    <template #empty>
        <div style="width: 100%; height: 144px;display: flex; flex-direction: column;     justify-        
        content: center;align-items: center">
            <img style="width: 60px;height:60px;"src="../../../../../assets/images/Temporarilynodata.png" alt="">
            <div>暂无数据</div>
        </div>
    </template>
</el-table>

<template #empty>标签里面可以自定义任何的样式  根据需求更改即可

猜你喜欢

转载自blog.csdn.net/weixin_48329823/article/details/125790130