加一个slot-scope
const map = {'0': '全部','1': '正常','2': '待发布','3': '已删除',
}
<el-table-columnprop="status"label="状态"align="center"width="100"><template slot-scope="scope"><span>{
{ map[scope.row.status] }}</span></template>
</el-table-column>
element中table列数据的格式化(判断男女,是否等) formatter用法
<el-table-columnprop="sex"label="性别":formatter="formatter"></el-table-column>
methods:{formatter(row, column) {return row.TableIsbibei === 1? "男" : "女";},}