Commit 0d47d504 authored by jiulong.hjl's avatar jiulong.hjl Committed by 偏右

fix: fix tooltip position of Ellipsis

parent 96f92d49
......@@ -222,18 +222,21 @@ export default class Ellipsis extends Component {
// support document.body.style.webkitLineClamp
if (isSupportLineClamp) {
const style = `#${id}{-webkit-line-clamp:${lines};-webkit-box-orient: vertical;}`;
return (
const node = (
<div id={id} className={cls} {...restProps}>
<style>{style}</style>
{tooltip ? (
<Tooltip overlayStyle={TooltipOverlayStyle} title={children}>
{children}
</Tooltip>
) : (
children
)}
{children}
</div>
);
return tooltip ? (
<Tooltip overlayStyle={TooltipOverlayStyle} title={children}>
{node}
</Tooltip>
) : (
node
);
}
const childNode = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment