方法1:
用自定义方法,将状态传入,遍历后台拿到的数据,返回对应的状态内容,实现映射展示:
<el-table-column
prop="status"
label="状态"
align="center"
width="120px"
>
<template slot-scope="scope">
//stauts为1,则显示禁用,status为0则显示为启用
<span>{
{
judgeStatus(scope.row.status)}}</span