From 4159bdb87f031b13cb7086f64f166075e8f03237 Mon Sep 17 00:00:00 2001 From: iapyang Date: Thu, 18 Jun 2020 19:13:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20revert=20=E6=BA=90=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/base.js | 2 +- src/core/foundation.js | 2 +- src/third/jquery.mousewheel.js | 12 ++++++++++-- typescript/fix/fix.ie.ts | 5 ----- typescript/fix/fix.ts | 5 ----- 5 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 typescript/fix/fix.ie.ts delete mode 100644 typescript/fix/fix.ts 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;