浏览代码

Fixed init bug when using onPostBody

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

+ 3 - 3
src/bootstrap-table.js

@@ -15,8 +15,6 @@ class BootstrapTable {
     this.$el_ = this.$el.clone()
     this.timeoutId_ = 0
     this.timeoutFooter_ = 0
-
-    this.init()
   }
 
   init () {
@@ -3084,7 +3082,9 @@ $.fn.bootstrapTable = function (option, ...args) {
     }
 
     if (!data) {
-      $(el).data('bootstrap.table', (data = new $.BootstrapTable(el, options)))
+      data = new $.BootstrapTable(el, options)
+      $(el).data('bootstrap.table', data)
+      data.init()
     }
   })