<!-- 搜索表单 -->
<template>
    <ele-card :body-style="{ paddingBottom: '8px' }">
        <ProSearch
            :items="formItems"
            ref="searchRef"
            @search="search"
            :initKeys="initKeys"
        />
    </ele-card>
</template>

<script setup>
    import { reactive, ref, defineEmits } from 'vue';
    import ProSearch from '@/components/CommonPage/ProSearch2.vue';

    const emit = defineEmits(['search']);

    const formItems = reactive([
        { type: 'input', label: '仓库联系人', prop: 'contactsName' },
        { type: 'input', label: '联系人电话', prop: 'mobile' },
        { type: 'input', label: '仓库名称', prop: 'repositoryName' }
    ]);

    const initKeys = reactive({
        contactsName: '',
        mobile: '',
        repositoryName: ''
    });

    const searchRef = ref(null);
    /** 搜索 */
    const search = (data) => {
        emit('search', { ...data });
    };
</script>
