<!-- 搜索表单 -->
<template>
  <a-space :size="10" style="flex-wrap: wrap">
    <a-input-search
      allow-clear
      placeholder="用户ID|订单编号"
      style="width: 240px"
      v-model:value="where.keywords"
      @search="reload"
    />
  </a-space>
</template>

<script lang="ts" setup>
import {watch} from 'vue';
import useSearch from "@/utils/use-search";
import {GltUserTicketParam} from "@/api/glt/gltUserTicket/model";

const props = withDefaults(
  defineProps<{
    // 选中的角色
    selection?: [];
  }>(),
  {}
);

const emit = defineEmits<{
  (e: 'search', where?: GltUserTicketParam): void;
  (e: 'add'): void;
  (e: 'remove'): void;
  (e: 'batchMove'): void;
}>();

// 表单数据
const {where} = useSearch<GltUserTicketParam>({
  keywords: '',
  userId: undefined
});


const reload = () => {
  emit('search', where);
};


watch(
  () => props.selection,
  () => {
  }
);
</script>
