登录与品类
This commit is contained in:
@ -137,18 +137,18 @@ const OtherAttachmentsTab: React.FC<Props> = (props) => {
|
||||
key: 'coscoSupplierUserCategoryList',
|
||||
ellipsis: true,
|
||||
width: 160,
|
||||
render: (value: { categoryName: string }[] = []) => {
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
if (value.length === 1) {
|
||||
return <span>{value[0].categoryName}</span>;
|
||||
}
|
||||
|
||||
// 多于1条
|
||||
const allNames = value.map(item => item.categoryName).join('、');
|
||||
const allNames = value.map(item => item.categoryPathName).join('\n');
|
||||
return (
|
||||
<Tooltip title={allNames} overlayStyle={{ zIndex: 1200 }}>
|
||||
<Tooltip title={<pre style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}>{allNames}</pre>} overlayStyle={{ zIndex: 1200 }}>
|
||||
<span>
|
||||
{value[0].categoryName}
|
||||
<span>等</span>
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
|
Reference in New Issue
Block a user