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

能否去掉Button的组价,2个字的Button中间一定会强制加一个空格的问题? #5977

Closed
dreamcog opened this issue May 1, 2017 · 10 comments

Comments

@dreamcog
Copy link

dreamcog commented May 1, 2017

What problem does this feature solve?

无法定义一个2个字的,中间没有空格的Button

What does the proposed API look like?

能否去掉这个设定,或者增加一个option选项,允许不在中间插入空格。谢谢。

@paranoidjk paranoidjk added the 🤔 Need Reproduce We cannot reproduce your problem label May 1, 2017
@ant-design-bot
Copy link
Contributor

Hello @dreamcog. Please provide a re-producible demo: http://codepen.io/benjycui/pen/KgPZrE?editors=001

@paranoidjk
Copy link
Contributor

并不会,请提供一个可复现demo。

@benjycui
Copy link
Contributor

benjycui commented May 2, 2017

这个是设计原则规定的,所以代码会自动添加。

@benjycui benjycui added 🙅🏻‍♀️ WON'T RESOLVE and removed 🤔 Need Reproduce We cannot reproduce your problem labels May 2, 2017
@dreamcog
Copy link
Author

dreamcog commented May 2, 2017

@benjycui 这是什么设计原则规定的?这样很不协调。主要是,能否提供一个能解决这个的方法?

@dreamcog
Copy link
Author

dreamcog commented May 2, 2017

image

上下很不协调。@paranoidjk

@afc163
Copy link
Member

afc163 commented May 2, 2017

只有两个文字的才应该加空格,有图标的不应该加,我试试修复下。

@paranoidjk
Copy link
Contributor

paranoidjk commented May 2, 2017

@afc163 这个有考虑 css 解决吗?letter-spaceing, word-spaceing 之类的属性

这么一堆代码去手动加空格有点太勉强的感觉.. https://github.com/ant-design/ant-design/blob/master/components/button/button.tsx#L13

@afc163
Copy link
Member

afc163 commented May 2, 2017

没啥区别,这段代码省不掉,纯 css 判断不了两个汉字。

@dreamcog
Copy link
Author

dreamcog commented May 2, 2017

@afc163 谢谢。因为这个的确困扰了很久,其他的都能忍的,这个稍微比较麻烦。
其实这个可以让用户自己决定,中间加不加空格其实可以让用户自己来设置,组件强制加一个空格会其实挺难受的。

@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants