react-photo-view icon indicating copy to clipboard operation
react-photo-view copied to clipboard

预览组件图片源响应式支持,有办法支持一下吗

Open LiuCaptain opened this issue 1 year ago • 0 comments

  <PhotoView src={photoViewImage}>
    <picture>
      <source media="(max-width: 768px)" srcSet={mobileSrc} />
      <source media="(min-width: 769px)" srcSet={desktopSrc} />
      <Image src={desktopSrc} alt={alt} {...props}></Image>
    </picture>
  </PhotoView>
</PhotoProvider>

所以我这里只能监听屏幕大小对 photoViewImage 的值进行设置

LiuCaptain avatar Nov 28 '23 11:11 LiuCaptain