Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
how to preview a image in antd 3

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!