ソースを参照

Add api example

zhixin 6 年 前
コミット
180f358228
2 ファイル変更20 行追加3 行削除
  1. 20 2
      site/docs/api/table-options.md
  2. 0 1
      src/bootstrap-table.js

+ 20 - 2
site/docs/api/table-options.md

@@ -438,6 +438,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `function(res) { return res }`
 
+- **Example:** [Response Handler](https://examples.bootstrap-table.com/#options/response-handler.html)
+
 ## totalField
 
 - **Attribute:** `data-total-field`
@@ -446,10 +448,12 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  Key in incoming json containing `'total'` data .
+  Key in incoming json containing `'total'` data.
 
 - **Default:** `'total'`
 
+- **Example:** [Total/Data Field](https://examples.bootstrap-table.com/#options/total-data-field.html)
+
 ## dataField
 
 - **Attribute:** `data-data-field`
@@ -462,6 +466,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'rows'`
 
+- **Example:** [Total/Data Field](https://examples.bootstrap-table.com/#options/total-data-field.html)
+
 ## pagination
 
 - **Attribute:** `data-pagination`
@@ -474,6 +480,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Table Pagination](https://examples.bootstrap-table.com/#options/table-pagination.html)
+
 ## onlyInfoPagination
 
 - **Attribute:** `data-only-info-pagination`
@@ -486,6 +494,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Only Info Pagination](https://examples.bootstrap-table.com/#options/only-info-pagination.html)
+
 ## paginationLoop
 
 - **Attribute:** `data-pagination-loop`
@@ -498,6 +508,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `true`
 
+- **Example:** [Pagination Loop](https://examples.bootstrap-table.com/#options/pagination-loop.html)
+
 ## sidePagination
 
 - **Attribute:** `data-side-pagination`
@@ -516,6 +528,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'client'`
 
+- **Example:** [Side Pagination](https://examples.bootstrap-table.com/#options/side-pagination.html)
+
 ## totalRows
 
 - **Attribute:** `data-total-rows`
@@ -524,7 +538,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  This property is mainly passed in by server side pagination, which is easy to use. It can be set with custom pagination.
+  This property is mainly passed in by pagination server, which is easy to use.
 
 - **Default:** `0`
 
@@ -540,6 +554,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `1`
 
+- **Example:** [Page Number](https://examples.bootstrap-table.com/#options/page-number.html)
+
 ## pageSize
 
 - **Attribute:** `data-page-size`
@@ -552,6 +568,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `10`
 
+- **Example:** [Page Size](https://examples.bootstrap-table.com/#options/page-size.html)
+
 ## pageList
 
 - **Attribute:** `data-page-list`

+ 0 - 1
src/bootstrap-table.js

@@ -1356,7 +1356,6 @@
       }
       this.$pagination.show()
 
-
       const html = []
       let $allSelected = false
       let i