-
-
Notifications
You must be signed in to change notification settings - Fork 175
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: 表单校验不隐藏错误消息dom #506
base: master
Are you sure you want to change the base?
fix: 表单校验不隐藏错误消息dom #506
Conversation
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改涉及两个组件, Changes
Sequence Diagram(s)(此处不生成序列图,因为更改过于简单。) 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 Configuration 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/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue (1 hunks)
- src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue (1 hunks)
Additional comments not posted (2)
src/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue (1)
41-41
: 始终渲染错误消息元素的潜在视觉影响移除
v-if="errorMessage"
后,错误消息元素将始终渲染。这可能导致在errorMessage
为空或未定义时,页面布局出现意外的视觉效果。确保在样式上考虑这些情况,以避免不必要的空白或布局问题。请确认在
errorMessage
为空或未定义时,布局是否仍然符合预期。src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue (1)
70-70
: 错误消息元素的持续渲染可能影响布局去掉
v-if="errorMessage"
后,错误消息元素将始终存在于 DOM 中。这可能会在errorMessage
为空或未定义时导致视觉效果不佳。建议检查和调整样式,以确保在这些情况下不会出现不必要的空白或布局问题。请确保在
errorMessage
为空或未定义时,布局和视觉效果仍然符合预期。
可以试试 设置为toast能否解决你的问题。 |
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
目前的校验错误信息标签如果没有是隐藏的,校验后出现错误信息页面都撑高,不太好做样式的处理,比如加固定高度校验后不会页面撑高
💡 需求背景和解决方案
1、方便给错误信息的样式处理,比如手动给 error-message 的标签加高度,去掉 v-if 后也不影响现有的交互
2、去掉 v-if="errorMessage"
☑️ 请求合并前的自查清单
Summary by CodeRabbit
wd-cell
和wd-input
组件,错误消息现在始终呈现,即使没有错误信息,这可能会影响组件的视觉表现。