feat: initial style of workspace slide bar

This commit is contained in:
QiShaoXuan
2022-11-30 16:08:37 +08:00
parent 5eb7830c13
commit 592ba156b8
13 changed files with 563 additions and 57 deletions
+18
View File
@@ -82,3 +82,21 @@ export const fixedCenter = ({
})`,
};
};
export const textEllipsis = (lineNum: number = 1): CSSProperties => {
if (lineNum > 1) {
return {
display: '-webkit-box',
wordBreak: 'break-all',
WebkitBoxOrient: 'vertical',
WebkitLineClamp: '$lineNum', //需要显示的行数
overflow: 'hidden',
textOverflow: 'ellipsis',
};
}
return {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
};
};