🐛 fix: Ensure channel tooltip displays correctly in LogsTable
* Refactored the render logic of the **Channel** column
* Wrapped tooltip around the first `Tag` only to restore hover behavior when multi-key mode is enabled
* Added i18n-friendly fallback (`t('未知渠道')`) for cases where `channel_name` is missing
* Improves user experience for administrators by reliably showing channel names even with multiple keys
This commit is contained in:
@@ -367,38 +367,23 @@ const LogsTable = () => {
|
||||
}
|
||||
}
|
||||
|
||||
return isAdminUser ? (
|
||||
record.type === 0 || record.type === 2 || record.type === 5 ? (
|
||||
<>
|
||||
{
|
||||
<Tooltip content={record.channel_name || '[未知]'}>
|
||||
<Space>
|
||||
<Tag
|
||||
color={colors[parseInt(text) % colors.length]}
|
||||
shape='circle'
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
{
|
||||
isMultiKey && (
|
||||
<Tag
|
||||
color={'white'}
|
||||
shape='circle'
|
||||
>
|
||||
{multiKeyIndex}
|
||||
</Tag>
|
||||
)
|
||||
}
|
||||
</Space>
|
||||
</Tooltip>
|
||||
}
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
)
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
return isAdminUser && (record.type === 0 || record.type === 2 || record.type === 5) ? (
|
||||
<Space>
|
||||
<Tooltip content={record.channel_name || t('未知渠道')}>
|
||||
<Tag
|
||||
color={colors[parseInt(text) % colors.length]}
|
||||
shape='circle'
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
</Tooltip>
|
||||
{isMultiKey && (
|
||||
<Tag color='white' shape='circle'>
|
||||
{multiKeyIndex}
|
||||
</Tag>
|
||||
)}
|
||||
</Space>
|
||||
) : null;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user