效果
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210420142633741.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3NpbmF0XzQwNjI4NzU2,size_16,color_FFFFFF,t_70)
引用组件
import React from 'react';
import ImageMagnifier from "./ImageMagnifier";
class ImgDemo extends React.Component{
constructor(props) {
super(props);
this.state={
minImg:"./small.jpg",
maxImg:"./large.jpg",
}
}
render(){
const {
minImg,maxImg} = this.state;
return