0.1.2 • Published 3 years ago
el-cron v0.1.2
el-cron
1. 介绍
2. 使用说明
直接使用el-cron组件
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import elCron from 'el-cron'
import 'el-cron/lib/el-cron.css'
Vue.use(elCron)
Vue.use(ElementUI);
...
<div>
<el-cron style="width: 700px;"
v-model="formData.cronValue2"></el-cron>
</div>
3. 属性说明
属性名 | 参数类型 | 说明 |
---|---|---|
v-model | String | 双向绑定 |
disabled | Boolean | 是否禁止编辑 |
exeStartTime | Number, String, Date | 设置cron表达式开始执行时间 |
hideSecond | Boolean | 是否隐藏参数秒和年设置,如果隐藏,那么参数秒和年将会全部忽略掉。 |
hideYear | Boolean | 是否隐藏参数年设置,如果隐藏,那么参数年将会全部忽略掉 |
remote | Function | 获取预览执行时间列表的函数,格式为:remote (cron值, time时间戳, cb回调函数) |
3.1 支持格式
* * * * * * *
┬ ┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ | └ year (可选)
│ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sun)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31)
│ │ └─────────────── hour (0 - 23)
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59) (可选)