Browse Source

fix length property include "..." tail length (#1592)

pull/1599/head
niko 8 years ago
committed by 偏右
parent
commit
7dbd7c40d2
  1. 2
      src/components/Ellipsis/index.js

2
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) {

Loading…
Cancel
Save