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

[Input 输入框] 是否可以支持type="number"时,输入框的值为0不显示 #1630

Closed
lnbiuc opened this issue Oct 31, 2024 · 3 comments

Comments

@lnbiuc
Copy link

lnbiuc commented Oct 31, 2024

这个功能解决了什么问题

在某些业务场景下,0被认为是未填写该字段,此时如果用户想要填写该字段,选中输入框之后需要手动删掉原来的0,再输入新的数值,不是很方便

你建议的方案是什么

可以加一个参数开关为0是否显示,例如

<t-input v-model="marketing" type="number" :show-zero-value="false" label="营销费用" />
Copy link
Contributor

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

@lnbiuc
Copy link
Author

lnbiuc commented Oct 31, 2024

或者可以让用户点击进行输入的时候,有个选项控制,是否选中所有已输入的内容,这样再次输入的时候会覆盖原来的内容

@anlyyao
Copy link
Collaborator

anlyyao commented Nov 19, 2024

@lnbiuc 两个点都更建议在业务测自行处理~

@anlyyao anlyyao closed this as completed Nov 19, 2024
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