column列描述数据对象,customRender:生成复杂数据的渲染函数,参数分别为当前行的值,当前行数据,行索引,@return 里面可以设置表格行/列合并。

将列表里后端返回的空数据使用”-“填充。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const columns = [{
title:'开始时间'
dataIndex:'start_date',
key:'start_date',
align:'center',
ellipsis:true,
width:250,
customRender: function (text, row, index) {
if (row.start_date == null) {
return '-'
} else {
return row.start_date
}
},
}]