再说怎么用之前,先声明一下自己的环境以及使用场景
这里的分页排序都会与后台进行交互,不单是页面的分页和排序,话不多说上代码,使用后台进行排序在table里面要声明remoteSort:true的属性,
上图的箭头是列添加sortable属性后展示的排序箭头,点击会向后台请求这一列的排序(倒序,正序)
<table id="dg" class="easyui-datagrid" data-options="fit:true,url:'/user/product/activity_schedule',pagination:true,pageNumber:1,pageSize:20,pageList:[20,40,60],remoteSort:true">
<thead>
<tr>
<th data-options="field:'name',width:150,align:'left',halign:'center'">1</th>
<th data-options="field:'org_top_name',width:150,align: