From 9731fd692fc51c0a3a90d03353781b637c392b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=84=B6?= Date: Fri, 22 Oct 2021 09:50:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Pick=20=E5=AF=BC=E8=87=B4=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit react 16. 13 以下的版本会报错。 Pick 属性的时候,不能在 React.ComponentType>; 中,找到translate,需要每个图标自己添加。否则 TSlLint报错。 鼠标滚轮 onAuxClick, onAuxClickCapture 也有类似的问题,需要更新或修改 @types/react/index.d.ts 这个可以说是react版本问题。 --- packages/icons-react/src/components/Icon.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/icons-react/src/components/Icon.tsx b/packages/icons-react/src/components/Icon.tsx index 38db4c1b2..552b6c435 100644 --- a/packages/icons-react/src/components/Icon.tsx +++ b/packages/icons-react/src/components/Icon.tsx @@ -7,6 +7,7 @@ import { svgBaseProps, warning, useInsertStyles } from '../utils'; export interface IconBaseProps extends React.HTMLProps { spin?: boolean; rotate?: number; + translate?: string; } export interface CustomIconComponentProps { From 7d0787d5250c1bb341950f6be232cdd8405d8a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=84=B6?= Date: Fri, 22 Oct 2021 15:26:49 +0800 Subject: [PATCH 2/2] Update Icon.tsx --- packages/icons-react/src/components/Icon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icons-react/src/components/Icon.tsx b/packages/icons-react/src/components/Icon.tsx index 552b6c435..64466b2c9 100644 --- a/packages/icons-react/src/components/Icon.tsx +++ b/packages/icons-react/src/components/Icon.tsx @@ -7,7 +7,7 @@ import { svgBaseProps, warning, useInsertStyles } from '../utils'; export interface IconBaseProps extends React.HTMLProps { spin?: boolean; rotate?: number; - translate?: string; + translate?: string; } export interface CustomIconComponentProps {