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>

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM