<template>
    <div class="TabCard">
        <div class="title">{{title}}</div>
        <slot></slot>
        <el-button v-if="isSearch" class="btn" size="small" :loading="loading" @click="search">查询结果</el-button>
    </div>
</template>

<script>
    export default {
        name:"TabCard",
        props: {
            title: {
                type: String,
                default: '标题'
            },
            isSearch:{
                type:Boolean,
                default:false
            },
            loading:{
                type:Boolean,
                default:false
            }
        },
        methods: {
            search() {
                this.$emit('search')
            }
        },
    }
</script>

<style lang="scss" scoped>
.TabCard{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    background: #f3f3f3;
    padding: 0 10px;
    font-size: 14px;
    color: #666;
    font-weight: 600;

}
</style>