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
fix: Avatar doesn't scale when display is none #26522
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f2ec3a0:
|
Codecov Report
@@ Coverage Diff @@
## master #26522 +/- ##
==========================================
- Coverage 99.75% 99.75% -0.01%
==========================================
Files 383 383
Lines 7351 7343 -8
Branches 2048 2053 +5
==========================================
- Hits 7333 7325 -8
Misses 18 18
Continue to review full report at Codecov.
|
来个用例? |
if (props.children) { | ||
setScaleParam(); | ||
} | ||
}, [isImgExist]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
每次 effect 都算一次太耗费了,包一个 ResizeObserver 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大佬,这里改好了
这个测试好像不好写,display:none好像没用,我看见之前偏右大佬专门写了一个调试专用demo来测试这个问题 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
close #26521
💡 Background and solution
📝 Changelog
display: none
时不会正确缩放 fallback 文字的问题。☑️ Self Check before Merge