diff --git a/docs/laypage/detail/options.md b/docs/laypage/detail/options.md index 6c86d23c..85fabc96 100644 --- a/docs/laypage/detail/options.md +++ b/docs/laypage/detail/options.md @@ -200,6 +200,20 @@ limitTemplet: function(item) { skipText: ['Go to', '', 'Confirm'] ``` + +array +- + + +countText 2.9.1+ + + +用于自定义总数区域文本,如: + +``` +countText: ['Total ',''] +``` + array - diff --git a/src/modules/laypage.js b/src/modules/laypage.js index 4ce4af38..46b958c3 100644 --- a/src/modules/laypage.js +++ b/src/modules/laypage.js @@ -152,7 +152,10 @@ layui.define(function(exports){ }(), // 数据总数 - count: '共 '+ config.count +' 条', + count: function(){ + var countText = typeof config.countText === 'object' ? config.countText : ['共 ', ' 条']; + return ''+ countText[0] + config.count + countText[1] +'' + }(), // 每页条数 limit: function(){