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

390
Views
¿Cómo mostrar el nombre de la imagen en el componente Ant design <Image.PreviewGroup>?
<Image.PreviewGroup> <Image width={200} src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" /> <Image width={200} src="https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg" /> </Image.PreviewGroup>

Quiero mostrar el nombre de la imagen actual como se muestra en la siguiente captura de pantalla:

Nota : estoy usando antd: v4.16.13 Captura de pantalla

Referencia: https://ant.design/components/image/#components-image-demo-preview-group

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Creo que no hay una API oficial para hacer esto.

Puede hacer esto como una solución alternativa. En lugar de representar los números de conteo, puede mostrar los nombres de las imágenes.

 const { createRoot } = ReactDOM; const { Image } = antd; const App = () => { const names = ["First Image", "Second Image"]; return ( <Image.PreviewGroup preview={{ countRender: (current) => names[current - 1] }} > <Image width={200} src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" /> <Image width={200} src="https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg" /> </Image.PreviewGroup> ); }; const Demo = App; createRoot(mountNode).render(<Demo />);
about 4 years ago · Santiago Trujillo Report
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!