Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LiuCaptain opened this issue Nov 28, 2023 · 0 comments
Open

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

LiuCaptain opened this issue Nov 28, 2023 · 0 comments

Comments

@LiuCaptain
Copy link

  <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 的值进行设置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant