Files
mayfly-go/frontend/src/components/crontab/CrontabInput.vue

20 lines
685 B
Vue
Raw Normal View History

<template>
2024-11-20 22:43:53 +08:00
<el-input v-model="cron" :placeholder="$t('components.crontab.crontabInputPlaceholder')">
<template #prepend>
<el-button @click="showCron = true" icon="Pointer"></el-button>
</template>
</el-input>
2024-11-20 22:43:53 +08:00
<el-dialog :title="$t('components.crontab.crontabTitle')" v-model="showCron" width="660px">
<Crontab :expression="cron" @hide="showCron = false" @fill="(ex: any) => (cron = ex)" />
</el-dialog>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import Crontab from '@/components/crontab/Crontab.vue';
const cron = defineModel<string>('modelValue', { required: true });
const showCron = ref(false);
</script>