-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Input.Search的enterButton参数能否有更好的兼容自定义组件 #2519
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
Comments
没明白啥意思,给个例子 看看。 |
https://codesandbox.io/s/boring-http-123he?file=/src/App.vue 把你例子中 CaptchaBtn 挪到外层就正常了。。。可见是你的自定义组件写法的原因。 |
嗯,我是想复用我的 CaptchaBtn 组件,因为挺多页面要用到。按照你现在的写法的话,只能是在a-input-search外封装一层了 |
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. |
What problem does this feature solve?
解决自定义组件(button的封装) 使用enterButton参数时,重复嵌套一层button导致样式问题
What does the proposed API look like?
我发现使用了ant-design自带的a-button不会出现嵌套button标签,而使用其他标签,包括自定义组件标签,会导致强行嵌套一层button标签,即使自定义标签名称为a-button。能否识别 在使用slot="enterButton"时的自定义组件是a-button封装(btn封装)的情况,减少嵌套重复button标签导致样式问题。
The text was updated successfully, but these errors were encountered: