ソースを参照

Merge branch 'hotfix/examples' into develop

zhixin 6 年 前
コミット
6cc58ea49b
3 ファイル変更58 行追加4 行削除
  1. 5 0
      site/_includes/scripts.html
  2. 53 3
      site/docs/api/table-options.md
  3. 0 1
      src/bootstrap-table.js

+ 5 - 0
site/_includes/scripts.html

@@ -4,6 +4,11 @@
 
 {%- if page.layout == "docs" -%}
 <script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+<script>
+$(function () {
+  $('.bd-content.api a').attr('target', '_blank')
+})
+</script>
 {%- endif -%}
 
 <script src="{{ site.baseurl }}/assets/js/docs.min.js?m=1"></script>

+ 53 - 3
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:** [Client Side Pagination](https://examples.bootstrap-table.com/#options/client-side-pagination.html) and [Server Side Pagination](https://examples.bootstrap-table.com/#options/server-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`
@@ -564,6 +582,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `[10, 25, 50, 100]`
 
+- **Example:** [Page List](https://examples.bootstrap-table.com/#options/page-list.html)
+
 ## paginationHAlign
 
 - **Attribute:** `data-pagination-h-align`
@@ -576,6 +596,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'right'`
 
+- **Example:** [Pagination H Align](https://examples.bootstrap-table.com/#options/pagination-h-align.html)
+
 ## paginationVAlign
 
 - **Attribute:** `data-pagination-v-align`
@@ -584,10 +606,12 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  Indicate how to align the pagination. `'top'`, `'bottom'`, `'both'` (put the pagination on top and bottom)  can be used.
+  Indicate how to vertical align the pagination. `'top'`, `'bottom'`, `'both'` (put the pagination on top and bottom)  can be used.
 
 - **Default:** `'bottom'`
 
+- **Example:** [Pagination V Align](https://examples.bootstrap-table.com/#options/pagination-v-align.html)
+
 ## paginationDetailHAlign
 
 - **Attribute:** `data-pagination-detail-h-align`
@@ -600,6 +624,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'left'`
 
+- **Example:** [Pagination H Align](https://examples.bootstrap-table.com/#options/pagination-h-align.html)
+
 ## paginationPreText
 
 - **Attribute:** `data-pagination-pre-text`
@@ -612,6 +638,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'‹'`
 
+- **Example:** [Pagination Text](https://examples.bootstrap-table.com/#options/pagination-text.html)
+
 ## paginationNextText
 
 - **Attribute:** `data-pagination-next-text`
@@ -624,6 +652,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'›'`
 
+- **Example:** [Pagination Text](https://examples.bootstrap-table.com/#options/pagination-text.html)
+
 ## paginationSuccessivelySize
 
 - **Attribute:** `data-pagination-successively-size`
@@ -636,6 +666,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `5`
 
+- **Example:** [Pagination Index Number](https://examples.bootstrap-table.com/#options/pagination-index-number.html)
+
 ## paginationPagesBySide
 
 - **Attribute:** `data-pagination-pages-by-side`
@@ -648,6 +680,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `1`
 
+- **Example:** [Pagination Index Number](https://examples.bootstrap-table.com/#options/pagination-index-number.html)
+
 ## paginationUseIntermediate
 
 - **Attribute:** `data-pagination-use-intermediate`
@@ -660,6 +694,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Pagination Index Number](https://examples.bootstrap-table.com/#options/pagination-index-number.html)
+
 ## search
 
 - **Attribute:** `data-search`
@@ -672,6 +708,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Table Search](https://examples.bootstrap-table.com/#options/table-search.html)
+
 ## searchOnEnterKey
 
 - **Attribute:** `data-search-on-enter-key`
@@ -684,6 +722,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Search On Enter Key](https://examples.bootstrap-table.com/#options/search-on-enter-key.html)
+
 ## strictSearch
 
 - **Attribute:** `data-strict-search`
@@ -696,6 +736,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `false`
 
+- **Example:** [Strict Search](https://examples.bootstrap-table.com/#options/strict-search.html)
+
 ## trimOnSearch
 
 - **Attribute:** `data-trim-on-search`
@@ -708,6 +750,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `true`
 
+- **Example:** [Trim On Search](https://examples.bootstrap-table.com/#options/trim-on-search.html)
+
 ## searchAlign
 
 - **Attribute:** `data-search-align`
@@ -720,6 +764,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `'right'`
 
+- **Example:** [Search Align](https://examples.bootstrap-table.com/#options/search-align.html)
+
 ## searchTimeOut
 
 - **Attribute:** `data-search-time-out`
@@ -732,6 +778,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `500`
 
+- **Example:** [Search Time Out](https://examples.bootstrap-table.com/#options/search-time-out.html)
+
 ## searchText
 
 - **Attribute:** `data-search-text`
@@ -744,6 +792,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Default:** `''`
 
+- **Example:** [Search Text](https://examples.bootstrap-table.com/#options/search-text.html)
+
 ## customSearch
 
 - **Attribute:** `data-custom-search`

+ 0 - 1
src/bootstrap-table.js

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