fix: InputNumber cannot enter negative values 0 when using allow-empty=false

pull/7044/head
minekuba 2025-01-04 01:52:53 +01:00
parent 600e36aab1
commit 894779ba7c
1 changed files with 3 additions and 1 deletions

View File

@ -634,7 +634,9 @@ export default {
let newValueStr;
if (sign.isMinusSign) {
if (selectionStart === 0) {
const value = this.parseValue(inputValue);
if (selectionStart === 0 || value === 0) {
newValueStr = inputValue;
if (minusCharIndex === -1 || selectionEnd !== 0) {