feat(1.4.0-beta1): 1. 修复cron表表达式周模式前后端异常问题
This commit is contained in:
parent
f21db05527
commit
12e125e05e
@ -38,7 +38,7 @@ const step = ref([min, 1]);
|
||||
const well = ref([min, 1]);
|
||||
const specify = ref<number[]>([]);
|
||||
const weekday = ref(1);
|
||||
const lastDayOfWeek = ref(0);
|
||||
const lastDayOfWeek = ref(1);
|
||||
const rangeStart = ref<[number, number]>([min, max - 1]);
|
||||
const stepLeft = ref<[number, number]>([min, max]);
|
||||
const stepRight = ref<[number, number]>([1, max]);
|
||||
@ -222,7 +222,7 @@ const onCheckboxGroupChange = () => {
|
||||
<div v-if="isLastDayOfWeek" class="cron-radio flex items-center justify-start gap-5px">
|
||||
<NRadio v-if="isLastDayOfWeek" :value="TYPE.LAST_DAY" />
|
||||
{{ label.lastDayOfWeek }}
|
||||
<InputNumber v-model="lastDayOfWeek" :range="[0, 6]" :field-value="field.value" :locale="locale" />
|
||||
<InputNumber v-model="lastDayOfWeek" :range="[1, 7]" :field-value="field.value" :locale="locale" />
|
||||
</div>
|
||||
<div class="cron-radio flex flex-wrap items-center justify-start gap-5px">
|
||||
<NRadio class="cron-radio" :value="TYPE.SPECIFY">{{ label.specify }}</NRadio>
|
||||
|
@ -13,8 +13,8 @@ export const MAX_DATE = 31;
|
||||
export const MIN_MONTH = 1;
|
||||
export const MAX_MONTH = 12;
|
||||
|
||||
export const MIN_WEEK = 0;
|
||||
export const MAX_WEEK = 6;
|
||||
export const MIN_WEEK = 1;
|
||||
export const MAX_WEEK = 7;
|
||||
|
||||
export const MIN_YEAR = new Date().getFullYear();
|
||||
export const MAX_YEAR = 2099;
|
||||
@ -28,13 +28,13 @@ export const FRIDAY = 'friday';
|
||||
export const SATURDAY = 'saturday';
|
||||
|
||||
export const WEEKS = [
|
||||
{ value: SUNDAY, abbr: 'SUN', index: '0' },
|
||||
{ value: MONDAY, abbr: 'MON', index: '1' },
|
||||
{ value: TUESDAY, abbr: 'TUE', index: '2' },
|
||||
{ value: WEDNESDAY, abbr: 'WED', index: '3' },
|
||||
{ value: THURSDAY, abbr: 'THU', index: '4' },
|
||||
{ value: FRIDAY, abbr: 'FRI', index: '5' },
|
||||
{ value: SATURDAY, abbr: 'SAT', index: '6' }
|
||||
{ value: SUNDAY, abbr: 'SUN', index: '1' },
|
||||
{ value: MONDAY, abbr: 'MON', index: '2' },
|
||||
{ value: TUESDAY, abbr: 'TUE', index: '3' },
|
||||
{ value: WEDNESDAY, abbr: 'WED', index: '4' },
|
||||
{ value: THURSDAY, abbr: 'THU', index: '5' },
|
||||
{ value: FRIDAY, abbr: 'FRI', index: '6' },
|
||||
{ value: SATURDAY, abbr: 'SAT', index: '7' }
|
||||
];
|
||||
|
||||
export const WEEK_INDEX_REGEXP = new RegExp(WEEKS.map(({ index }) => `(?<!#)${index}`).join('|'), 'g');
|
||||
|
Loading…
Reference in New Issue
Block a user