cron生成的表达式hour优化

This commit is contained in:
RuoYi 2024-07-01 16:16:35 +08:00
parent c01ac5ccac
commit 5d8172a117
1 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,12 @@ const checkboxString = computed(() => {
watch(() => props.cron.hour, value => changeRadioValue(value)) watch(() => props.cron.hour, value => changeRadioValue(value))
watch([radioValue, cycleTotal, averageTotal, checkboxString], () => onRadioChange()) watch([radioValue, cycleTotal, averageTotal, checkboxString], () => onRadioChange())
function changeRadioValue(value) { function changeRadioValue(value) {
if (props.cron.min === '*') {
emit('update', 'min', '0', 'hour');
}
if (props.cron.second === '*') {
emit('update', 'second', '0', 'hour');
}
if (value === '*') { if (value === '*') {
radioValue.value = 1 radioValue.value = 1
} else if (value.indexOf('-') > -1) { } else if (value.indexOf('-') > -1) {