<template>
  <el-select
    :model-value="value"
    @update:model-value="(value) => $emit('update:value', value)"
    placeholder="选择"
    size="small"
    @change="$emit('change')"
    style="width: 100px"
  >
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    />
  </el-select>
</template>

<script lang="ts" setup>
import { ElSelect, ElOption } from "element-plus";

defineProps<{
  value: any;
  options: { label: string; value: any }[];
  min?: number;
  max?: number;
  step?: number;
}>();
defineEmits<{ (e: "update:value", val: number): void; (e: "change"): void }>();
</script>
