-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Ant design master #6919
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
Closed
Closed
Ant design master #6919
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Caution Review failedThe pull request is closed. 📝 Walkthrough## Walkthrough
本次变更主要针对 VirtualInput 组件的演示、测试和实现细节进行调整。包括优化 demo 展示、修正和澄清测试用例中的光标行为预期,以及在组件内部完善注释、调整光标点击逻辑和无障碍属性,未涉及对外 API 的变更。
## Changes
| 文件/路径 | 变更摘要 |
|--------------------------------------------------------|------------------------------------------------------------------|
| src/components/virtual-input/demos/demo1.tsx | 增加 ref 用法演示、新增“光标位置不可调整”示例、调整 customKey 写法、部分样式修改、底部 spacer 加高 |
| src/components/virtual-input/tests/virtual-input.test.tsx | 修正光标与输入内容的预期、完善注释、调整部分删除与输入步骤 |
| src/components/virtual-input/virtual-input.tsx | 注释中英文翻译、光标点击逻辑优化(index=0 时直接置于末尾)、caret 渲染条件优化、增加 role 属性 |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant VirtualInput
participant NumberKeyboard
User->>VirtualInput: 点击输入框或内容字符
VirtualInput->>VirtualInput: 判断点击位置
alt 点击 index=0
VirtualInput->>VirtualInput: 光标移动到末尾
else 其他位置
VirtualInput->>VirtualInput: 计算并设置光标位置
end
User->>NumberKeyboard: 通过键盘输入数字或符号
NumberKeyboard->>VirtualInput: 触发输入事件
VirtualInput->>VirtualInput: 更新内容与光标位置Estimated code review effort2 (~15 分钟) Possibly related PRs
Suggested reviewers
Poem
|
Contributor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary by CodeRabbit
新功能
样式
无障碍与可访问性
测试
文档