import React, { Component } from 'react'; import './index.less'; import { Modal, Icon } from 'antd'; import AnswerButton from '../AnswerButton'; export default class extends Component { render() { const { show, className, children, width, title, btnAlign = 'right', cancelText = '取消', confirmText = '确定', onCancel, onConfirm, onClose, close = true, maskClosable = false, body = true, center, height, getContainer, } = this.props; return (
{close && onClose && onClose()} />}
{title}
{body ? (
{children}
) : ( children )}
{onCancel && ( onCancel()}> {cancelText} )} {onCancel && onConfirm && ( onConfirm()}> {confirmText} )} {!onCancel && onConfirm && ( onConfirm()}> {confirmText} )}
); } }