ellipsis.js 916 B

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