修复购买套餐Input框和计算数量传参的问题 &

This commit is contained in:
Eamon-meng
2025-12-18 12:28:29 +08:00
parent 4288b0de10
commit 375a6f30c0
6 changed files with 41 additions and 15 deletions

View File

@@ -105,6 +105,12 @@ export default function Center() {
className="w-40 h-10 border border-gray-200 rounded-sm text-center"
min={minValue}
step={step}
onBlur={(e) => {
const value = Number(e.target.value)
if (value < 500) {
form.setValue('quota', 500)
}
}}
/>
<Button
theme="outline"
@@ -164,9 +170,20 @@ export default function Center() {
<Minus/>
</Button>
<div className="w-40 h-10 border border-gray-200 rounded-sm flex items-center justify-center">
{value}
</div>
<Input
{...field}
id={id}
type="number"
className="w-40 h-10 border border-gray-200 rounded-sm text-center"
min={100}
step={100}
onBlur={(e) => {
const value = Number(e.target.value)
if (value < 100) {
form.setValue('daily_limit', 100)
}
}}
/>
<Button
theme="outline"