JEasyCron定时表达式选择组件✔
JEasyCron 用于构建 cron 表达式
组件参数
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
value(v-model) | string | '' | ||
hideSecond | bool | false | 是否隐藏参数秒和年设置,如果隐藏,那么参数秒和年将会全部忽略掉。 | |
hideYear | bool | false | 是否隐藏参数年设置,如果隐藏,那么参数年将会全部忽略掉 | |
remote | function | 获取预览执行时间列表的函数,格式为:remote (cron值, time时间戳, cb回调函数) | ||
disabled | bool | false | 是否禁用 |
效果展示
使用示例
import { JCronValidator } from '/@/components/Form'
const schemas: FormSchema[] = [
{
field: 'JEasyCron',
component: 'JEasyCron',
label: 'JEasyCron',
defaultValue: '* * * * * ? *',
// 提供 cron 表达式校验
rules: [{ validator: JCronValidator }],
},
]