Skip to content

docs: ✏️ 修正 drop-menu-item options 默认数据结构注释 - #1087

Merged
Moonofweisheng merged 2 commits into
Moonofweisheng:masterfrom
GeraltWang:master
Aug 24, 2025
Merged

docs: ✏️ 修正 drop-menu-item options 默认数据结构注释#1087
Moonofweisheng merged 2 commits into
Moonofweisheng:masterfrom
GeraltWang:master

Conversation

@GeraltWang

@GeraltWang GeraltWang commented May 30, 2025

Copy link
Copy Markdown
Contributor

text => label

🤔 这个 PR 的性质是?(至少选择一个)

  • 日常 bug 修复
  • 新特性提交
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • CI/CD 改进
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 代码重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

修正 drop-menu-item options 字段的默认值注释
[{text: '标题', value: '0', tip: '提示文字'}] 更改为 [{label: '标题', value: '0', tip: '提示文字'}]

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充

Summary by CodeRabbit

  • 文档
    • 更新了 DropMenuItem 组件中 options 属性的文档描述,将选项对象的显示文本键由 text 更正为 label
    • 修正了 DropMenu 组件中方向属性的类型名称拼写错误,将 DropDirction 更正为 DropDirection

@vercel

vercel Bot commented May 30, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wot-design-uni ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 5:18am

@netlify

netlify Bot commented May 30, 2025

Copy link
Copy Markdown

Deploy Preview for wot-design-uni ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1c8fb3a
🔍 Latest deploy log https://app.netlify.com/projects/wot-design-uni/deploys/68393f6527b32900083329cf
😎 Deploy Preview https://deploy-preview-1087--wot-design-uni.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented May 30, 2025

Copy link
Copy Markdown
## 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 details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be3c1d8 and 1c8fb3a.

📒 Files selected for processing (1)
  • src/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Generate Test Summary
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@petercat-assistant

Copy link
Copy Markdown

概要

此 PR 修正了 drop-menu-item 组件的 options 字段默认数据结构的注释,将 text 更改为 label,以确保文档与实际代码保持一致。

变更

文件 概要
docs/component/drop-menu.md, src/uni_modules/wot-design-uni/components/wd-drop-menu-item/types.ts 更新了 options 字段的注释,数据结构从 [{text: '标题', value: '0', tip: '提示文字'}] 更改为 [{label: '标题', value: '0', tip: '提示文字'}]

| v-model | 当前选中项对应选中的 value | string / number | - | - | - |
| disabled | 禁用菜单 | boolean | - | false | - |
| options | 列表数据,对应数据结构 `[{text: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - |
| options | 列表数据,对应数据结构 `[{label: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确保文档中的数据结构与代码实现一致是很重要的,这次更新修正了 options 字段的注释。

modelValue: [String, Number],
/**
* 列表数据,对应数据结构 [{text: '标题', value: '0', tip: '提示文字'}]
* 列表数据,对应数据结构 [{label: '标题', value: '0', tip: '提示文字'}]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更新注释以反映正确的数据结构,确保 options 字段的注释与实际使用一致。

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.55%. Comparing base (1938d92) to head (1c8fb3a).

❗ 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     
Flag Coverage Δ
h5 85.55% <100.00%> (+0.60%) ⬆️
wd-action-sheet ?
wd-backtop ?
wd-badge ?
wd-button ?
wd-calendar ?
wd-calendar-view ?
wd-card ?
wd-cell ?
wd-cell-group ?
wd-checkbox ?
wd-checkbox-group ?
wd-circle ?
wd-col-picker ?
wd-collapse ?
wd-config-provider ?
wd-count-down ?
wd-count-to ?
wd-curtain ?
wd-datetime-picker ?
wd-datetime-picker-view ?
wd-divider ?
wd-drop-menu 85.55% <100.00%> (ø)
wd-fab ?
wd-floating-panel ?
wd-form ?
wd-gap ?
wd-grid ?
wd-grid-item ?
wd-icon ?
wd-img ?
wd-img-cropper ?
wd-index-anchor ?
wd-index-bar ?
wd-input ?
wd-input-number ?
wd-keyboard ?
wd-layout ?
wd-loading ?
wd-loadmore ?
wd-message-box ?
wd-navbar ?
wd-navbar-capsule ?
wd-notice-bar ?
wd-notify ?
wd-number-keyboard ?
wd-overlay ?
wd-pagination ?
wd-password-input ?
wd-picker ?
wd-picker-view ?
wd-popover ?
wd-popup ?
wd-progress ?
wd-radio ?
wd-radio-group ?
wd-rate ?
wd-resize ?
wd-search ?
wd-segmented ?
wd-select-picker ?
wd-sidebar ?
wd-signature ?
wd-skeleton ?
wd-slider ?
wd-sort-button ?
wd-status-tip ?
wd-step ?
wd-steps ?
wd-sticky ?
wd-sticky-box ?
wd-swipe-action ?
wd-swiper ?
wd-swiper-nav ?
wd-switch ?
wd-tabbar ?
wd-table ?
wd-tabs ?
wd-tag ?
wd-text ?
wd-textarea ?
wd-toast ?
wd-tooltip ?
wd-transition ?
wd-upload ?
wd-video-preview ?
wd-watermark ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Moonofweisheng
Moonofweisheng merged commit 7a2cd2d into Moonofweisheng:master Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants