分页获取自定义数据指令
指令介绍
customDataPage,分页获取自定义数据。
方法参数
参数名称 | 参数说明 | 参数类型 | 是否必须 |
uuid | 数据定义uuid | String | 是 |
pageNumber | 第几页 | Integer | 否 |
pageSize | 每页多少个 | Integer | 否 |
使用方法
该模板指令,会自动从 url链接中 获取参数,其中除了pageNumber,pageSize之外,还有对其属性进行搜索匹配对参数。
匹配规则如下
- eq 等于
- nq 不等于
- like 字符串匹配
-
isNull 为空
-
isNotNull 不为空
举例:
http://**.jxyunge.cn/page/datas.html?search_eq_columnA 对分类里面对A字段进行搜索
使用举例
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<@customDataPage>
<#list customDataPageData.pagedata.content as data>
<img alt="" src="${data.columnB}" style="width: 300px; height: 210px;" />
</#list>
<#if 0 == customDataPageData.pagedata.totalElements>
<p style='color:#fff;padding:20px'>暂无数据</p>
</#if>
<@pagination pageData=customDataPageData toURL='${base}/page/pinpairongyu.html?uuid=uuid&pageSize=5' />
</@customDataPage>
</body>
</html>
效果展示