-
Notifications
You must be signed in to change notification settings - Fork 834
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(input, textarea): 修改只读禁用属性设置逻辑 #3104
Conversation
Warning Rate limit exceeded@eiinu has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 35 minutes and 30 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Walkthrough对多个 Vue 组件进行了统一的功能更新,包括新的条件逻辑绑定形式处理 Changes
Poem
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 (
|
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 (2)
- src/packages/__VUE/input/input.taro.vue (1 hunks)
- src/packages/__VUE/textarea/textarea.taro.vue (1 hunks)
Additional comments not posted (3)
src/packages/__VUE/textarea/textarea.taro.vue (1)
9-9
: 此更改确保了在 Taro Vue 环境中,当disabled
或readonly
属性为假时,可以正确地不渲染这些属性。这是一个符合 Vue 条件绑定属性的最佳实践。src/packages/__VUE/input/input.taro.vue (2)
17-17
: 此更改确保了在 Taro Vue 环境中,当disabled
属性为假时,可以正确地不渲染这个属性。这是一个符合 Vue 条件绑定属性的最佳实践。
18-18
: 此更改确保了在 Taro Vue 环境中,当readonly
属性为假时,可以正确地不渲染这个属性。这是一个符合 Vue 条件绑定属性的最佳实践。
关联 issue:NervJS/taro#15946 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v4 #3104 +/- ##
==========================================
- Coverage 84.03% 83.87% -0.16%
==========================================
Files 226 226
Lines 22939 22939
Branches 2482 2472 -10
==========================================
- Hits 19276 19240 -36
- Misses 3645 3681 +36
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 (2)
- src/packages/__VUE/inputnumber/input-number.vue (1 hunks)
- src/packages/__VUE/searchbar/index.taro.vue (1 hunks)
Additional comments not posted (2)
src/packages/__VUE/inputnumber/input-number.vue (1)
18-19
: 这里的逻辑修改确保了在 Taro Vue 小程序环境中,当disabled
和readonly
属性为false
时,这些属性不会被错误地应用。这种条件绑定的做法是一个有效的临时解决方案,直到 Taro 修复相关的问题。src/packages/__VUE/searchbar/index.taro.vue (1)
20-21
: 此代码段的修改与 input-number.vue 文件中的修改类似,通过条件表达式解决了 Taro Vue 小程序环境中disabled
和readonly
属性为false
时的问题。这是对现有问题的有效临时修复。
这个 PR 做了什么? (简要描述所做更改)
存在的问题:
当 Vue 版本 >= 3.4.28 时,Taro 小程序环境的 input 等标签中的 boolean 类型属性在设置为 false 时无效
理论上应该由 Taro 解决这一问题,不过我们可以提前做一些修改绕过它。
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
这个 PR 是否已自测:
Summary by CodeRabbit
disabled
和readonly
属性处理问题,确保在特定条件下这些属性被正确设置为undefined
。disabled
属性处理问题,确保在特定条件下该属性被正确设置为undefined
。