<template>
  <el-input
    v-model="value"
    class="modal-search-input"
    placeholder="回车搜索用户"
    :clearable="true"
    v-on="$listeners"
    @keyup.native.enter="handleChange"
  >
    <template slot="prefix">
      <x-svg-icon name="search-icon"></x-svg-icon>
    </template>
  </el-input>
</template>

<script>
export default {
  data() {
    return {
      value: ''
    }
  },
  methods: {
    Init() {
      this.value = ''
    },
    handleChange() {
      this.$emit('search-change', this.value)
    }
  }
}
</script>
