index.jsx 1.08 KB
Newer Older
Maofei94's avatar
Maofei94 committed
1
import React, { useEffect, useState } from 'react';
Maofei94's avatar
Maofei94 committed
2
import { useHistory } from 'react-router-dom';
Maofei94's avatar
Maofei94 committed
3 4
import { Modal, Button } from 'antd';
import ColConen from './colContent';
Maofei94's avatar
Maofei94 committed
5 6 7
import styles from './index.less';
const Colophon = props => {
  const historyPath = useHistory();
Maofei94's avatar
Maofei94 committed
8
  const [visible, setVisible] = useState(false);
Maofei94's avatar
Maofei94 committed
9
  const handleClick = () => {
Maofei94's avatar
Maofei94 committed
10
    // historyPath.push('/colophon');
Maofei94's avatar
Maofei94 committed
11
    console.log(historyPath);
Maofei94's avatar
Maofei94 committed
12
    setVisible(true);
Maofei94's avatar
Maofei94 committed
13 14 15
  };
  return (
    <div className={styles.desc} onClick={handleClick}>
皮倩雯's avatar
皮倩雯 committed
16
      <div>版本v6.0.20211224</div>
Maofei94's avatar
Maofei94 committed
17 18 19
      <div onClick={e => e.stopPropagation()}>
        <Modal
          width={1200}
tianfen's avatar
tianfen committed
20
          // height={600}
Maofei94's avatar
Maofei94 committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
          visible={visible}
          footer={[
            <Button
              style={{ marginRight: '10px' }}
              type="primary"
              key="close"
              onClick={() => setVisible(false)}
            >
              确认
            </Button>,
          ]}
          onCancel={() => setVisible(false)}
        >
          <ColConen />
        </Modal>
      </div>
Maofei94's avatar
Maofei94 committed
37 38 39 40 41
    </div>
  );
};

export default Colophon;