浏览代码

Fixed the page-change event before init server

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

+ 3 - 2
src/bootstrap-table.js

@@ -1176,13 +1176,14 @@ class BootstrapTable {
     }
 
     this.initPagination()
+
+    this.trigger('page-change', this.options.pageNumber, this.options.pageSize)
+
     if (this.options.sidePagination === 'server') {
       this.initServer()
     } else {
       this.initBody()
     }
-
-    this.trigger('page-change', this.options.pageNumber, this.options.pageSize)
   }
 
   onPageListChange (event) {