From ac495a4af1a9a591b34f636e665166de9a3ce025 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 3 Jul 2020 10:04:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=85=8D=E5=90=88webpack=E6=89=93?= =?UTF-8?q?=E5=8C=85?= 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 | 22 ++++++++++++---------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/core/base.js b/src/core/base.js index e073da354b..20a57bd309 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -3,7 +3,7 @@ * Create By GUY 2014\11\17 * */ -var _global; +_global = undefined; if (typeof window !== "undefined") { _global = window; } else if (typeof global !== "undefined") { diff --git a/src/core/foundation.js b/src/core/foundation.js index e8555e32e0..067178cbd5 100644 --- a/src/core/foundation.js +++ b/src/core/foundation.js @@ -4,7 +4,7 @@ /** * 初始化BI对象 */ -var _global; +_global = undefined; 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 23d4648adb..557fe35e43 100644 --- a/src/third/jquery.mousewheel.js +++ b/src/third/jquery.mousewheel.js @@ -7,16 +7,18 @@ */ (function (factory) { - 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); - } + // 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"],