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

1、如下图:

 

改成:

 

 

  在el-table 里面插入

<template slot="empty">
  <span style="color: #969799;">No more data</span>
</template>
即可
<el-table
                :data="tableData"
                style="width: 100%"
                :header-cell-style="{background:'#F0F2F5',color:'#585858',textAlign: 'center'}"
                >
                <template slot="empty">
                    <span style="color: #969799;">No more data</span>
                </template>
                <el-table-column
                    prop="content"
                    label="OrderId"
                    min-width="100"
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    prop="amount"
                    label="amount"
                    min-width="80"
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    prop="type"
                    label="type"
                    min-width="110"
                    show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span v-if="scope.row.type == 1">Recharge</span>
                        <span v-if="scope.row.type == 2">Withdrawal</span>
                        <span v-if="scope.row.type == 3">consumption</span>
                        <span v-if="scope.row.type == 4">bonus</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="create_date"
                    min-width="160"
                    show-overflow-tooltip
                    label="Creation time">
                    <template slot-scope="scope">
                        {{scope.row.create_date | formatDate}}
                    </template>
                </el-table-column>
            </el-table>

  

posted @ 2020-12-01 13:41  小蘑菇123  阅读(4502)  评论(0编辑  收藏  举报