登录页的登录按钮看不见

This commit is contained in:
2026-07-15 19:51:57 +08:00
parent 68aa7d3ce2
commit f15d2057f2
2 changed files with 30 additions and 20 deletions
+14 -14
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { View, Text, Input, Button, Image } from '@tarojs/components';
import { View, Text, Input, Image } from '@tarojs/components';
import Taro, { useRouter } from '@tarojs/taro';
import {
SmsScene,
@@ -351,20 +351,20 @@ export default function LoginPage() {
</Text>
) : null}
<Button
className="login-sms-btn"
loading={loading}
disabled={loading}
onClick={() => void login()}
<View
className={`login-sms-btn${loading ? ' login-sms-btn--disabled' : ''}`}
onClick={loading ? undefined : () => void login()}
>
{loading
? '处理中...'
: completeMode === 'phone'
? '完成验证'
: bindMode
? '绑定并登录'
: '登录'}
</Button>
<Text className="login-sms-btn__text">
{loading
? '处理中...'
: completeMode === 'phone'
? '完成验证'
: bindMode
? '绑定并登录'
: '登录'}
</Text>
</View>
</View>
)}