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 { ...@@ -222,18 +222,21 @@ export default class Ellipsis extends Component {
// support document.body.style.webkitLineClamp // support document.body.style.webkitLineClamp
if (isSupportLineClamp) { if (isSupportLineClamp) {
const style = `#${id}{-webkit-line-clamp:${lines};-webkit-box-orient: vertical;}`; const style = `#${id}{-webkit-line-clamp:${lines};-webkit-box-orient: vertical;}`;
return (
const node = (
<div id={id} className={cls} {...restProps}> <div id={id} className={cls} {...restProps}>
<style>{style}</style> <style>{style}</style>
{tooltip ? ( {children}
<Tooltip overlayStyle={TooltipOverlayStyle} title={children}>
{children}
</Tooltip>
) : (
children
)}
</div> </div>
); );
return tooltip ? (
<Tooltip overlayStyle={TooltipOverlayStyle} title={children}>
{node}
</Tooltip>
) : (
node
);
} }
const childNode = ( 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