<template>
  <div class="date-range">
    <el-date-picker v-model="value[0]" value-format="yyyy-MM-dd" type="date" placeholder="起始日期"></el-date-picker>
    <span class="to">至</span>
    <el-date-picker v-model="value[1]" value-format="yyyy-MM-dd" type="date" placeholder="至今"></el-date-picker>
  </div>
</template>

<script>
export default {
  model: {
    prop: "value",
    event: "change"
  },
  props: ["value"],
  components: {},
  data() {
    return {};
  },
  computed: {},
  mounted() {
    console.log(this.value, this.change);
  },
  methods: {
    handleDeleteFile() {
      this.$emit("change", "");
    }
  }
};
</script>

<style lang="scss">
.date-range {
  position: relative;
  display: flex;
  line-height: 40px;
  background: #fff;
  .to {
    margin: 0 10px;
  }
  .el-date-editor {
    width: 150px;
  }
}
</style>
