將數字轉化漢字
fomatter (row, column, cellValue, index) {
if (row.stus === 0) {
row.stus = '啓用'
} else if (row.stus === 1){
row.stus = '禁用'
}
if (row.cotType === 0) {
row.cotType = '有線'
} else if (row.cotType === 1){
row.cotType = '無線'
}
return cellValue
},
日期格式化
// 後臺返回格式:2020-04-02T07:05:33.000+0000
// 轉化爲 2020-4-2
fomatter (row, column, cellValue, index) {
if (column.property == 'createDate') {
return new Date(cellValue).getFullYear() + ' - ' + (new Date(cellValue).getMonth() + 1) + ' - ' + new Date(cellValue).getDate()
} else {
return cellValue
}
},