Fetch the repository succeeded.
Layui自定义Cron表达式组件,生成cron表达式,目前没有校验,需要由后端接口校验数据。
layui
.config({
base: "../static/layui_exts/", // 扩展组件跟路径
})
.extend({
cron: "cron/cron" // 扩展组件
})
.use(["cron"], function () {
var $ = layui.$,
cron = layui.cron;
cron.render({
elem: "#cron", // 绑定元素
run: "../static/json/run.json", // 获取最近运行时间的接口
done: function(cronStr) {
console.log(cronStr);
}
});
});
cron.render({
elem: "#cron", // 绑定元素
run: "../static/json/run.json", // 获取最近运行时间的接口
done: function(cronStr) { // 点击确定,触发,参数为 cron 表达式字符串
console.log(cronStr);
}
});
<input type="text" class="layui-input" id="cron" value="0/20 * * * * ?" />
Sign in to post a comment
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.
Repository Comments ( 25 )