1.0.0 • Published 1 year ago

react-picture-view-yjt v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

github地址:https://github.com/yjt-sys/react-picture-view-yjt

引入图片查看器组件

//引入
import PictureViewer from 'react-picture-view-yjt/build'

使用

export default function App() {
	/*
		*@params imageData: string[]  图片数组   closeClick 关闭回调	
	*/
	const imageData = []
	const [closeClick,setCloseClick] = useState(false)
 return (
    <div>
      <button onClick={()=>setCloseClick(true)}>显示照片</button>
   		{ closeClick &&(
        <PictureViewer ImageData={imageData} closeClick={()=>setCloseClick(false)}/>
      )}

  </div>

 )
}
1.0.0

1 year ago