docs: ✏️ 修正 drop-menu-item options 默认数据结构注释 - #1087
Conversation
text => label
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for wot-design-uni ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
## Walkthrough
本次变更修正了 DropMenuItem 组件 options 属性的数据结构描述,将 options 数组对象中用于显示文本的键名由 text 更正为 label。同时修正了 DropMenu 组件中类型别名 DropDirction 的拼写错误为 DropDirection,并更新了相关属性类型。此次仅涉及文档、类型注释及类型别名修正,未涉及功能或控制流的更改。
## Changes
| 文件路径/分组 | 变更摘要 |
|-------------------------------------------------------------------------------|--------------------------------------------|
| docs/component/drop-menu.md | 更正 options 属性说明,text 改为 label |
| src/uni_modules/wot-design-uni/components/wd-drop-menu-item/types.ts | 注释中 options 属性的描述由 text 改为 label |
| src/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts | 类型别名 DropDirction 更正为 DropDirection,更新 direction 属性类型 |
## Possibly related PRs
- Moonofweisheng/wot-design-uni#905:同样涉及 drop-menu 组件 options 属性文档的更正,明确使用 label 作为显示文本的键名。
- Moonofweisheng/wot-design-uni#499:涉及 drop-menu 组件 direction 属性的校验逻辑修正,与本次类型别名更正相关。
## Suggested reviewers
- Moonofweisheng
## Poem
> 🐇
> 文档小兔细细查,
> label 替换了 text 啦!
> 拼写纠正 DropDirection,
> 类型注释更准确。
> 代码逻辑未变更,
> 跳跳写诗庆新意!
>📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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 (
|
概要此 PR 修正了 变更
|
| | v-model | 当前选中项对应选中的 value | string / number | - | - | - | | ||
| | disabled | 禁用菜单 | boolean | - | false | - | | ||
| | options | 列表数据,对应数据结构 `[{text: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - | | ||
| | options | 列表数据,对应数据结构 `[{label: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - | |
There was a problem hiding this comment.
确保文档中的数据结构与代码实现一致是很重要的,这次更新修正了 options 字段的注释。
|
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 #1087 +/- ##
==========================================
+ Coverage 84.94% 85.55% +0.60%
==========================================
Files 215 14 -201
Lines 17191 699 -16492
Branches 2707 127 -2580
==========================================
- Hits 14603 598 -14005
+ Misses 2588 101 -2487 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:
|
text => label
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
无
💡 需求背景和解决方案
修正 drop-menu-item options 字段的默认值注释
[{text: '标题', value: '0', tip: '提示文字'}]更改为[{label: '标题', value: '0', tip: '提示文字'}]☑️ 请求合并前的自查清单
Summary by CodeRabbit
options属性的文档描述,将选项对象的显示文本键由text更正为label。DropDirction更正为DropDirection。