修复任务列表名称标签提示

This commit is contained in:
whyour 2022-03-12 23:57:38 +08:00
parent 793da29f22
commit fc9bc7bea2

View File

@ -85,28 +85,32 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
goToScriptManager(record); goToScriptManager(record);
}} }}
> >
<Popover {record.labels && record.labels.length > 0 ? (
placement="right" <Popover
trigger={isPhone ? 'click' : 'hover'} placement="right"
content={ trigger={isPhone ? 'click' : 'hover'}
<div> content={
{record.labels?.map((label: string) => ( <div>
<Tag {record.labels?.map((label: string) => (
color="blue" <Tag
style={{ cursor: 'point' }} color="blue"
onClick={(e) => { style={{ cursor: 'point' }}
e.stopPropagation(); onClick={(e) => {
setSearchValue(`label:${label}`); e.stopPropagation();
}} setSearchValue(`label:${label}`);
> }}
<a>{label}</a> >
</Tag> <a>{label}</a>
))} </Tag>
</div> ))}
} </div>
> }
{record.name || '-'} >
</Popover> {record.name || '-'}
</Popover>
) : (
record.name || '-'
)}
{record.isPinned ? ( {record.isPinned ? (
<span> <span>
<PushpinOutlined /> <PushpinOutlined />