<template>
  <el-input
    v-model="input"
    :placeholder="$attrs.placeholder"
    clearable
    :size="$attrs.size"
    :style="{ width: width }"
  ></el-input>
</template>
<script>
export default {
  name: 'PageInput',
  data() {
    return {}
  },
  props: {
    defaultValue: {
      default: ''
    },
    width: {
      type: String,
      default: '80%'
    }
  },
  computed: {
    input: {
      get() {
        return this.defaultValue
      },
      set(val) {
        this.$emit('input', val, this.$attrs.querykey)
      }
    }
  },
  inheritAttrs: false,
  mounted() {}
}
</script>
