mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-24 01:50:28 +08:00
feat: 新增cron组件、cron支持6位秒级别
This commit is contained in:
19
mayfly_go_web/src/components/crontab/CrontabInput.vue
Normal file
19
mayfly_go_web/src/components/crontab/CrontabInput.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<el-input v-model="cron" placeholder="可点击左边按钮进行可视化配置">
|
||||
<template #prepend>
|
||||
<el-button @click="showCron = true" icon="Pointer"></el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-dialog title="生成 cron" v-model="showCron" width="600px">
|
||||
<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>
|
||||
Reference in New Issue
Block a user