import React from 'react'; import { Button } from 'antd'; import { getModal } from '@/webPublic/one_stop_public/utils/utils'; import styles from './style.less' const Modal = getModal(); export default class FormModal extends React.Component { render() { const showFullScreen = () => { let dom = document.getElementById('smartFormModal'); dom.requestFullscreen(); console.log(dom); }; return ( <Modal bodyStyle={{ maxHeight: '80vh', overflowY: 'auto', }} {...this.props} destroyOnClose title={this.props.title} maskClosable={false} width={this.props.width} height={this.props.height} visible={this.props.visible} footer={null} onCancel={this.props.handleCancel}> {this.props.showFullScreen && ( <Button type={'primary'} onClick={showFullScreen}> 全屏查看 </Button> )} <div id={'smartFormModal'} className={styles.fullScreen}> {this.props.children} </div> </Modal> ); } }