<template>
  <div class="search-input flex gap-$search-input-gap">
    <el-input v-model="model" class="w-50" :placeholder="placeholder" />
    <el-button type="primary" plain @click="$emit('submit')">查询</el-button>
    <el-button type="warning" plain @click="reset">重置</el-button>
  </div>
</template>
<style lang="scss" scoped>
.el-button {
  margin: 0;
}
</style>
<script setup lang="ts">
defineProps<{
  placeholder?: string;
}>();
defineEmits<{
  submit: [];
  reset: [];
}>();
const model = defineModel({ default: '' });
function reset() {
  model.value = '';
}
defineExpose({ reset });
</script>
