<template>
  <!-- 过滤客户资料表格 -->
  <div class="filterTable">
    <FilterOption :selectList="selectList"
                  :inputList="inputList"
                  :fixedBtnList="fixedBtnList" />
    <slot></slot>
  </div>
</template>

<script lang="ts">
import FilterOption from '@/common/components/filter/index.vue';
import { defineComponent } from 'vue';
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';

export default defineComponent({
    name: 'filter-custom-table',
    components: { FilterOption },
    setup(props, context) {
        const select: SelectList[] = [
            {
                value: undefined,
                key: 'userinfotype',
                placeholder: '全部客户类型',
                list: [
                    { value: 1, lable: '个人' },
                    { value: 2, lable: '企业' },
                ],
            },
        ];
        const input: InputList[] = [
            { value: '', placeholder: '模糊搜索客户简称', key: 'nickname' },
            { value: '', placeholder: '模糊搜索客户名称', key: 'customername' },
            { value: '', placeholder: '模糊搜索手机号码', key: 'mobile' },
        ];
        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
        return {
            selectList,
            inputList,
            fixedBtnList,
        };
    },
});
</script>

<style lang="less">
</style>;
