In Table vue el-table-column data fields Translation

<el-table-column prop="isstate" label="状态"></el-table-column>

Above background is a 1 or 0 is returned 

Demand is required from 0 into 1 and audited and unaudited

<el-table-column prop="isstate" :formatter = "stateFormat" label="审核状态"></el-table-column>

使用 :formatter = "stateFormat"

In the area of ​​methods:

methods: {
    stateFormat(row, column) {
        if (row.isstate === 0) { 
        return '未审核'
      } else if (row.isReview === 1) {
         return '已审核' }
    }
  }

   

Then the page on it, the page displays audited and not reviewed.

Guess you like

Origin www.cnblogs.com/2001-/p/10966800.html
Recommended