Commit c4c5ab2a by zhaochengxiang

微调

parent 56809f2a
......@@ -177,7 +177,6 @@ tr.drop-over-upward td {
.tooltip-common {
max-width: 450px;
max-height: 350px;
.yy-popover-inner-content {
padding: 8px !important;
......
......@@ -155,6 +155,7 @@ const SuggestTable = (props) => {
{
title: '来源',
dataIndex: 'source',
ellipsis: true,
render: (_, record) => {
return (
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} onClick={sourceOnClick} />
......@@ -200,6 +201,20 @@ const SuggestTable = (props) => {
setColumns(nextColumns);
};
const mergedColumns = () => {
return (
columns.map((column, index) => {
return {
...column,
onHeaderCell: column => ({
width: column.width,
onResize: handleResize(index),
}),
};
})
);
}
const rowSelection = {
type: 'radio',
onSelect: onTableSelect,
......@@ -215,9 +230,8 @@ const SuggestTable = (props) => {
let newColumns = [...cols];
newColumns.forEach((column, index) => {
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) {
column.width = (width-rowWidth)>200?(width-rowWidth):200;
......@@ -225,7 +239,6 @@ const SuggestTable = (props) => {
column.width = 200;
}
}
});
setColumns(newColumns);
......@@ -246,17 +259,7 @@ const SuggestTable = (props) => {
cell: ResizeableHeaderCell,
}
}}
columns={
columns.map((column, index) => {
return {
...column,
onHeaderCell: column => ({
width: column.width,
onResize: handleResize(index),
}),
};
})
}
columns={mergedColumns()}
onRow={(record, index) => {
return {
onClick: (e) => {
......
......@@ -77,7 +77,15 @@ const PartitionCURD = (props) => {
ellipsis: true,
render: (text, _, __) => {
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>
</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