diff --git a/src/core/base.js b/src/core/base.js index 20a57bd30..e073da354 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -3,7 +3,7 @@ * Create By GUY 2014\11\17 * */ -_global = undefined; +var _global; if (typeof window !== "undefined") { _global = window; } else if (typeof global !== "undefined") { diff --git a/src/core/foundation.js b/src/core/foundation.js index 067178cbd..e8555e32e 100644 --- a/src/core/foundation.js +++ b/src/core/foundation.js @@ -4,7 +4,7 @@ /** * 初始化BI对象 */ -_global = undefined; +var _global; if (typeof window !== "undefined") { _global = window; } else if (typeof global !== "undefined") { diff --git a/src/third/jquery.mousewheel.js b/src/third/jquery.mousewheel.js index 0d7ff8cb9..23d4648ad 100644 --- a/src/third/jquery.mousewheel.js +++ b/src/third/jquery.mousewheel.js @@ -7,8 +7,16 @@ */ (function (factory) { - // Browser globals - factory(BI.jQuery); + if ( typeof define === "function" && define.amd ) { + // AMD. Register as an anonymous module. + define(["../core/jquery"], factory); + } else if (typeof exports === "object") { + // Node/CommonJS style for Browserify + module.exports = factory; + } else { + // Browser globals + factory(BI.jQuery); + } }(function ($) { var toFix = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], diff --git a/typescript/fix/fix.ie.ts b/typescript/fix/fix.ie.ts deleted file mode 100644 index df4502015..000000000 --- a/typescript/fix/fix.ie.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-ignore -import * as Fix from "../../dist/fix/fix.ie.js"; - -// @ts-ignore -_global.Fix = Fix; diff --git a/typescript/fix/fix.ts b/typescript/fix/fix.ts deleted file mode 100644 index d7be36640..000000000 --- a/typescript/fix/fix.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-ignore -import * as Fix from "../../dist/fix/fix.js"; - -// @ts-ignore -_global.Fix = Fix;