浏览代码

fix showFullscreen onclick misplacement

earl.seay 6 年之前
父节点
当前提交
993b2e7d41
共有 1 个文件被更改,包括 5 次插入5 次删除
  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))