<template>
  <el-popover v-model="visible">
    <el-input
      slot="reference"
      @click="visible = true"
      v-model="inputValue"
      :placeholder="$t('quartz.prompt.taskExpr')"
    ></el-input>
    <cron v-model="inputValue" />
    <span style="color: #e6a23c; font-size: 12px"
      >corn从左到右（用空格隔开）：秒 分 小时 月份中的日期 月份 星期中的日期 年份</span
    >
  </el-popover>
</template>

<script>
import Cron from "@/comps/CmsQuaitzCron/cron";

export default {
  name: "CmsQuaitzCron",
  components: { Cron },
  computed: {
    inputValue: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      },
    },
    visible: {
      get() {
        return this.cronPopover;
      },
      set(val) {
        this.$emit("update:cronPopover", val);
      },
    },
  },
  props: {
    cronPopover: Boolean,
    value: String,
  },
};
</script>

<style scoped></style>
