Browse Source

Merge pull request #4162 from earlseay/showFullscreenBug4161

fix showFullscreen onclick misplacement
文翼 6 years ago
parent
commit
8d566f9010
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/bootstrap-table.js

+ 5 - 5
src/bootstrap-table.js

@@ -1116,11 +1116,6 @@
         '</button>')
       }
 
-      if (this.options.showFullscreen) {
-        this.$toolbar.find('button[name="fullscreen"]')
-          .off('click').on('click', $.proxy(this.toggleFullscreen, this))
-      }
-
       if (this.options.showRefresh) {
         html.push(Utils.sprintf(`<button class="btn${Utils.sprintf(' btn-%s', this.options.buttonsClass)}${Utils.sprintf(' btn-%s', this.options.iconSize)}" type="button" name="refresh" aria-label="refresh" title="%s">`,
           this.options.formatRefresh()),
@@ -1184,6 +1179,11 @@
           .off('click').on('click', $.proxy(this.togglePagination, this))
       }
 
+      if (this.options.showFullscreen) {
+        this.$toolbar.find('button[name="fullscreen"]')
+          .off('click').on('click', $.proxy(this.toggleFullscreen, this))
+      }
+
       if (this.options.showRefresh) {
         this.$toolbar.find('button[name="refresh"]')
           .off('click').on('click', $.proxy(this.refresh, this))