fillter根据value来匹配字段

字段对应

let cashBackState = {
  'WAIT_FIVE': '满5单可返现',
  'FINISHED': '已返现'
}
 filters: {
    cashBackStateFilter: function (value) {
      return enumOptions.cashBackState[value]
    }
 },
            <el-table-column label="状态"
                               width="100"
                               align="center">
                               <template scope="scope">{{ scope.row.cashBackState | cashBackStateFilter}}</template>
              </el-table-column>
                                

猜你喜欢

转载自www.cnblogs.com/antyhouse/p/10272461.html