<template>
  <div class="form-item-box" :style="{ width: width }">
    <el-input :placeholder="placeholder" v-bind="$attrs" :model-value="modelValue" @input="onInput" ></el-input>
  </div>
</template>

<script setup>
import { COMPONENT_WIDTH } from "@/constant";
import { ref, defineProps, defineEmits, defineExpose } from "vue";
const props = defineProps({
  //获取组件传值
  placeholder: {
    default: "",
    type: String
  },
  modelValue: {
    default: "",
    type: String
  },
  width: {
    default: COMPONENT_WIDTH,
    type: String
  }
});

const emits = defineEmits(["update:modelValue"]);
const onInput = (e) => {
  emits("update:modelValue", e);
};
</script>

