Files
gxtyzx-admin/src/views/booking/bookingIntegral/components/search.vue
T
2024-08-23 22:28:24 +08:00

53 lines
1.1 KiB
Vue

<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<a-input-search
allow-clear
placeholder="姓名|手机号|用户ID"
v-model:value="where.keywords"
@pressEnter="search"
@search="search"
style="width: 360px"
/>
</a-space>
</template>
<script lang="ts" setup>
import { watch } from 'vue';
import { BookingIntegralParam } from '@/api/booking/bookingIntegral/model';
import useSearch from '@/utils/use-search';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: 'search', where?: BookingIntegralParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
// 表单数据
const { where } = useSearch<BookingIntegralParam>({
id: undefined,
timeStart: undefined,
timeEnd: undefined,
keywords: undefined
});
// 新增
const search = () => {
emit('search');
};
watch(
() => props.selection,
() => {}
);
</script>