-
Notifications
You must be signed in to change notification settings - Fork 245
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(imagepreview): 无法在预期情景正确关闭图片的异常 #2421
Conversation
Walkthrough组件库中的 Changes
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2421 +/- ##
=======================================
Coverage 86.01% 86.01%
=======================================
Files 217 217
Lines 22855 22862 +7
Branches 2545 2545
=======================================
+ Hits 19658 19665 +7
Misses 3192 3192
Partials 5 5 ☔ View full report in Codecov by Sentry. |
@@ -20,6 +20,7 @@ const Demo1 = () => { | |||
return ( | |||
<> | |||
<ImagePreview | |||
closeOnContentClick |
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.
考虑下 不改demo的情况下,怎么实现~
改demo 意味着用户都得改~~~
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.
之前的版本仅在微信小程序下表现异常,原因主要是Image组件在微信端表现不一致导致。调整并精简了Image组件写法使各端一致的表现。对方反馈在京东小程序业务下已经解决了问题。
把事件放到正确的位置
Summary by CodeRabbit
新功能
ImagePreview
组件新增closeOnContentClick
属性,用户点击内容时预览图会关闭。改进
TaroVideo
和Image
组件中添加了closeOnImg
点击事件处理,优化了交互体验。closeOnImg
函数现在接受any
类型参数,增强了事件处理的灵活性。