From 61f5ffa868a17c29bfce92c28b72fdb5e0ffa3a4 Mon Sep 17 00:00:00 2001 From: manzhenhua Date: Tue, 19 May 2020 21:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant_components/BIModal/index.js | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/ant_components/BIModal/index.js b/ant_components/BIModal/index.js index 96c696b..dbef8ac 100644 --- a/ant_components/BIModal/index.js +++ b/ant_components/BIModal/index.js @@ -2,7 +2,6 @@ import React from 'react'; import { Modal } from 'antd'; import './style.less'; -const confirm = Modal.confirm; /* * Modal 组件 @@ -11,24 +10,18 @@ const confirm = Modal.confirm; * 只扩展自定义样式 * */ // wrapClassName不传默认BIModalWrap -class BIModal extends React.PureComponent { - render() { - return ( - - - {this.props.children} - - - ); - } +const BIModal = (props) => { + + return ( + + {props.children} + + ); + } -export { BIModal as default }; -BIModal.confirm = (config = {}) => { - return confirm({ - cancelText: '取消', - okText: '确定', - ...config, - }); -}; -BIModal.warning = Modal.warning; +export default BIModal + -- 2.21.0