Skip to content

Input组件maxLength和原生属性冲突 #2516

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
1 task
wang-ky opened this issue Jul 2, 2020 · 4 comments
Closed
1 task

Input组件maxLength和原生属性冲突 #2516

wang-ky opened this issue Jul 2, 2020 · 4 comments
Labels
Accept You are right, we should do that outdated

Comments

@wang-ky
Copy link

wang-ky commented Jul 2, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.6.1

Environment

win10, chrome83, vue2.6.10

Reproduction link

Edit on CodeSandbox

Steps to reproduce

输入框输入指定位数

What is expected?

生效

What is actually happening?

不生效

@wang-ky
Copy link
Author

wang-ky commented Jul 2, 2020

maxlength是原生input就支持的属性,在组件支持maxLength之前,实际项目中一直是使用的原生的方式

尤其组件对这个props也没有其他逻辑,直接在渲染的时候传给了attr,建议还是不要这个了吧

@tangjinzhou tangjinzhou added the Accept You are right, we should do that label Jul 3, 2020
baojie223 pushed a commit to baojie223/ant-design-vue that referenced this issue Jul 17, 2020
@tangjinzhou
Copy link
Member

maxLength 删了会有破坏性更新 不删也可以直接maxlength 不影响使用

@wang-ky
Copy link
Author

wang-ky commented Aug 3, 2020

maxLength 删了会有破坏性更新 不删也可以直接maxlength 不影响使用

目前最新版本<a-input maxlength="5" />不生效,影响使用了, @tangjinzhou

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accept You are right, we should do that outdated
Projects
None yet
Development

No branches or pull requests

2 participants