使用
render
:此属性将修改
从数据源读取的各种操作的数据表
columns: [
{data: 'id'},
{data: 'title'},
{data: 'start_date'},
{data: 'end_date'},
{data: 'is_active',
render: function (data, type, row) {
return `<span>${row.is_active==1 ? Active : Inactive}<span>`;
}
},//column need to be displayed a text
{data: 'template_content'},
{data: 'action', orderable: false, searchable: false}
]