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

[全部输入类组件] 事件参数顺序和位置统一 #1750

Closed
chaishi opened this issue Nov 6, 2022 · 2 comments
Closed

[全部输入类组件] 事件参数顺序和位置统一 #1750

chaishi opened this issue Nov 6, 2022 · 2 comments
Labels
API API or Docs changes 📒 documentation Improvements or additions to documentation

Comments

@chaishi
Copy link
Collaborator

chaishi commented Nov 6, 2022

这个功能解决了什么问题

当前组件事件参数顺序不统一,期望统一全体组件参数顺序。如下图所示,有的组件第一个参数是 value,有的组件第一个参数是 object

image

你建议的方案是什么

  • blurfocus 事件,凡事第一个参数是 value 的,一律统一为 context: { value: xxx, e: xxx, ... } 等,涉及组件有 Input/Textarea/InputNumber/RangeInput/SelectInput/TagInput

  • 除了 blurfocus 事件,还有很多其他的事件:enter/keydown/keypress/keyup/compositionend/compositionstart

(change 保持不变,第一个参数一定是 value)

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2022

👋 @chaishi,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn uyarn added 📒 documentation Improvements or additions to documentation API API or Docs changes labels Nov 8, 2022
@chaishi chaishi closed this as completed Nov 30, 2022
@chaishi chaishi reopened this Nov 30, 2022
@chaishi
Copy link
Collaborator Author

chaishi commented Nov 30, 2022

变动较大,保持不变,各框架之间,同一个组件保持一致即可

@chaishi chaishi closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API or Docs changes 📒 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants