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

feature: Ellipsis components add "caculateShowLength" #1637

Merged
merged 2 commits into from Jun 12, 2018

Conversation

twisger
Copy link
Contributor

@twisger twisger commented Jun 8, 2018

whether consider full-width character length as 2 when calculate string length. #1635

@ant-design-bot
Copy link

ant-design-bot commented Jun 8, 2018

Deploy preview for ant-design-pro ready!

Built with commit bde38b2

https://deploy-preview-1637--ant-design-pro.netlify.com

@@ -5,6 +5,7 @@ export interface IEllipsisProps {
lines?: number;
style?: React.CSSProperties;
className?: string;
caculateShowLength?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I can't get a more proper name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 caculateShowLength 语义上看不太懂。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个api是用来控制计算长度是是否将全角字符的长度视为2, 改成whetherCaculateShowLength?感觉太长了。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

或者改成enableFullWidth?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fullWidthRecognition 如何?

@chenshuai2144
Copy link
Collaborator

要不要搞个测试?

@twisger
Copy link
Contributor Author

twisger commented Jun 12, 2018

关键的两个函数的测试写了,感觉没必要加组件测试

@chenshuai2144
Copy link
Collaborator

ok!

@chenshuai2144 chenshuai2144 merged commit 456d25a into ant-design:master Jun 12, 2018
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

Successfully merging this pull request may close these issues.

None yet

4 participants