<template>
  <div v-if="['dashboard', 'number'].includes(formConfig.currentItem.componentCode)">
    <a-form-item label="最大值:">
      <a-input-number v-model:value="formConfig.currentItem.formItemNumber.maxValue" placeholder="请输入最大值" style="width: 100%" />
    </a-form-item>
    <a-form-item label="最小值:">
      <a-input-number v-model:value="formConfig.currentItem.formItemNumber.minValue" placeholder="请输入最小值" style="width: 100%" />
    </a-form-item>
    <a-form-item label="默认值:">
      <a-input-number v-model:value="formConfig.currentItem.formItemNumber.defaultValue" placeholder="请输入默认值" style="width: 100%" />
    </a-form-item>
    <a-form-item label="小数点位数:" v-if="formConfig.currentItem.componentCode == 'number'">
      <a-input-number
        v-model:value="formConfig.currentItem.formItemNumber.decimalPlaces"
        placeholder="请输入小数点位数"
        style="width: 100%"
      />
    </a-form-item>
  </div>
</template>

<script setup name="NumberAttr">
import { inject } from 'vue';

const formConfig = inject('formConfig');
</script>

<style></style>
