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

feat(ImageViewer): 底层图片渲染使用 Image #5790

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

luckymore
Copy link
Contributor

#5765
@miracles1919 有几个不确定的点,麻烦神迹大佬看一下:

  1. placeholder 要不要默认为空?(图片加载完成后会闪一下)
  2. Image 的 max-width max-height 使用了 vw vh 单位,否则图片无法自适应
  3. Image 组件内使用 forwardRef 后, props和ref的类型写了两遍,没找到别的办法

@miracles1919
Copy link
Contributor

可以在 defalultProps 里加个 placeholder: null

src/components/image/image.tsx Outdated Show resolved Hide resolved
src/components/image-viewer/image-viewer.less Outdated Show resolved Hide resolved
src/components/image-viewer/index.en.md Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-5790.surge.sh

@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Patch coverage: 81.81% and project coverage change: -1.30% ⚠️

Comparison is base (4cf67a3) 90.90% compared to head (5dfc853) 89.61%.

❗ Current head 5dfc853 differs from pull request most recent head 7112188. Consider uploading reports for the commit 7112188 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5790      +/-   ##
==========================================
- Coverage   90.90%   89.61%   -1.30%     
==========================================
  Files         305      297       -8     
  Lines        6607     6392     -215     
  Branches     1635     1579      -56     
==========================================
- Hits         6006     5728     -278     
- Misses        556      612      +56     
- Partials       45       52       +7     
Files Changed Coverage Δ
src/components/image-viewer/image-viewer.tsx 95.34% <ø> (ø)
src/components/image-viewer/slides.tsx 88.37% <0.00%> (-2.11%) ⬇️
src/locales/ja-JP.ts 100.00% <ø> (ø)
src/components/image-viewer/slide.tsx 36.52% <75.00%> (-21.89%) ⬇️
src/components/image/image.tsx 100.00% <100.00%> (ø)

... and 70 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luckymore
Copy link
Contributor Author

@miracles1919 大佬有空再看下吧~

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

Successfully merging this pull request may close these issues.

2 participants