Repository navigation
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.
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值。