From 76571575864e7636a7cf03921a9dd84b32397c1e Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 23 Jan 2022 10:25:59 +0800 Subject: [PATCH] style: remove not use file --- components/_util/createChainedFunction.js | 22 ---------------------- components/_util/isFlexSupported.js | 12 ------------ 2 files changed, 34 deletions(-) delete mode 100644 components/_util/createChainedFunction.js delete mode 100644 components/_util/isFlexSupported.js diff --git a/components/_util/createChainedFunction.js b/components/_util/createChainedFunction.js deleted file mode 100644 index 3d1fd45a3..000000000 --- a/components/_util/createChainedFunction.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Safe chained function - * - * Will only create a new function if needed, - * otherwise will pass back existing functions or null. - * - * @returns {function|null} - */ -export default function createChainedFunction() { - const args = [].slice.call(arguments, 0); - if (args.length === 1) { - return args[0]; - } - - return function chainedFunction() { - for (let i = 0; i < args.length; i++) { - if (args[i] && args[i].apply) { - args[i].apply(this, arguments); - } - } - }; -} diff --git a/components/_util/isFlexSupported.js b/components/_util/isFlexSupported.js deleted file mode 100644 index dd6a5ae7e..000000000 --- a/components/_util/isFlexSupported.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function isFlexSupported() { - if (typeof window !== 'undefined' && window.document && window.document.documentElement) { - const { documentElement } = window.document; - return ( - 'flex' in documentElement.style || - 'webkitFlex' in documentElement.style || - 'Flex' in documentElement.style || - 'msFlex' in documentElement.style - ); - } - return false; -}