前端页面展示数据时,怎样让枚举类起作用


{
    message:{"xxx":"xxx", "list":[{"status":"0",...},{"status":"1",....}]}
}
这是response,后端写的有关于status的枚举类,0代表正常,1代表废弃。
<el-table>展示表格时,status项展示的是0,1.  想让它展示正常,废弃

<el-table  :data="List" >
    <el-table-column label="枚举类" align="center"  width="160">
            <template slot-scope="scope">
              <span>{{ scope.row.status === 0 ? '正常' : '废弃' }}</span>
            </template>
          </el-table-column>
</el-table>
scope.row.status === 0 ? '正常' : '废弃'  // 利用过滤器也可以

<el-table-column
    prop="status"
    label="状态">
      <template slot-scope="scope">
            {{ scope.row.status === '0' ? '正常' : '废弃' }}
         </template>
</el-table-column>

我看你上面返回的status 是字符串 不是int 这个你需要确认下