This commit is contained in:
hailin 2025-05-29 18:31:15 +08:00
parent 0f5d9b9b68
commit 8c9b6ec07e
2 changed files with 4 additions and 2 deletions

View File

@ -369,7 +369,8 @@ export default function SetupPage() {
stepTitle={t("setup.SetupComplete")} stepTitle={t("setup.SetupComplete")}
onShouldProceed={handleShouldProceed} onShouldProceed={handleShouldProceed}
//showNextButton={true} //showNextButton={true}
showNextButton={!isSubmitting} // 禁用按钮 showNextButton={true} // 一直显示按钮
isSubmitting={isSubmitting} // 控制是否禁用
showBackButton={true} showBackButton={true}
> >
<FinishStep displayName={displayName} /> <FinishStep displayName={displayName} />

View File

@ -21,6 +21,7 @@ interface StepContainerProps {
children?: React.ReactNode children?: React.ReactNode
showBackButton?: boolean showBackButton?: boolean
showNextButton?: boolean showNextButton?: boolean
isSubmitting?: boolean // ✅ 新增这个
} }
export const StepContainer: FC<StepContainerProps> = ({ export const StepContainer: FC<StepContainerProps> = ({
@ -80,7 +81,7 @@ export const StepContainer: FC<StepContainerProps> = ({
ref={buttonRef} ref={buttonRef}
size="sm" size="sm"
onClick={() => onShouldProceed(true)} onClick={() => onShouldProceed(true)}
disabled={!showNextButton} disabled={isSubmitting}
> >
{t("setup.next")} {t("setup.next")}
</Button> </Button>