<data-table
v-loading="listLoading"
v-bind:tableColumnList="tableColumnList"
:dataList="dataList"
:pager="page"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
>
<div slot="handleColumn">
<el-table-column
label="表示颜色"
header-align="center"
align="center"
width="130">
<template slot-scope="scope">
<div :style="{'background':scope.row.tasteGradeColor}" style="width: 50px;height: 20px; margin: auto;"></div>
</template>
</el-table-column>
</div>
<div slot="handleColumn">
<el-table-column
fixed="right"
label="操作"
header-align="center"
align="center"
width="130">
<template slot-scope="scope">
<el-button @click="editBtn(scope.row)" type="text" icon="el-icon-edit" size="small">编辑</el-button>
<el-button @click="deleteBtn(scope.row)" icon="el-icon-delete" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</div>
</data-table>
element表格根据返回颜色值显示
最新推荐文章于 2024-08-15 16:00:54 发布