修复定时任务排序

This commit is contained in:
whyour 2022-02-01 22:33:18 +08:00
parent c746a3d215
commit 25689cf40f

View File

@ -391,16 +391,16 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
data.data data.data
.sort((a: any, b: any) => { .sort((a: any, b: any) => {
const sortA = const sortA =
a.isDisabled && a.status !== 0 a.isPinned && a.status !== 0
? 4
: a.isPinned && a.status !== 0
? 5 ? 5
: a.isDisabled && a.status !== 0
? 4
: a.status; : a.status;
const sortB = const sortB =
b.isDisabled && b.status !== 0 b.isPinned && b.status !== 0
? 4
: b.isPinned && b.status !== 0
? 5 ? 5
: b.isDisabled && b.status !== 0
? 4
: b.status; : b.status;
return CrontabSort[sortA] - CrontabSort[sortB]; return CrontabSort[sortA] - CrontabSort[sortB];
}) })