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
+4 -2
View File
@@ -53,11 +53,13 @@ export function DatePicker({
)}
variant="outline"
>
<span className="truncate">{value ? intlFormat(value) : <span>{placeholder}</span>}</span>
<span className="truncate">
{value ? intlFormat(value) : <span>{placeholder}</span>}
</span>
<div className="flex items-center gap-2">
{value && (
<span
className="flex items-center cursor-pointer"
className="flex cursor-pointer items-center"
onClick={handleClear}
onMouseDown={handleClear}
role="button"
+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);