套餐管理添加IP检查状态字段 &修复套餐提取和购买的数量显示问题
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user