From d6200a976e5c153a28d4ab6730807707c263b699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9D=AA?= Date: Sat, 12 Dec 2020 12:02:29 +0800 Subject: [PATCH] feat: use resetProps --- src/components/dialog/ConfirmDialog.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/components/dialog/ConfirmDialog.tsx b/src/components/dialog/ConfirmDialog.tsx index def5dedb9..98988d958 100644 --- a/src/components/dialog/ConfirmDialog.tsx +++ b/src/components/dialog/ConfirmDialog.tsx @@ -28,12 +28,6 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { onCancel, onOk, close, - zIndex, - afterClose, - visible, - keyboard, - centered, - getContainer, maskStyle, okText = 'delete', okButtonProps, @@ -41,7 +35,6 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { cancelButtonProps, bodyStyle, closable = true, - closeIcon, className, okCancel, width = 520, @@ -50,6 +43,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { maskClosable = false, transitionName = 'zoom', maskTransitionName = 'fade', + ...resetProps } = props; const confirmDescriperClassName = getBEMElement( @@ -82,23 +76,16 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { )]: !!props.centered, })} onCancel={() => close({ triggerCancel: true })} - visible={visible} title="" transitionName={transitionName} footer="" maskTransitionName={maskTransitionName} mask={mask} maskClosable={maskClosable} - maskStyle={maskStyle} style={style} width={width} - zIndex={zIndex} - afterClose={afterClose} - keyboard={keyboard} - centered={centered} - getContainer={getContainer} closable={closable} - closeIcon={closeIcon} + {...resetProps} >