Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda