diff --git a/src/components/Ellipsis/index.js b/src/components/Ellipsis/index.js index 1d9daf1a18b6fb258a176199ea3b35195f8ce3e4..266e5a164968330d3808e8155455658db8315803 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 = (