-
Notifications
You must be signed in to change notification settings - Fork 285
feat(shortpassword): harmony #3017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -61,6 +61,7 @@ export const InternalShortPassword: ForwardRefRenderFunction< | |||||||||||||||||||||||||||||||||||||||||||
| className, | ||||||||||||||||||||||||||||||||||||||||||||
| closeable, | ||||||||||||||||||||||||||||||||||||||||||||
| autoFocus, | ||||||||||||||||||||||||||||||||||||||||||||
| round, | ||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 新增的 round 属性缺少在 ShortPasswordProps 接口中的声明。 目前 round 属性仅在组件内部进行了解构,但未在 ShortPasswordProps 接口(第16-34行)中声明。这可能导致 TypeScript 类型检查警告或错误。 建议在 ShortPasswordProps 接口中添加 round 属性定义: export interface ShortPasswordProps extends PopupProps {
value: string
visible: boolean
plain: boolean
title: ReactNode
description: ReactNode
tips: ReactNode
hideFooter: boolean
length: number
error: ReactNode
autoFocus: boolean
+ round?: boolean
onFocus: () => void
onChange: (value: string) => void
onConfirm: (value: string) => void
onCancel: () => void
onClose: () => void
onTips: () => void
onComplete: (value: string) => void
}📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
| onFocus, | ||||||||||||||||||||||||||||||||||||||||||||
| onChange, | ||||||||||||||||||||||||||||||||||||||||||||
| onConfirm, | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -121,15 +122,12 @@ export const InternalShortPassword: ForwardRefRenderFunction< | |||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||
| <Popup | ||||||||||||||||||||||||||||||||||||||||||||
| style={{ | ||||||||||||||||||||||||||||||||||||||||||||
| padding: '32px 24px 28px 24px', | ||||||||||||||||||||||||||||||||||||||||||||
| borderRadius: '12px', | ||||||||||||||||||||||||||||||||||||||||||||
| textAlign: 'center', | ||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||
| className={`${classPrefix}-popup`} | ||||||||||||||||||||||||||||||||||||||||||||
| visible={visible} | ||||||||||||||||||||||||||||||||||||||||||||
| closeable | ||||||||||||||||||||||||||||||||||||||||||||
| onOverlayClick={handleClose} | ||||||||||||||||||||||||||||||||||||||||||||
| onCloseIconClick={handleClose} | ||||||||||||||||||||||||||||||||||||||||||||
| round={round} | ||||||||||||||||||||||||||||||||||||||||||||
| {...rest} | ||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||
| <div className={classNames(classPrefix, className)} style={style}> | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要更新 ShortPasswordProps 接口
您在组件的析构中添加了
round参数,但没有在ShortPasswordProps接口中声明此属性。为确保类型安全和文档完整性,应当更新接口定义。建议在 ShortPasswordProps 接口中添加 round 属性定义:
export interface ShortPasswordProps extends PopupProps { value: string visible: boolean plain: boolean title: ReactNode description: ReactNode tips: ReactNode hideFooter: boolean length: number error: ReactNode autoFocus: boolean + round?: boolean onFocus: () => void onChange: (value: string) => void onConfirm: (value: string) => void onCancel: () => void onClose: () => void onTips: () => void onComplete: (value: string) => void }📝 Committable suggestion