From 7dbd7c40d20dc444b64b6d34747bbcc97accb363 Mon Sep 17 00:00:00 2001 From: niko <644506165@qq.com> Date: Fri, 1 Jun 2018 22:39:07 +0800 Subject: [PATCH] fix length property include "..." tail length (#1592) --- src/components/Ellipsis/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Ellipsis/index.js b/src/components/Ellipsis/index.js index 93c5c235..671bc453 100644 --- a/src/components/Ellipsis/index.js +++ b/src/components/Ellipsis/index.js @@ -20,7 +20,7 @@ const EllipsisText = ({ text, length, tooltip, ...other }) => { if (length - tail.length <= 0) { displayText = ''; } else { - displayText = text.slice(0, length - tail.length); + displayText = text.slice(0, length); } if (tooltip) { -- GitLab