diff --git a/bi/core.js b/bi/core.js index a1302b3db..fbe93acd9 100644 --- a/bi/core.js +++ b/bi/core.js @@ -2920,6 +2920,10 @@ if (!window.BI) { return /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); }, + isEdge: function () { + return /edge/i.test(navigator.userAgent.toLowerCase()); + }, + isChrome: function () { return /chrome/i.test(navigator.userAgent.toLowerCase()); }, @@ -2940,6 +2944,14 @@ if (!window.BI) { return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); }, + isMac: function () { + return /macintosh|mac os x/i.test(navigator.userAgent); + }, + + isWindows: function () { + return /windows|win32/i.test(navigator.userAgent); + }, + isSupportCss3: function (style) { var prefix = ['webkit', 'Moz', 'ms', 'o'], i, len, @@ -17799,16 +17811,16 @@ $(function () { //注册控件 BI.Plugin.registerWidget("bi.grid_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_grid_table"}); } else { return ob; } }); BI.Plugin.registerWidget("bi.collection_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_collection_table"}); } else { return ob; diff --git a/docs/core.js b/docs/core.js index 920883e37..7457258ad 100644 --- a/docs/core.js +++ b/docs/core.js @@ -14062,6 +14062,10 @@ if (!window.BI) { return /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); }, + isEdge: function () { + return /edge/i.test(navigator.userAgent.toLowerCase()); + }, + isChrome: function () { return /chrome/i.test(navigator.userAgent.toLowerCase()); }, @@ -14082,6 +14086,14 @@ if (!window.BI) { return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); }, + isMac: function () { + return /macintosh|mac os x/i.test(navigator.userAgent); + }, + + isWindows: function () { + return /windows|win32/i.test(navigator.userAgent); + }, + isSupportCss3: function (style) { var prefix = ['webkit', 'Moz', 'ms', 'o'], i, len, @@ -28941,16 +28953,16 @@ $(function () { //注册控件 BI.Plugin.registerWidget("bi.grid_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_grid_table"}); } else { return ob; } }); BI.Plugin.registerWidget("bi.collection_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_collection_table"}); } else { return ob; diff --git a/src/config.js b/src/config.js index a6b62ffac..0e0a36110 100644 --- a/src/config.js +++ b/src/config.js @@ -57,16 +57,16 @@ $(function () { //注册控件 BI.Plugin.registerWidget("bi.grid_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_grid_table"}); } else { return ob; } }); BI.Plugin.registerWidget("bi.collection_table", function (ob) { - //IE下滚动条滑动效果不好,禁止掉 - if (BI.isIE() || BI.isFireFox()) { + //非chrome下滚动条滑动效果不好,禁止掉 + if (!(BI.isChrome() && BI.isWindows())) { return BI.extend(ob, {type: "bi.quick_collection_table"}); } else { return ob; diff --git a/src/core/base.js b/src/core/base.js index 65b3916bc..44711e0ad 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -1025,6 +1025,10 @@ if (!window.BI) { return /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); }, + isEdge: function () { + return /edge/i.test(navigator.userAgent.toLowerCase()); + }, + isChrome: function () { return /chrome/i.test(navigator.userAgent.toLowerCase()); }, @@ -1045,6 +1049,14 @@ if (!window.BI) { return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); }, + isMac: function () { + return /macintosh|mac os x/i.test(navigator.userAgent); + }, + + isWindows: function () { + return /windows|win32/i.test(navigator.userAgent); + }, + isSupportCss3: function (style) { var prefix = ['webkit', 'Moz', 'ms', 'o'], i, len,