From e7ddfff8e80e77fc2562a79181f2c552f58d41ad Mon Sep 17 00:00:00 2001 From: nikogu <644506165@qq.com> Date: Thu, 18 Jan 2018 19:03:52 +0800 Subject: [PATCH] add break-all to Ellipsis tooltip --- src/components/Ellipsis/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/Ellipsis/index.js b/src/components/Ellipsis/index.js index 9e99c416..351b4143 100644 --- a/src/components/Ellipsis/index.js +++ b/src/components/Ellipsis/index.js @@ -25,7 +25,7 @@ const EllipsisText = ({ text, length, tooltip, ...other }) => { if (tooltip) { return ( - + {displayText} {tail} @@ -183,7 +183,13 @@ export default class Ellipsis extends Component { return (
- {tooltip ? {children} : children} + {tooltip ? ( + + {children} + + ) : ( + children + )}
); } @@ -198,7 +204,13 @@ export default class Ellipsis extends Component { return (
- {tooltip ? {childNode} : childNode} + {tooltip ? ( + + {childNode} + + ) : ( + childNode + )}
{children}
-- GitLab