<template>
  <div class="Search">
    <input
      v-model="value"
      type="text"
      placeholder="请输入搜索关键字......"
      @keyup.enter="Success"
    >
    <i
      @click="Success"
      class="el-icon-search btn"
    ></i>
  </div>
</template>
<script>
export default {
  props: {

  },
  data () {
    return {
      value: ''
    }
  },
  methods: {
    Success () {
      this.$emit('Func', this.value)
    }
  }
}
</script>
<style lang="less" scoped>
@border-color: #eaeaea;
.Search {
  width: 100%;
  position: relative;
  input {
    width: 100%;
    box-sizing: border-box;
    padding: 0 35px 0 5px;
    outline: none;
    line-height: 30px;
    border: 1px solid @border-color;
    color: #666;
    height: 30px;
  }
  .btn {
    position: absolute;
    right: 1px;
    top: 1px;
    line-height: 28px;
    width: 28px;
    text-align: center;
    color: #409eff;
    border-left: 1px solid @border-color;
    background-color: #fff;
  }
}
</style>