浏览代码

Merge branch 'patch-2' of https://github.com/D0d0/bootstrap-table into D0d0-patch-2

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

+ 4 - 1
src/bootstrap-table.js

@@ -1978,7 +1978,10 @@
         if (this.options.ajax) {
             calculateObjectValue(this, this.options.ajax, [request], null);
         } else {
-            $.ajax(request);
+            if(this._xhr) {
+                this._xhr.abort();
+            }
+            this._xhr = $.ajax(request);
         }
     };