添加disabled属性
This commit is contained in:
@@ -86,7 +86,7 @@ const ValidPhone: React.FC = () => {
|
||||
<Input placeholder="请输入验证码" type="number" onInput={(e) => { handleInput(e, "sms_code") }}></Input>
|
||||
<Button className="btn" onClick={getSMSCode}>获取验证码</Button>
|
||||
</View>
|
||||
<Button className={`btn bottom-btn ${formData.sms_code === "" ? 'disabled' : ''}`} onClick={handleConfirm} style={{ bottom: isKeyboardVisible ? `${keyboardHeight + 20}px` : undefined }}>提交</Button>
|
||||
<Button className={`btn bottom-btn ${formData.sms_code === "" ? 'disabled' : ''}`} disabled={formData.sms_code === ""} onClick={handleConfirm} style={{ bottom: isKeyboardVisible ? `${keyboardHeight + 20}px` : undefined }}>提交</Button>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user