Browse Source

Merge pull request #148 from mengyou658/master

fix bug: if events is defined with namespace.
文翼 11 years ago
parent
commit
22e4b1ec79
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/bootstrap-table.js

+ 2 - 1
src/bootstrap-table.js

@@ -952,8 +952,9 @@
             if (!events) {
                 return;
             }
+            // fix bug, if events is defined with namespace
             if (typeof events === 'string') {
-                events = window[events];
+                events = window[events] || eval(events);;
             }
             for (var key in events) {
                 that.$body.find('tr').each(function () {