vue table 没有数据的时候展示无数据

element-table 无数据的时候,把“暂无数据” 改成其他文字或图片

 

<el-table :data="tableData" >
<
el-table-column label="序号" prop="amount"" min-width="80" align="center"> <template #default="scope"> {{scope.$index+1}} </template> </el-table-column> <el-table-column prop="content" label="OrderId" min-width="100" show-overflow-tooltip> </el-table-column> <template v-slot:empty>    <span style="color: #969799;">No more data</span> </template>
</el-table>
 

 

 

如果是封装模板组件

<el-table :data="tableData" >
<el-table-column label=序号" min-width="80" align="center">
<template #default="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<slot></slot>
<template v-slot:"empty">
<span style="color: #969799;">No more data</span>
</template>
</el-table>

 

来源:

element-table 无数据的时候

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章