62,243
社区成员




<table title="Products" class="easyui-treegrid" id="tree"
url='newsCategory/list'
rownumbers="true"
idField="id" treeField="name">
<thead>
<tr>
<th field="name" width="250">
类名
</th>
<th field="enabled" width="150" align="left">
启用状态
</th>
<th field="deleted" width="150" align="left">
删除状态
</th>
<th field="id" width="150" align="left" formatter="formatOp">
操作
</th>
</tr>
</thead>
</table>
function formatOp(value) {
if (!value) {
return "";
}
var str = "<a href='javascript:void(0);' onclick='addChild(" + value + ")'>添加子分类</a>";
str += "<a href='javascript:void(0);' onclick='editCategory(" + value + ")'>编辑</a>";
str += "<a href='javascript:void(0);' onclick='deleteCategory(" + value + ")'>删除</a>";
return str;
}