<template>
    <div style="margin-top: 15px;">
        <el-input :placeholder="placeholder" v-model.trim="value"  class="input-with-select" @keyup.native.enter="submit" style="width:300px">
            <el-button slot="append" icon="el-icon-search" :loading="searchLoading" @click="submit"></el-button>
        </el-input>
        <div style="float: right" v-if="$slots.right">
            <slot name="right"></slot>
        </div>
    </div>
</template>

<script>
export default {
    name: "seFiltrate02",
    data() {
        return {
            value:""
        };
    },
    props: {
        defSubmit:{
            type:Boolean,
            default:true,
        },
        placeholder:{
            type:String,
            default:"请输入内容",
        },
        searchLoading: {
            type:Boolean,
            default:false
        },

    },
    created() {

    },
    mounted() {
        this.defSubmit && this.submit();
    },
    methods: {
        /**
         * 提交按钮事件
         */
        submit() {
            this.$emit("submit", this.value);
        },
    }
};
</script>
