ellipsis.js 867 B

12345678910111213141516171819202122232425262728293031
  1. import { textEllipsis } from '../../style';
  2. const genEllipsisStyle = token => {
  3. const {
  4. componentCls
  5. } = token;
  6. return {
  7. [`${componentCls}-wrapper`]: {
  8. [`${componentCls}-cell-ellipsis`]: Object.assign(Object.assign({}, textEllipsis), {
  9. wordBreak: 'keep-all',
  10. // Fixed first or last should special process
  11. [`
  12. &${componentCls}-cell-fix-left-last,
  13. &${componentCls}-cell-fix-right-first
  14. `]: {
  15. overflow: 'visible',
  16. [`${componentCls}-cell-content`]: {
  17. display: 'block',
  18. overflow: 'hidden',
  19. textOverflow: 'ellipsis'
  20. }
  21. },
  22. [`${componentCls}-column-title`]: {
  23. overflow: 'hidden',
  24. textOverflow: 'ellipsis',
  25. wordBreak: 'keep-all'
  26. }
  27. })
  28. }
  29. };
  30. };
  31. export default genEllipsisStyle;