From 0d47d5040c5856f783c4dd3b9c0484a1983351f4 Mon Sep 17 00:00:00 2001 From: "jiulong.hjl" Date: Wed, 19 Sep 2018 15:20:58 +0800 Subject: [PATCH] fix: fix tooltip position of Ellipsis --- src/components/Ellipsis/index.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/Ellipsis/index.js b/src/components/Ellipsis/index.js index 1d9daf1a..266e5a16 100644 --- a/src/components/Ellipsis/index.js +++ b/src/components/Ellipsis/index.js @@ -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 = (
- {tooltip ? ( - - {children} - - ) : ( - children - )} + {children}
); + + return tooltip ? ( + + {node} + + ) : ( + node + ); } const childNode = ( -- GitLab