Skip to content
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

feat: ✨ 添加input props.type可选类型 #983

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

RJQingHuan
Copy link
Collaborator

@RJQingHuan RJQingHuan commented Mar 28, 2025

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

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

🔗 相关 Issue

close #981

💡 需求背景和解决方案

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

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

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

Summary by CodeRabbit

  • 文档
    • 优化了输入组件文档的排版与内容描述,对属性、事件、插槽等部分进行了整理,使说明更直观易懂。
  • 新功能
    • 扩展了输入组件支持的类型选项,新增安全密码、昵称和电话类型,满足更多输入场景的需求。

Copy link

vercel bot commented Mar 28, 2025

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 Mar 28, 2025 3:58am

Copy link

coderabbitai bot commented Mar 28, 2025

Walkthrough

该 PR 对输入组件的文档和类型定义进行了更新。在文档部分,调整了标题格式、增加了换行以增强代码可读性,对属性表格进行了重构,扩展了 type 属性以支持 safe-passwordnicknametel 新值,同时优化了 maxlengthclearTrigger 的描述;在类型定义文件中,更新了 InputType 类型,加入了上述三个新类型,并同步更新了相关注释。

Changes

文件 更改摘要
docs/…/input.md 调整标题格式,增加换行提升可读性;重构属性表格,扩展 type 属性支持 safe-passwordnicknametel;澄清 maxlength 默认值说明,优化 clearTrigger 描述及 events、slot 和外部样式部分格式。
src/…/wd-input/types.ts 扩展 InputType 类型,新增 safe-passwordnicknametel 三个字符串字面量;同步更新 inputProps 注释,反映新选项。

Assessment against linked issues

Objective Addressed Explanation
wd-input type属性增加nickname属性值 [#981]

Possibly related PRs

Suggested reviewers

  • Moonofweisheng

Poem

我是一只小兔,跳跃在代码间,
文档排版闪光点,如星辰般清晰明亮。
新增类型悄然加入,犹如嫩芽破土,
修改细节皆用心,代码花园更添芳香。
跟我一起蹦跶,未来可期! 🐇


📜 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 51adb6b and eef65a0.

📒 Files selected for processing (2)
  • docs/component/input.md (6 hunks)
  • src/uni_modules/wot-design-uni/components/wd-input/types.ts (2 hunks)
🔇 Additional comments (6)
src/uni_modules/wot-design-uni/components/wd-input/types.ts (2)

7-7: 类型定义更新正确

InputType 类型定义已正确扩展,增加了 'safe-password', 'nickname''tel' 三个新类型选项,丰富了输入框的类型选择。


69-69: 文档注释已同步更新

类型属性的注释文档已同步更新,包含了新增的三个类型选项,保持了代码和文档的一致性。

docs/component/input.md (4)

140-140: 类型参数文档已正确更新

type 属性的可选值文档已正确更新,增加了 safe-password, nicknametel 三个新类型,与类型定义文件保持一致。


138-174: 表格格式优化,提升了文档可读性

属性表格的格式已优化,间距更加合理,使文档更加易读。同时保持了内容的准确性,包括各个属性的说明、类型、可选值和默认值等信息。


183-183: 其他表格格式统一优化

InputMode 可选值表格和 FormItemRule 表格的格式也进行了统一优化,保持了文档的一致性和美观性。

Also applies to: 195-201


204-213: 事件、插槽和外部样式类表格格式优化

事件、插槽和外部样式类相关表格的格式也进行了优化,提升了整体文档的一致性和可读性。

Also applies to: 217-221, 225-229

✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

Copy link

Walkthrough

此PR为wd-input组件添加了新的可选类型,包括safe-passwordnicknametel,以增强输入框的功能性和灵活性。更新了相关文档以反映这些更改。

Changes

文件 概要
docs/component/input.md 更新了wd-input组件的文档,添加了新的可选类型说明。
src/uni_modules/wot-design-uni/components/wd-input/types.ts 扩展了InputType类型,增加了新的可选类型。

@@ -4,7 +4,7 @@ import type { FormItemRule } from '../wd-form/types'

export type InputClearTrigger = 'focus' | 'always'

export type InputType = 'text' | 'number' | 'digit' | 'idcard'
export type InputType = 'text' | 'number' | 'digit' | 'idcard' | 'safe-password' | 'nickname' | 'tel'

Choose a reason for hiding this comment

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

Adding new input types like safe-password, nickname, and tel is a significant change. Ensure that these new types are supported across all intended platforms and that they do not introduce any unexpected behavior.

Copy link

netlify bot commented Mar 28, 2025

Deploy Preview for wot-design-uni ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit eef65a0
🔍 Latest deploy log https://app.netlify.com/sites/wot-design-uni/deploys/67e61e1eb42344000835432c
😎 Deploy Preview https://deploy-preview-983--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 site configuration.

@Moonofweisheng Moonofweisheng merged commit 91776bf into Moonofweisheng:master Mar 28, 2025
7 checks passed
@RJQingHuan RJQingHuan deleted the feat-input-type branch April 1, 2025 03:37
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.

[新功能需求] wd-input type属性增加nickname属性值
2 participants