浏览代码

fix #3713: Imrpoved pageList options to support localization

zhixin 6 年之前
父节点
当前提交
a9d9722bcb
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      site/docs/api/table-options.md
  2. 2 2
      src/bootstrap-table.js

+ 1 - 1
site/docs/api/table-options.md

@@ -578,7 +578,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  When set pagination property, initialize the page size selecting list. If you include the `'All'` or `'Unlimited'` option, all the records will be shown in your table.
+  When set pagination property, initialize the page size selecting list. If you include the `'all'` or `'unlimited'` option, all the records will be shown in your table.
 
 - **Default:** `[10, 25, 50, 100]`
 

+ 2 - 2
src/bootstrap-table.js

@@ -1495,8 +1495,8 @@
           pageList = []
           for (const value of list) {
             pageList.push(
-              (value.toUpperCase() === o.formatAllRows().toUpperCase() ||
-              value.toUpperCase() === 'UNLIMITED')
+              (value.toLowerCase() === o.formatAllRows().toLowerCase() ||
+              ['all', 'unlimited'].includes(value.toLowerCase()))
                 ? o.formatAllRows() : +value)
           }
         }