1.1.1 • Published 6 months ago

@siroi/secondary-confirmation-antd v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@siroi/secondary-confirmation-antd

基于 antd v4 的二次确认框组件,对需要二次弹窗的 onClick 进行包装,无需增加过多的代码。

简单使用

import SecConAntd from "@siroi/secondary-confirmation-antd";
import {Button} from "antd"

export default () => {
  return (<SecConAntd>
	<Button onClick={() => console.log('🎉🎉')))}}>点击</Button>
       </SecConAntd>)
}
type TwoDeleteButtonProps = {
    children: ReactElement<{
        onClick?: () => void;
        disabled?: boolean;
    }>;
    key?: number;
    title?: string;
    type: 'popconfirm' | 'modal';
    modalProps?: ModalFuncProps;
};

支持两种二次确认方式:popconfirmmodal, 对于 modal 场景,支持传入 antd 的 ModalFuncProps

1.1.1

6 months ago

1.1.0

7 months ago

1.0.2

8 months ago