<template>
  <div>
    <el-input v-model="modelValue"
              :maxlength="maxlength"
              :placeholder="placeholder"
              :clearable="clearable"
              :disabled="disabled"
              class="autocompleteClass"></el-input>
  </div>
</template>

<script>
// import feedbackMaterialApi from '@/api/assetaudit/feedbackMaterial/feedbackMaterialApi'
export default {
  props: {
    // v-model绑定的数据
    value: {
      type: String,
      default: function () {
        return null
      }
    },
    clearable: {
      type: Boolean,
      default: () => {
        return true
      }
    },
    disabled: {
      type: Boolean,
      default: () => {
        return true
      }
    },
    debounce: {
      type: Number,
      default: function () {
        return 300
      }
    },
    // 最大输入长度
    maxlength: {
      type: Number,
      default: () => {
        return 100
      }
    },
    // 显示个数
    showWordLimit: {
      type: Boolean,
      default: () => {
        return false
      }
    },
    // 输入框占位文本
    placeholder: {
      type: String,
      default: () => {
        return ''
      }
    },
    // tagCode
    tagCode: {
      type: String,
      default: () => {
        return null
      }
    },
    // name
    name: {
      type: String,
      default: () => {
        return null
      }
    }
  },
  modelValue: {
    get: function () {
      return this.value
    },
    set: function (value) {
      value = value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9\w]/g, '')
      this.$emit('input', value)
    }
  },
  methods: {
    // 远程搜索
    remoteSearch () {
      console.log('111111111111')
    }
  }

}
</script>

<style>

</style>
