Now I am show images in the web ui like this:
{
title: 'Image',
render: row => {
if(row.checkType === 2){
return (<span style={{color:'red'}}>
<img className={styles.img} src={row.url} referrerPolicy="no-referrer" onclick={this.handleOpen(row.url)}alt="img" />
</span>)
}else{
return row.text;
}
}
}
I am using antd 3, it did not contain the Image component. I want that when the user click the image, the image will pop and full the screen so that the user could see the image clear. But the img click have no response by default. I am do it with window.open like this in the onclick event:
handleOpen = (url) =>{
window.open(url);
}
it seems did not work, when click the image, just pop up the download window. what should I do to make the user preview the image? this is the image url: https://6b02d792-e941-4c15-a344-2e12867d06e1.oss-cn-shanghai.aliyuncs.com/spark/game/images/jigou_64/1646298300722.jpg