From 06ba6a07aeb3d295e2d4feb3e9840ecbedddff41 Mon Sep 17 00:00:00 2001 From: iapyang Date: Thu, 17 Oct 2019 16:54:31 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20ie8=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/function.js | 4 ++++ webpack/webpack.common.js | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 8e7f69d35..ad972d713 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -105,6 +105,10 @@ _.extend(BI, { humpString = [], htmlStyle = document.documentElement.style, _toHumb = function (string) { + if (!BI.isString(string)) { + return ""; + } + return string.replace(/-(\w)/g, function ($0, $1) { return $1.toUpperCase(); }); diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 550923d0b..cefc1885f 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -10,7 +10,16 @@ module.exports = { fineui: [ ...isBuilt4IE8 ? [ - "core-js", + "core-js/features/object/define-property", + "core-js/features/object/create", + "core-js/features/object/assign", + "core-js/features/array/for-each", + "core-js/features/array/index-of", + "core-js/features/function/bind", + "core-js/features/promise", + "core-js/features/object/get-own-property-symbols", + "core-js/features/string/replace", + // "core-js", ] : [ "@babel/polyfill",