新增 laypage countText 选项 (#1444)

pull/1445/head
morning-star 2023-12-06 23:46:50 +08:00 committed by GitHub
parent ec3a5278c1
commit 96f0621ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -200,6 +200,20 @@ limitTemplet: function(item) {
skipText: ['Go to', '', 'Confirm']
```
</td>
<td>array</td>
<td>-</td>
</tr>
<tr>
<td>countText <sup>2.9.1+</sup></td>
<td>
用于自定义总数区域文本,如:
```
countText: ['Total ','']
```
</td>
<td>array</td>
<td>-</td>

View File

@ -152,7 +152,10 @@ layui.define(function(exports){
}(),
// 数据总数
count: '<span class="layui-laypage-count">共 '+ config.count +' 条</span>',
count: function(){
var countText = typeof config.countText === 'object' ? config.countText : ['共 ', ' 条'];
return '<span class="layui-laypage-count">'+ countText[0] + config.count + countText[1] +'</span>'
}(),
// 每页条数
limit: function(){