import React, { useState } from 'react';
import { Button } from 'antd';
import Modal from '../../../themeComponents/Modal';
import CaptureImgView from '../../../businessComponents/CaptureImgView';

export default function Picture() {
  const [visible, setVisible] = useState(false);
  return (
    <>
      <Button onClick={() => setVisible(true)}>弹出层</Button>
      <CaptureImgView imagePath="http://192.168.100.40:8099/image/v1/753377965/objects/6042c88a2ce7a2ad101026b9/1615132800.jpg?signature=d478847beb4144f299002e2101f72f86&watermark=m_E5BA94E794A8E7B3BBE7BB9FE7AEA1E79086E591980A323032313033303754313531323333&expires=1615132800" />
      <Modal visible={visible} title="图片预览" width={800} style={{ height: 544 }} onCancel={() => setVisible(false)}>
        <CaptureImgView onPageChange={()=>setVisible(false)} minHeight={300} imagePath="http://192.168.100.40:8099/image/v1/753377965/objects/6042c88a2ce7a2ad101026b9/1615132800.jpg?signature=d478847beb4144f299002e2101f72f86&watermark=m_E5BA94E794A8E7B3BBE7BB9FE7AEA1E79086E591980A323032313033303754313531323333&expires=1615132800" />
      </Modal>
    </>
  );
}
