import React, { useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Modal, Button } from 'antd'; import ColConen from './colContent'; import styles from './index.less'; const Colophon = props => { const historyPath = useHistory(); const [visible, setVisible] = useState(false); const handleClick = () => { // historyPath.push('/colophon'); console.log(historyPath); setVisible(true); }; return ( <div className={styles.desc} onClick={handleClick}> <div>版本v6.0.20211224</div> <div onClick={e => e.stopPropagation()}> <Modal width={1200} // height={600} visible={visible} footer={[ <Button style={{ marginRight: '10px' }} type="primary" key="close" onClick={() => setVisible(false)} > 确认 </Button>, ]} onCancel={() => setVisible(false)} > <ColConen /> </Modal> </div> </div> ); }; export default Colophon;