Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复了一些已有的问题 #865

Merged
merged 6 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ import styled from 'styled-components/macro';
import { BLUE } from 'styles/StyleConstants';

export const TableComponentsTd = ({ children, ...rest }: any) => {
return (
<Tooltip placement="topLeft" title={children}>
<Td {...rest}>{children}</Td>
</Tooltip>
);
if (rest.className.includes('ellipsis')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否会影响文本过长(使用ellipsis style)单元格的tooltip展示?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用ellipsis的单元格className会增加ellipsis类名
if (rest.className.includes('ellipsis')) { 刚好可以用这个区分有没有使用ellipsis的单元格(因为props里也没有别的信息可以做判断了 0.0)
因为默认的title太丑了所以默认增加了ellipsis: { showTitle: false, },配置,用tooltip展示

return (
<Tooltip placement="topLeft" title={children}>
<Td {...rest}>{children}</Td>
</Tooltip>
);
}
return <Td {...rest}>{children}</Td>;
};

export const ResizableTitle = props => {
Expand Down