-
-
Notifications
You must be signed in to change notification settings - Fork 195
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、Textarea在APP-VUE和H5端支持inputmode #771
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更新主要集中在 Changes
Assessment against linked issues
Possibly related PRs
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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: 1
🧹 Outside diff range and nitpick comments (2)
src/uni_modules/wot-design-uni/components/wd-input/types.ts (1)
187-194
: 属性定义规范且文档完整!inputmode 属性的定义包含了清晰的文档注释,并正确指定了类型和默认值。建议在文档中补充平台兼容性信息。
docs/component/input.md (1)
178-191
: 建议添加使用示例!虽然 InputMode 的可选值说明非常详细,但建议添加每种输入模式的具体使用示例,以帮助开发者更好地理解和使用该特性。
示例代码可以参考如下格式:
<!-- 数字输入示例 --> <wd-input inputmode="numeric" v-model="value" placeholder="请输入数字" /> <!-- 搜索输入示例 --> <wd-input inputmode="search" v-model="value" placeholder="请输入搜索关键词" />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (6)
docs/component/input.md
(1 hunks)docs/component/textarea.md
(1 hunks)src/uni_modules/wot-design-uni/components/wd-input/types.ts
(2 hunks)src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
(1 hunks)src/uni_modules/wot-design-uni/components/wd-textarea/types.ts
(2 hunks)src/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue
(1 hunks)
🔇 Additional comments (8)
src/uni_modules/wot-design-uni/components/wd-input/types.ts (1)
13-13
: 类型定义完整且符合规范!
InputMode 类型定义包含了所有标准的 HTML inputmode 值,有助于提供更好的类型安全性。
src/uni_modules/wot-design-uni/components/wd-textarea/types.ts (2)
4-4
: 类型导入合理!
从 wd-input 组件复用 InputMode 类型,保持了类型定义的一致性。
291-298
: 属性定义保持一致性!
textarea 组件中的 inputmode 属性定义与 input 组件保持一致,包括类型、文档和默认值。
docs/component/input.md (1)
174-174
: 属性文档完整!
inputmode 属性的文档说明清晰,类型和默认值正确。
src/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue (1)
40-40
: 代码实现正确!
inputmode
属性的绑定实现简洁明确,符合 Vue 组件开发规范。
src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue (1)
46-46
: 实现保持一致性!
inputmode
属性的实现与 textarea 组件保持一致,确保了组件库的统一性。
docs/component/textarea.md (2)
168-170
: 兼容性说明清晰完整!
详细说明了 uni-app 版本要求和平台支持情况,有助于开发者理解使用限制。
172-181
: 属性值说明详尽!
各个 inputmode
值的说明清晰,用例恰当,便于开发者选择合适的输入模式。
✅ Closes: #743
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
#743
💡 需求背景和解决方案
Input、Textarea在H5和APP-VUE平台支持inputmode。
☑️ 请求合并前的自查清单
Summary by CodeRabbit
新特性
Input
组件和wd-textarea
组件文档更新,新增inputmode
属性,支持多种输入类型提示。FormItemRule
结构描述更新,提供更清晰的表单验证规则指导。wd-textarea
组件新增clearTrigger
、focusWhenClear
和ignoreCompositionEvent
属性。文档
Input
和wd-textarea
组件的文档,增强了对新特性的说明和用法指导。