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

[InputNumber 数字输入框] 获得焦点 #1584

Closed
Alsmile opened this issue Sep 2, 2022 · 2 comments
Closed

[InputNumber 数字输入框] 获得焦点 #1584

Alsmile opened this issue Sep 2, 2022 · 2 comments

Comments

@Alsmile
Copy link

Alsmile commented Sep 2, 2022

这个功能解决了什么问题

代码自动设置焦点

你建议的方案是什么

 <t-input-number  ref="input"  />


const input = ref();

onMounted(() => {
  input.value.focus();  //  允许设置焦点
})
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

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

@PengYYYYY
Copy link
Collaborator

可以先通过设置 :input-props="{ autofocus: true }" 来达到这个效果,这个需求移至 #848 这边统一管理,本issue暂时关闭

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

No branches or pull requests

2 participants