You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
37 lines
1.0 KiB
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import { textEllipsis } from '../../style';
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
import type { TableToken } from './index';
|
|
|
|
const genEllipsisStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
|
const { componentCls } = token;
|
|
return {
|
|
[`${componentCls}-wrapper`]: {
|
|
[`${componentCls}-cell-ellipsis`]: {
|
|
...textEllipsis,
|
|
wordBreak: 'keep-all',
|
|
|
|
// Fixed first or last should special process
|
|
[`
|
|
&${componentCls}-cell-fix-left-last,
|
|
&${componentCls}-cell-fix-right-first
|
|
`]: {
|
|
overflow: 'visible',
|
|
[`${componentCls}-cell-content`]: {
|
|
display: 'block',
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
},
|
|
},
|
|
|
|
[`${componentCls}-column-title`]: {
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
wordBreak: 'keep-all',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genEllipsisStyle;
|
|
|