diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx
index 0537f5b6..9919215a 100644
--- a/src/pages/crontab/index.tsx
+++ b/src/pages/crontab/index.tsx
@@ -11,6 +11,7 @@ import {
Menu,
Typography,
Input,
+ Popover,
} from 'antd';
import {
ClockCircleOutlined,
@@ -30,7 +31,7 @@ import {
import config from '@/utils/config';
import { PageContainer } from '@ant-design/pro-layout';
import { request } from '@/utils/http';
-import CronModal,{CronLabelModal} from './modal';
+import CronModal,{ CronLabelModal } from './modal';
import CronLogModal from './logModal';
import cron_parser from 'cron-parser';
import { diffTime } from '@/utils/date';
@@ -77,20 +78,39 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
width: 150,
align: 'center' as const,
render: (text: string, record: any) => (
- {
- goToScriptManager(record);
- }}
- >
- {record.name || record._id}{' '}
- {record.isPinned ? (
-
-
-
- ) : (
- ''
- )}
-
+ <>
+ {
+ goToScriptManager(record);
+ }}
+ >
+ {record.name || record._id}{' '}
+ {record.isPinned ? (
+
+
+
+ ) : (
+ ''
+ )}
+
+
+ {record.labels?.length > 0 && record.labels[0] !== '' ?
+
+ {record.labels?.map((label: string, i: number) => (
+ { onSearch(`label:${label}`) }}>
+ {label}
+
+ ))}
+
+ }>
+ {record.labels[0]}
+
+ : ''}
+
+ >
),
sorter: {
compare: (a: any, b: any) => a.name.localeCompare(b.name),
@@ -275,26 +295,6 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
>
),
},
- {
- title: '标签',
- key: 'labels',
- dataIndex: 'labels',
- align: 'center' as const,
- width: 100,
- render: (text: string, record: any) => (
- <>
- {record.labels?.map((label: string) => (
- { onSearch(`label:${label}`) }}>{label}
- ))}
- >
- ),
- },
{
title: '操作',
key: 'action',