"columns": [
{"data": "id", "bSortable": true},
{"data": "articleId", "bSortable": true},
{"data": "iffUser.nickName", "bSortable": true},
{"data": "appraiseTime", "bSortable": true},
],
10 回复
{
"render": function (data, type, row) {
if (iffUser) {
return iffUser.nickName;
}
return '我是空白字符串';
},
"targets": 2
}
额。。。
{
"render": function (data, type, row) {
if (row.iffUser) {
return row.iffUser.nickName;
}
return '我是空白字符串';
},
"targets": 2
}
不行啊还是不出来???
"columns": [
{"data": "iffArticle.title", "bSortable": true},
{"data": "iffUser.nickName", "bSortable": true},
{"data": "appraiseTime", "bSortable": true},
],
"columnDefs": [
{
"render": function (data, type, row) {
return '<div class="btn-group"><button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">' +
' <i class="ti-settings"></i> <span class="ti-angle-down"></span></button><ul class="dropdown-menu" role="menu">' +
'<li><a href="${base}/platform/iff/user/appraise/detail/' + row.id + '" data-toggle="modal" data-target="#dialogDetail">${msg["globals.button.detail"]}</a></li>' +
'<li><a href="${base}/platform/iff/user/appraise/edit/' + row.id + '" data-pjax>${msg["globals.button.update"]}</a></li>' +
'<li class="divider"></li>' +
'<li><a href="javascript:;" onclick="del(\'' + row.id + '\')">${msg["globals.button.delete"]}</a></li>' +
'</ul></div>';
},
"targets": 3
},
{
"render": function (data, type, row) {
if (row.iffArticle) {
return row.iffArticle.title;
}
return '我是空白字符串';
},
"targets": 0
}
]
});
"columns": [
{"data": "iffArticle.title", "bSortable": true},
{"data": "iffUser.nickName", "bSortable": true},
{"data": "appraiseTime", "bSortable": true},
],
改成
"columns": [
{"data": "appraiseTime", "bSortable": true},
{"data": "appraiseTime", "bSortable": true},
{"data": "appraiseTime", "bSortable": true},
],
而且你的下标序号不对吧,0、1、2 哪里有3
添加回复
请先登陆