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
建议做下长度对比,比如是个外国人,如 弗拉基米尔·弗拉基米罗维奇·普京(普京) 001234,超过了 width 就截断了。
弗拉基米尔·弗拉基米罗维奇·普京(普京) 001234
const div = document.createElement('div'); div.style.color = '#fff'; div.style.fontSize = '14px'; div.innerHTML = `<span>${text}</span>`; document.body.appendChild(div); const width = div.getElementsByTagName('span')[0].offsetWidth; div.parentNode.removeChild(div)
The text was updated successfully, but these errors were encountered:
感谢反馈,有兴趣提一个 pr 吗?
Sorry, something went wrong.
No branches or pull requests
建议做下长度对比,比如是个外国人,如
弗拉基米尔·弗拉基米罗维奇·普京(普京) 001234
,超过了 width 就截断了。The text was updated successfully, but these errors were encountered: