CRON组件一个复杂的一个简单的
一个是复杂点的一个是简单点。
1.以简单的为例使用:
父组件
import CronSimple from "@/views/xxx/components/cron-simple/index.vue";
components: {
CronSimple
}
<el-dialog title="调度CRON"
v-if="cronVisible"
:visible.sync="cronVisible"
:close-on-click-modal="false"
:destroy-on-close="true"
:show-close="false"
append-to-body
clear-body-padding
top="60px"
custom-class="cron-box-dialog-first"
width="60%">
<CronSimple ref="cronSimpleRef" />
<div slot="footer" style="display: flex;justify-content: flex-end;">
<el-button size="mini" @click="changeCron" type="primary">确 定</el-button>
<el-button size="mini" @click="cronVisible = false">关 闭</el-button>
</div>
</el-dialog>
changeCron(val) {
this.cornValue = this.$refs["cronSimpleRef"].cronExpression;
this.cronVisible = false;
},
剩余的代码在组件包里。
标签:CronSimple,复杂,CRON,components,简单,组件 From: https://blog.csdn.net/weixin_41957626/article/details/143451416