el-input type="number" 限制最大最小值

  <el-input
            v-model="formData.detectionMaxValue"
            placeholder="请输入合格最大值"
            clearable
            :style="{ width: '100%' }"
            type="number"
            @blur="
              if (formData.detectionMaxValue > 100000)
                formData.detectionMaxValue = 100000;
              if (formData.detectionMaxValue < 0)
                formData.detectionMaxValue = 0;
            "
          >
          </el-input>

 

posted @ 2025-12-24 14:37  ThisCall  阅读(13)  评论(0)    收藏  举报