diff --git a/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue index 8446ed212..a5a9e56a6 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue @@ -2,9 +2,6 @@ import { ElInput, ElInputNumber, - ElDropdown, - ElDropdownMenu, - ElDropdownItem, ElDialog, ElTabs, ElTabPane, @@ -352,14 +349,19 @@ onMounted(() => { defaultValue.value = props.modelValue }) const emit = defineEmits(['update:modelValue']) -const handleShortcuts = (command) => { - if (command == 'custom') { - open() - } else { - defaultValue.value = command - emit('update:modelValue', defaultValue.value) +const select = ref() +watch( + () => select.value, + () => { + console.info(select.value) + if (select.value == 'custom') { + open() + } else { + defaultValue.value = select.value + emit('update:modelValue', defaultValue.value) + } } -} +) const open = () => { set() dialogVisible.value = true @@ -510,37 +512,23 @@ const submit = () => { }