-
Notifications
You must be signed in to change notification settings - Fork 838
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: 修复 range-component 在百度小程序下点击获取元素位置信息报错 #3123
Conversation
Walkthrough此次更改主要集中在 Changes
Poem
Tip AI model upgrade
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v4 #3123 +/- ##
==========================================
- Coverage 84.03% 83.93% -0.11%
==========================================
Files 226 226
Lines 22941 22941
Branches 2486 2480 -6
==========================================
- Hits 19278 19255 -23
- Misses 3645 3668 +23
Partials 18 18 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/packages/__VUE/range/index.taro.vue (1 hunks)
Additional comments not posted (1)
src/packages/__VUE/range/index.taro.vue (1)
315-327
: 修复在不同环境下获取元素位置的逻辑使用
switch
语句来处理不同环境类型(WEB、SWAN 和默认情况),确保clientX
和clientY
值根据环境类型正确设置。代码逻辑清晰,解决了之前在百度小程序下点击获取元素位置信息报错的问题。
这个 PR 做了什么? (简要描述所做更改)
这个 PR 修复了 range 组件在百度小程序下点击报错的问题的兼容处理,在百度小程序环境中,
click
事件(也就是编译后的tap
事件)无法直接从touches
属性获取元素的位置信息。这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
这个 PR 是否已自测:
Summary by CodeRabbit
clientX
和clientY
值。