<template>
    <el-row :gutter="10" class="btnsA">
        <el-col :span="1.5">
            <el-button
            type="primary"
            size="mini"
            @click="handleSeach"
            >
            <img :src="seach" style="margin-right: 10px">
            <span>搜索</span>
            </el-button>
        </el-col>
        <el-col :span="1.5" v-if="showRest">
            <el-button
            size="mini"
            @click="handleRest"
            >
            <img :src="rest" style="margin-right: 10px">
            <span>重置</span>
            </el-button>
        </el-col>
    </el-row>
</template>

<script>
import seach from '../assets/btnIcon/seach.png'
import rest from '../assets/btnIcon/rest.png'
export default {
    props: {
        showRest: {
            type: Boolean,
            default: () => {
                return true;
            },
        }
    },
    data() {
        return {
            seach: seach,
            rest: rest
        }
    },
    methods: {
        handleSeach() {
            this.$emit('handleSeach')
        },
        handleRest() {
            this.$emit('handleRest')
        }
    }
}
</script>

<style lang="less">
.btnsA{
    padding-left: 10px;
    .is-disabled{
        opacity: 0.5;
    }
}
</style>