将短信发送状态在前端展示为成功
或者失败
,使用el-table-colnum
中的:formatter
属性
<el-table-column prop="status" label="短信发送状态" :formatter="statusFormatter" />
statusFormatter(row, column, cellValue, index) {
console.log(cellValue)
return cellValue == 0 ? '成功' : '失败'
}