mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
🐛 fix: Typography ellipsis miss calculate decimal (#20689)
This commit is contained in:
parent
70c49cd367
commit
3630569424
@ -73,10 +73,11 @@ export default (
|
||||
const originStyle = window.getComputedStyle(originEle);
|
||||
const originCSS = styleToString(originStyle);
|
||||
const lineHeight = pxToNumber(originStyle.lineHeight);
|
||||
const maxHeight =
|
||||
const maxHeight = Math.round(
|
||||
lineHeight * (rows + 1) +
|
||||
pxToNumber(originStyle.paddingTop) +
|
||||
pxToNumber(originStyle.paddingBottom);
|
||||
pxToNumber(originStyle.paddingTop) +
|
||||
pxToNumber(originStyle.paddingBottom),
|
||||
);
|
||||
|
||||
// Set shadow
|
||||
ellipsisContainer.setAttribute('style', originCSS);
|
||||
|
Loading…
Reference in New Issue
Block a user