vue文件
<template>
<div class="cloud_table">
<el-table
:data="tableData"
:border="border"
:row-class-name="tableRowClassName"
:show-overflow-tooltip="showOverflowTooltip"
header-cell-class-name="header_table"
@select="checkTable"
@select-all="checkAllTable"
@sort-change="sortTable"
ref="elTable"
>
<el-table-column v-if="isRadio" label width="50">
<template slot-scope="scope">
<el-radio v-model="radio_id" :label="scope.row.id" @change="clickChange(scope.row)">
<em></em>
</el-radio>
</template>
</el-table-column>
<el-table-column v-if="isCheck" type="selection" width="55" />
<el-table-column
v-for="(item, index) in tableColumn"
:prop="item.prop"
:label="item.label"
:width="item.width"
:min-width="110"
:sortable="item.sortable"
:show-overflow-tooltip="true"
:key="index"
>
<template slot-scope="scope">
<slot :item="item" :scope="scope">
<span>{
{
scope.row[item.prop] || "-" }}</span>
</slot>
</template>
</el-table-column>
<slot name="options"></slot>
<el-table-column v-if="options.length > 0" :width="optionsWidth" label="操作" align="center" fixed="right">
<template slot-scope="row">
<template v-for="(item, i) in options">
<span :class="{ division: i !== options.length - 1 }" class="blue" @click="item.method(row.row)" :key="i">
{
{
item.name }}
</span>
</template>
</template>
</el-table-column>
<template #empty>
<slot name="empty">
暂无数据
</slot>
</template>
</el-table>
<div v-if="tablePage.total" class="pagination_cloud">
<div class="total">
共 {
{
tablePage.total }} 条记录 第 {
{
tablePage.current }} /
{
{
Math.ceil(tablePage.total / tablePage.size) }} 页