<template>
  <Comp
    :style="props.data.component === 'Select' ? 'width:120px' : 'width:120px'"
    :options="props.data.componentProps.options"
    :placeholder="props.data.placeholder"
    v-model:value="props.record[props.data.dataIndex]"
    :title="props.record[props.data.dataIndex]"
  />
</template>

<script setup lang="ts">
  import { defineProps, defineEmits, ref } from 'vue';
  import { componentMap } from '@/components/Form/src/componentMap';
  const props = defineProps(['data', 'record']);
  const Comp = componentMap.get(props.data.component);
</script>

<style lang="scss" scoped></style>
