<template>
    <div>
      <el-col :span="10"><el-input   v-model="minNum" :placeholder="$t('common.input')"></el-input></el-col>
      <el-col :span="4"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{$t('traceMgr.to')}}&nbsp;&nbsp;&nbsp;&nbsp;</span></el-col>
      <el-col :span="10"><el-input  v-model="maxNum" :placeholder="$t('common.input')"></el-input></el-col>

    </div>
</template>

<script>
export default {
  props: {
    valueFormat: {
      type: String,
      default: function () {
        return ''
      }
    },
    editable: {
      type: Boolean,
      default: function () {
        return true
      }
    },
    // v-model绑定的数据
    value: {
      type: [Array, Object],
      default: function () {
        return null
      }
    },
    align: {
      type: String,
      default: function () {
        return 'right'
      }
    },
    type: {
      type: String,
      default: function () {
        return ''
      }
    },
    unlink: {
      type: Boolean,
      default: function () {
        return false
      }
    },
    // 是否禁用修改
    disabled: {
      type: Boolean,
      default: function () {
        return false
      }
    },
    // 是否可清除
    clearable: {
      type: Boolean,
      default: function () {
        return true
      }
    },
    // 默认提示语
    placeholder: {
      type: String
    },
    xhr: {
      type: Function,
      default: function () {
        return null
      }
    },
    pickerOptions: {
      type: Object,
      default: function () {
        return null
      }
    }
  },
  methods: {
  },
  computed: {
    minNum: {
      get: function () {
        return this.value[0]
      },
      set: function (val) {
        let v = Object.assign({}, this.value)
        v[0] = val
        this.$emit('input', v)
      }
    },
    maxNum: {
      get: function () {
        return this.value[1]
      },
      set: function (val) {
        let v = Object.assign({}, this.value)
        v[1] = val
        this.$emit('input', v)
      }
    }
  }
}
</script>
