merge: 同步 upstream/main 新功能到定制版本

- feat: Add slider verification code (bd67997)
- fix bug: Inventory cannot be zero (1f7a6ee)
- fix: resolve merge conflicts and lint errors
This commit is contained in:
2026-03-23 21:50:10 -07:00
parent 3806264343
commit d6616c5859
63 changed files with 3111 additions and 1130 deletions
+8 -5
View File
@@ -70,6 +70,13 @@ export function EnhancedInput<T = string>({
let inputValue = e.target.value;
if (props.type === "number") {
if (inputValue === "0") {
setValue("0");
setInternalValue(0);
onValueChange?.(processValue(0));
return;
}
if (
/^-?\d*\.?\d*$/.test(inputValue) ||
inputValue === "-" ||
@@ -105,11 +112,7 @@ export function EnhancedInput<T = string>({
};
const handleBlur = () => {
if (
props.type === "number" &&
value !== "" &&
(value === "-" || value === ".")
) {
if (props.type === "number" && value && (value === "-" || value === ".")) {
setValue("");
setInternalValue("");
onValueBlur?.("" as T);