ソースを参照

Merge pull request #5578 from wenzhixin/fix/5576

Fixed auto refresh not clear interval bug
Dustin Utecht 4 年 前
コミット
0680479ddd

+ 8 - 0
src/extensions/auto-refresh/bootstrap-table-auto-refresh.js

@@ -77,4 +77,12 @@ $.BootstrapTable = class extends $.BootstrapTable {
       this.options.autoRefreshStatus = !this.options.autoRefreshStatus
     }
   }
+
+  destroy () {
+    if (this.options.autoRefresh && this.options.autoRefreshStatus) {
+      clearInterval(this.options.autoRefreshFunction)
+    }
+
+    super.destroy()
+  }
 }