We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.37.1
Others
No response
https://stackblitz.com/edit/antd-mobile-r2huqf?file=index.tsx
当传入的content为中文时文本省略生效,当传入的content为英文单词或者字符串类型的数字文本时,文本省略失效
The text was updated successfully, but these errors were encountered:
Ellipsis 组件内部会读取 word-break 这个 CSS 属性的值,如果未设置该样式属性的值,默认值为:normal。所以,当文本内容中包含大量数字或英文时,文本内容无法省略(浏览器的默认行为)。此时,如果需要让文本省略生效,可以手动在 Ellipsis 组件或其外层元素中,添加 word-break 样式(比如,word-break: break-word),Ellipsis 组件会完全遵循样式继承行为,拿到你设置的 word-break,从而实现自动省略。
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Version of antd-mobile
5.37.1
Operating system and its version
Others
Browser and its version
No response
Sandbox to reproduce
https://stackblitz.com/edit/antd-mobile-r2huqf?file=index.tsx
What happened?
当传入的content为中文时文本省略生效,当传入的content为英文单词或者字符串类型的数字文本时,文本省略失效
Relevant log output
No response
The text was updated successfully, but these errors were encountered: