fix: 🐛 修复NumberKeyboard组件使用 title 插槽未传入关闭文本时不展示头部的问题 - #1060
Conversation
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Walkthrough本次变更主要优化了虚拟数字键盘及通用键盘组件的头部渲染逻辑,修复了仅使用 title 插槽时内容不显示的问题,并在文档中新增了关于组件迁移和废弃的警告提示。涉及的变更均为逻辑和文档调整,无新增 API。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NumberKeyboard
participant Slots
User->>NumberKeyboard: 传入 title 属性或 title 插槽
NumberKeyboard->>Slots: 检查 title 插槽是否存在
alt 存在 title 属性或 title 插槽
NumberKeyboard->>User: 渲染 header 并显示 title 内容
else 存在 close 按钮
NumberKeyboard->>User: 渲染 header 并显示关闭按钮
else
NumberKeyboard->>User: 不渲染 header
end
Assessment against linked issues
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
概要此PR修复了在NumberKeyboard组件中使用title插槽时未传入关闭文本导致不展示头部的问题。通过引入 变更
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1060 +/- ##
===========================================
+ Coverage 73.62% 89.92% +16.30%
===========================================
Files 3 19 +16
Lines 254 844 +590
Branches 41 126 +85
===========================================
+ Hits 187 759 +572
- Misses 67 85 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
组件测试摘要 (H5 平台)测试时间: Sun May 18 13:08:24 UTC 2025测试结果
|
✅ Closes: #760
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
#760
💡 需求背景和解决方案
修复NumberKeyboard组件使用 title 插槽未传入关闭文本时不展示头部的问题
☑️ 请求合并前的自查清单
Summary by CodeRabbit
文档
新特性