mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix: fix the issue that if there is only one input field in the page form, the page will reload when the Enter key is pressed
This commit is contained in:
parent
3a84c21985
commit
4dad2eca69
|
@ -71,6 +71,7 @@ export default function CheckCode() {
|
|||
</div>
|
||||
|
||||
<form action="">
|
||||
<input type='text' className='hidden' />
|
||||
<label htmlFor="code" className='system-md-semibold text-text-secondary mb-1'>{t('login.checkCode.verificationCode')}</label>
|
||||
<Input value={code} onChange={e => setVerifyCode(e.target.value)} max-length={6} className='mt-1' placeholder={t('login.checkCode.verificationCodePlaceholder') as string} />
|
||||
<Button loading={loading} disabled={loading} className='my-3 w-full' variant='primary' onClick={verify}>{t('login.checkCode.verify')}</Button>
|
||||
|
|
|
@ -62,6 +62,7 @@ export default function CheckCode() {
|
|||
</div>
|
||||
|
||||
<form onSubmit={() => { }}>
|
||||
<input type='text' className='hidden' />
|
||||
<div className='mb-2'>
|
||||
<label htmlFor="email" className='my-2 system-md-semibold text-text-secondary'>{t('login.email')}</label>
|
||||
<div className='mt-1'>
|
||||
|
|
|
@ -53,6 +53,7 @@ export default function MailAndCodeAuth({ isInvite }: MailAndCodeAuthProps) {
|
|||
}
|
||||
|
||||
return (<form onSubmit={() => { }}>
|
||||
<input type='text' className='hidden' />
|
||||
<div className='mb-2'>
|
||||
<label htmlFor="email" className='my-2 system-md-semibold text-text-secondary'>{t('login.email')}</label>
|
||||
<div className='mt-1'>
|
||||
|
|
Loading…
Reference in New Issue
Block a user