套餐管理添加IP检查状态字段 &修复套餐提取和购买的数量显示问题

This commit is contained in:
Eamon-meng
2026-04-22 10:27:19 +08:00
parent eb4c2d2d5f
commit 7ff42861f1
5 changed files with 28 additions and 19 deletions

View File

@@ -11,7 +11,7 @@ export function BillingMethodField(props: {
modeList: PurchaseMode[]
timeDailyLimit: number
}) {
const {setValue} = useFormContext<PurchaseFormValues>()
const {setValue, getValues} = useFormContext<PurchaseFormValues>()
return (
<FormField<PurchaseFormValues, 'type'>
@@ -30,8 +30,7 @@ export function BillingMethodField(props: {
setValue('expire', '0')
return
}
setValue('daily_limit', props.timeDailyLimit)
setValue('expire', getValues('expire') || '0')
}}
className="flex gap-4 max-md:flex-col"
>