/*eslint-disable*/ import React, { PureComponent } from 'react'; import { Modal } from 'antd-mobile-v2'; export default class ModalBase extends PureComponent { state = { visible: this.props.visible, } closeModal = () => { this.setState({ visible: false }); } openModal = () => { this.setState({ visible: true }); } render() { const { title, submitAction, content, cancelAction, ...others } = this.props; return <> { typeof cancelAction === 'function' && cancelAction() } }, { text: '确认', onPress: () => { typeof submitAction === 'function' && submitAction() } }, ]} { ...others } >
{ content }
} }