Skip to content

Commit 483fd77

Browse files
authored
Merge pull request #507 from thundersdata-frontend/fix/#479
fix: #479
2 parents 7cbe0e1 + 419928d commit 483fd77

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@td-design/react-native': patch
3+
---
4+
5+
CountDown 组件支持 resendLabel 属性

packages/react-native/src/count-down/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const { px, ONE_PIXEL } = helpers;
1111
export interface SmsProps {
1212
/** 倒计时文字,默认为 获取验证码 */
1313
label?: string;
14+
/** 重新发送文字,默认为:重新发送 */
15+
resendLabel?: string;
1416
/** 倒计时时长,默认为 60秒 */
1517
count?: number;
1618
/** 发送验证码之前的回调,通常用于判断手机号是否有值 */
@@ -37,6 +39,7 @@ const CountDown = forwardRef<TextInput, CountDownProps>(
3739
{
3840
bordered = false,
3941
label = '发送验证码',
42+
resendLabel = '重新发送',
4043
placeholder = '请输入验证码',
4144
leftIcon,
4245
value,
@@ -54,6 +57,7 @@ const CountDown = forwardRef<TextInput, CountDownProps>(
5457
const theme = useTheme<Theme>();
5558
const { sendSms, text, disabled } = useSms({
5659
defaultLabel: label,
60+
resendLabel,
5761
count,
5862
onBefore,
5963
onSend,

0 commit comments

Comments
 (0)