diff --git a/components/card/index.tsx b/components/card/index.tsx index 361ea4e9c0..983eb92c89 100644 --- a/components/card/index.tsx +++ b/components/card/index.tsx @@ -49,7 +49,7 @@ export interface CardProps extends Omit, 't cover?: React.ReactNode; actions?: React.ReactNode[]; tabList?: CardTabListType[]; - tabBarExtraContent?: React.ReactNode | null; + tabBarExtraContent?: React.ReactNode; onTabChange?: (key: string) => void; activeTabKey?: string; defaultActiveTabKey?: string; diff --git a/components/message/index.tsx b/components/message/index.tsx index 43b5ab46d9..a61d6a571c 100755 --- a/components/message/index.tsx +++ b/components/message/index.tsx @@ -198,7 +198,7 @@ function notice(args: ArgsProps): MessageType { return result; } -type ConfigContent = React.ReactNode | string; +type ConfigContent = React.ReactNode; type ConfigDuration = number | (() => void); type JointContent = ConfigContent | ArgsProps; export type ConfigOnClose = () => void; diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 9b28f9cb2b..f981308104 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -38,7 +38,7 @@ export interface ModalProps { /** 确定按钮 loading */ confirmLoading?: boolean; /** 标题 */ - title?: React.ReactNode | string; + title?: React.ReactNode; /** 是否显示右上角的关闭按钮 */ closable?: boolean; /** 点击确定回调 */ diff --git a/components/tree/utils/iconUtil.tsx b/components/tree/utils/iconUtil.tsx index 48bcb4324c..d479b7fd62 100644 --- a/components/tree/utils/iconUtil.tsx +++ b/components/tree/utils/iconUtil.tsx @@ -10,7 +10,7 @@ import { isValidElement, cloneElement } from '../../_util/reactNode'; export default function renderSwitcherIcon( prefixCls: string, - switcherIcon: React.ReactNode | null | undefined, + switcherIcon: React.ReactNode, showLine: boolean | { showLeafIcon: boolean } | undefined, { isLeaf, expanded, loading }: AntTreeNodeProps, ) {