Commit 1c84f7e4 by liujiliang

modify tree table 增加formatter自定义渲染

parent a2163795
...@@ -83,7 +83,12 @@ ...@@ -83,7 +83,12 @@
tr.append(td); tr.append(td);
}else{ }else{
var td = $('<td style="'+((column.width)?('width:'+column.width):'')+'"></td>'); var td = $('<td style="'+((column.width)?('width:'+column.width):'')+'"></td>');
// 增加formatter渲染
if (column.formatter) {
td.html(column.formatter.call(this, '', item, index));
} else {
td.text(item[column.field]); td.text(item[column.field]);
}
tr.append(td); tr.append(td);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment