<table class="easyui-datagrid" data-options="url:'listJson.do',pageSize:15,fitColumns:'true'" width="width" id="useradmindata">
<thead>
<tr>
<th data-options="field:'name',width:100">名称</th>
<th data-options="field:'sort',width:100" >排序</th>
<th data-options="field:'show',width:100" formatter="formatShow">是否显示</th>
<th data-options="field:'action',width:100" formatter="formatAction">操作</th>
</tr>
</thead>
<thead>
<tr>
<th data-options="field:'name',width:100">名称</th>
<th data-options="field:'sort',width:100" >排序</th>
<th data-options="field:'show',width:100" formatter="formatShow">是否显示</th>
<th data-options="field:'action',width:100" formatter="formatAction">操作</th>
</tr>
</thead>
</table>
----------------------------------------------------------------------------------------------------------------------------------------------------
<script type="text/javascript">
function formatShow(value,row,index){
if(value==1){
return "是";
}else{
return "否";
}
}
</script>
本文展示了一个使用 EasyUI 框架实现的数据表格组件示例,包括如何设置表格的宽度、列名、列宽及自定义显示格式等内容。通过 JavaScript 定义了不同字段的显示逻辑。
7603

被折叠的 条评论
为什么被折叠?



