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
Typography
2.55.5
No response
function Demo() { const { Text } = Typography; const code = 'code'; return <Text style={{ marginTop: 6, color: 'var(--semi-color-text-2)' }} ellipsis={{ showTooltip: { opts: { style: { wordBreak: 'break-word' } } } }} copyable={{ content: code }}> Key: {code} </Text> }
- OS: - browser:
The text was updated successfully, but these errors were encountered:
问题原因: 文档中强调了应该传入 string。 当以上述方式传入 Text 的children, 看上去是字符串,实际上在 React 中数组
由于此前代码中https://github.com/DouyinFE/semi-design/blob/v2.55.5/packages/semi-ui/typography/base.tsx#L375 对children 做了强制转换,因此引入了 逗号,省略前后的文本不同,所以认为出现了截断
用户可以通过将模版字符串单独用变量进行定义,然后作为 children,但是考虑到用户可能考虑不到模版字符串非 string 类型,应该对模版字符串的方式做兼容
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Is there an existing issue for this?
Which Component
Typography
Semi Version
2.55.5
Current Behavior
Expected Behavior
Steps To Reproduce
No response
ReproducibleCode
function Demo() { const { Text } = Typography; const code = 'code'; return <Text style={{ marginTop: 6, color: 'var(--semi-color-text-2)' }} ellipsis={{ showTooltip: { opts: { style: { wordBreak: 'break-word' } } } }} copyable={{ content: code }}> Key: {code} </Text> }
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: