利用formatter属性格式化数据格式化数据

        <el-table-column show-overflow-tooltip
                         :formatter="handphase"
                         type="selection"
                         align="center"
                         width="55">
        </el-table-column>

row获取每一行的数据,判断对应的字段,



  methods: {
    //转换数据
    handphase(row, column) {
      if (row['status_id_info'])  {
        if (row['status_id_info'].indexOf('schedule') != -1) {
          row['status_id_info'] = this.$t(row['status_id_info']);
        }
      }

    },

 

Logo

前往低代码交流专区

更多推荐