<template>
  <div>
    <el-date-picker
      v-model="currentValue"
      type="daterange"
      range-separator="-"
      value-format="timestamp"
      start-placeholder="开始日期"
      end-placeholder="结束日期"></el-date-picker>
  </div>
</template>
<script>
export default {
  props: {
    value: {
      type: [Array, String],
      default: function () {
        return null
      }
    }
  },
  computed: {
    currentValue: {
      get: function () {
        return this.value
      },
      set: function (value) {
        this.$emit('input', value)
      }
    }
  }
}
</script>
