Commit c4c5ab2a by zhaochengxiang

微调

parent 56809f2a
...@@ -177,7 +177,6 @@ tr.drop-over-upward td { ...@@ -177,7 +177,6 @@ tr.drop-over-upward td {
.tooltip-common { .tooltip-common {
max-width: 450px; max-width: 450px;
max-height: 350px;
.yy-popover-inner-content { .yy-popover-inner-content {
padding: 8px !important; padding: 8px !important;
......
...@@ -155,6 +155,7 @@ const SuggestTable = (props) => { ...@@ -155,6 +155,7 @@ const SuggestTable = (props) => {
{ {
title: '来源', title: '来源',
dataIndex: 'source', dataIndex: 'source',
ellipsis: true,
render: (_, record) => { render: (_, record) => {
return ( return (
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} onClick={sourceOnClick} /> <SourceComponent data={record.recommendedStats?.sourceInfos||[]} onClick={sourceOnClick} />
...@@ -200,6 +201,20 @@ const SuggestTable = (props) => { ...@@ -200,6 +201,20 @@ const SuggestTable = (props) => {
setColumns(nextColumns); setColumns(nextColumns);
}; };
const mergedColumns = () => {
return (
columns.map((column, index) => {
return {
...column,
onHeaderCell: column => ({
width: column.width,
onResize: handleResize(index),
}),
};
})
);
}
const rowSelection = { const rowSelection = {
type: 'radio', type: 'radio',
onSelect: onTableSelect, onSelect: onTableSelect,
...@@ -215,9 +230,8 @@ const SuggestTable = (props) => { ...@@ -215,9 +230,8 @@ const SuggestTable = (props) => {
let newColumns = [...cols]; let newColumns = [...cols];
newColumns.forEach((column, index) => { newColumns.forEach((column, index) => {
if (!column.width) { if (!column.width) {
const rowWidth = (columns.reduce((preVal, col) => (col.width?col.width:0) + preVal, 0)) + 50; const rowWidth = (cols.reduce((preVal, col) => (col.width?col.width:0) + preVal, 0)) + 50;
if (width > rowWidth) { if (width > rowWidth) {
column.width = (width-rowWidth)>200?(width-rowWidth):200; column.width = (width-rowWidth)>200?(width-rowWidth):200;
...@@ -225,7 +239,6 @@ const SuggestTable = (props) => { ...@@ -225,7 +239,6 @@ const SuggestTable = (props) => {
column.width = 200; column.width = 200;
} }
} }
}); });
setColumns(newColumns); setColumns(newColumns);
...@@ -246,17 +259,7 @@ const SuggestTable = (props) => { ...@@ -246,17 +259,7 @@ const SuggestTable = (props) => {
cell: ResizeableHeaderCell, cell: ResizeableHeaderCell,
} }
}} }}
columns={ columns={mergedColumns()}
columns.map((column, index) => {
return {
...column,
onHeaderCell: column => ({
width: column.width,
onResize: handleResize(index),
}),
};
})
}
onRow={(record, index) => { onRow={(record, index) => {
return { return {
onClick: (e) => { onClick: (e) => {
......
...@@ -77,7 +77,15 @@ const PartitionCURD = (props) => { ...@@ -77,7 +77,15 @@ const PartitionCURD = (props) => {
ellipsis: true, ellipsis: true,
render: (text, _, __) => { render: (text, _, __) => {
return ( return (
<Tooltip title={text||''} overlayClassName='tooltip-common'> <Tooltip
placement='topLeft'
title={
<div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}>
{text||''}
</div>
}
overlayClassName='tooltip-common'
>
<span>{text||''}</span> <span>{text||''}</span>
</Tooltip> </Tooltip>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment