<template>
    <div class="container border-bottom">
        <span>搜索: </span>
        <el-input
            with="200"
            type="text"
            v-model="search"
            placeholder="商品组名"
            size="small"
            clearable
            @searchActive="queryClick"
            @keyup.enter.native="queryClick()"
            @clear="queryClick"
        >
        <i slot="prefix" class="el-icon-search"  @click="queryClick()"></i>
        </el-input>
    </div>
</template>
<script>
export default {
    name:'search',
    data(){
        return {
            search:""
        }
    },
    methods:{
        queryClick(){
            this.$emit('searchActive',this.search)
        }
        
    }
}
</script>
<style scoped>
    .el-input {
        width: 200px;
        margin-right: 16px;
    }
    /deep/.el-input__prefix {
    display: flex;
    align-items: center;
    }
</style>