mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-27 14:57:08 +08:00
fix(job): 修复预览CRON表达式结果不正确的问题
This commit is contained in:
@@ -326,7 +326,11 @@ export function dateFormat(date = new Date(), pattern = YMD_HMS) {
|
|||||||
*/
|
*/
|
||||||
const expressionNoYear = (cron: string) => {
|
const expressionNoYear = (cron: string) => {
|
||||||
const vs = cron.split(' ')
|
const vs = cron.split(' ')
|
||||||
return vs.slice(0, vs.length - 1).join(' ')
|
// 长度=== 7 包含年表达式 不解析
|
||||||
|
if (vs.length === 7) {
|
||||||
|
return vs.slice(0, vs.length - 1).join(' ')
|
||||||
|
}
|
||||||
|
return cron
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user