From 0501b3babc293588aa1fd3d5188c77a7697bf4d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Mon, 2 Mar 2026 16:37:23 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=9C=80=E5=B0=8F?=
=?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/input-number/input-number.vue | 15 ++++++++++++++-
src/design/index.less | 4 ++++
.../ContractFact/components/createForm.vue | 4 ++--
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/components/input-number/input-number.vue b/src/components/input-number/input-number.vue
index 37351d0..424ba29 100644
--- a/src/components/input-number/input-number.vue
+++ b/src/components/input-number/input-number.vue
@@ -54,6 +54,12 @@ export default {
type: Number,
default: 2
},
+ min: {
+ type: Number,
+ },
+ max: {
+ type: Number,
+ },
addonBefore: String,
addonAfter: String,
allowClear: Boolean,
@@ -92,8 +98,15 @@ export default {
emit('focus', e);
};
const handleBlur = (e) => {
+ let val = e.target.value
+ if (props.min+''&& Number(e.target.value) < Number(props.min)) {
+ val = Number(props.min)
+ }
+ if (props.max+''&& Number(e.target.value) > Number(props.max)) {
+ val = Number(props.max)
+ }
model.value.focus = false;
- model.value.setViewValue(e.target.value);
+ model.value.setViewValue(val);
emit('blur', e);
};
diff --git a/src/design/index.less b/src/design/index.less
index 38f22c9..bb1f4c8 100644
--- a/src/design/index.less
+++ b/src/design/index.less
@@ -99,4 +99,8 @@ span {
justify-content: flex-start;
display: inline-flex;
}
+}
+.ant-input-affix-wrapper-disabled {
+ border-color: transparent !important;
+ border: 1px solid #fff !important;
}
\ No newline at end of file
diff --git a/src/views/contract/ContractFact/components/createForm.vue b/src/views/contract/ContractFact/components/createForm.vue
index 33eeeca..4faee43 100644
--- a/src/views/contract/ContractFact/components/createForm.vue
+++ b/src/views/contract/ContractFact/components/createForm.vue
@@ -76,7 +76,7 @@
-
+
@@ -91,7 +91,7 @@
+ @blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />