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
Conversation
Deploy preview for ant-design-pro ready! Built with commit bde38b2 |
src/components/Ellipsis/index.d.ts
Outdated
@@ -5,6 +5,7 @@ export interface IEllipsisProps { | |||
lines?: number; | |||
style?: React.CSSProperties; | |||
className?: string; | |||
caculateShowLength?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 caculateShowLength 语义上看不太懂。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个api是用来控制计算长度是是否将全角字符的长度视为2, 改成whetherCaculateShowLength?感觉太长了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
或者改成enableFullWidth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fullWidthRecognition 如何?
要不要搞个测试? |
关键的两个函数的测试写了,感觉没必要加组件测试 |
ok! |
whether consider full-width character length as 2 when calculate string length. #1635