Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
"show": true,
"taro": true,
"author": "Drjingfubo",
"dd": false
"dd": true
},
{
"version": "2.0.0",
Expand Down
10 changes: 10 additions & 0 deletions src/packages/shortpassword/shortpassword.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
@import '../popup/popup.scss';

.nut-shortpassword {
&-popup {
padding: 32px 24px 28px 24px;
border-radius: 12px;
text-align: center;
}

&-title {
display: flex;
justify-content: center;
line-height: 1;
font-size: $font-size-l;
color: $color-title;
}

&-description {
display: flex;
justify-content: center;
margin-top: 12px;
margin-bottom: 24px;
line-height: 1;
Expand Down
8 changes: 3 additions & 5 deletions src/packages/shortpassword/shortpassword.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const InternalShortPassword: ForwardRefRenderFunction<
className,
closeable,
autoFocus,
round,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

需要更新 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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
}

onFocus,
onChange,
onConfirm,
Expand Down Expand Up @@ -122,15 +123,12 @@ export const InternalShortPassword: ForwardRefRenderFunction<

return (
<Popup
style={{
padding: '32px 24px 28px 24px',
borderRadius: '12px',
textAlign: 'center',
}}
className={`${classPrefix}-popup`}
visible={visible}
closeable
onOverlayClick={onClose}
onCloseIconClick={onClose}
round={round}
{...rest}
>
<View className={classNames(classPrefix, className)} style={style}>
Expand Down
8 changes: 3 additions & 5 deletions src/packages/shortpassword/shortpassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const InternalShortPassword: ForwardRefRenderFunction<
className,
closeable,
autoFocus,
round,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

新增的 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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
}

onFocus,
onChange,
onConfirm,
Expand Down Expand Up @@ -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}>
Expand Down
Loading