Skip to content
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

feat: 签名组件增加当没有签名或已清空的情况下的参数暴露 #2288

Merged
merged 7 commits into from
May 28, 2024

Conversation

xiaoyatong
Copy link
Collaborator

@xiaoyatong xiaoyatong commented May 27, 2024

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

  • 新功能

    • Signature 组件的 onConfirm 回调函数新增了一个可选参数 isSigned,用于传递签名状态。
    • Demo1 组件中,confirm 函数现在接受一个额外的可选参数 isSigned,根据签名状态打印不同的日志信息。
  • 改进

    • Signature 组件内部添加了状态管理,用于跟踪签名是否已完成,并在保存签名时影响逻辑。
    • 测试用例重构,新增 Button 组件,用于清除和确认签名操作。

Copy link

coderabbitai bot commented May 27, 2024

Walkthrough

此次更新对 Signature 组件进行了重要的重构,增加了一个可选参数 isSigned 用于 onConfirm 回调函数,以便在确认签名时传递更多信息。同时,相关的文档和测试用例也进行了相应的更新,确保新功能的正确性和完整性。

Changes

文件路径 更改摘要
src/packages/signature/test/signature.spec.tsx 引入了 Button 组件,并重构了测试用例,添加了 App 组件以包含 SignatureButton 组件。
src/packages/signature/demos/h5/demo1.tsx confirm 函数现在接受一个可选参数 isSigned,并根据是否有签名打印不同的日志信息。
src/packages/signature/demos/taro/demo1.tsx 同样地,confirm 函数现在接受一个可选参数 isSigned,并根据其值打印不同的日志信息。
src/packages/signature/doc.en-US.md 更新了 Signature 组件的 onConfirm 回调函数签名,增加了一个可选参数 hasSigatured
src/packages/signature/doc.md 更新了 Signature 组件的 onConfirm 回调函数签名,增加了一个可选参数 isSigned
src/packages/signature/doc.taro.md 更新了 onConfirm 回调函数签名,增加了一个可选参数 isSignatured
src/packages/signature/doc.zh-TW.md 更新了 onConfirm 回调函数签名,增加了一个可选参数 isSigned
src/packages/signature/signature.taro.tsx 修改了 InternalSignature 组件,增加了 hasSignatured 状态和参数,并在保存前处理无签名的情况。
src/packages/signature/signature.tsx 修改了 Signature 组件,增加了 isSigned 状态和参数,并在保存签名时传递 isSigned 状态。

🐰 在代码的世界里,签名如风,
新增参数,功能更丰。
测试与文档,一一更新,
组件更强,代码更精。
兔子欢庆,跳跃不停,
开发之路,创新不停。


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 28bd3b3 and 14d044b.
Files ignored due to path filters (1)
  • src/packages/signature/__test__/__snapshots__/signature.spec.tsx.snap is excluded by !**/*.snap
Files selected for processing (9)
  • src/packages/signature/test/signature.spec.tsx (1 hunks)
  • src/packages/signature/demos/h5/demo1.tsx (1 hunks)
  • src/packages/signature/demos/taro/demo1.tsx (1 hunks)
  • src/packages/signature/doc.en-US.md (1 hunks)
  • src/packages/signature/doc.md (1 hunks)
  • src/packages/signature/doc.taro.md (1 hunks)
  • src/packages/signature/doc.zh-TW.md (1 hunks)
  • src/packages/signature/signature.taro.tsx (6 hunks)
  • src/packages/signature/signature.tsx (6 hunks)
Additional Context Used
Markdownlint (8)
src/packages/signature/doc.en-US.md (2)

61: null
Files should end with a single newline character


53: null
Link fragments should be valid

src/packages/signature/doc.md (2)

61: null
Files should end with a single newline character


53: null
Link fragments should be valid

src/packages/signature/doc.taro.md (2)

63: Expected: 1; Actual: 2
Multiple consecutive blank lines


53: null
Link fragments should be valid

src/packages/signature/doc.zh-TW.md (2)

61: null
Files should end with a single newline character


53: null
Link fragments should be valid

Biome (27)
src/packages/signature/__test__/signature.spec.tsx (1)

21-21: Unexpected any. Specify a different type.

src/packages/signature/demos/h5/demo1.tsx (1)

31-31: Unexpected any. Specify a different type.

src/packages/signature/demos/taro/demo1.tsx (1)

18-18: Unexpected any. Specify a different type.

src/packages/signature/signature.taro.tsx (12)

55-55: Do not use template literals if interpolation and special-character handling are not needed.


64-64: Unexpected any. Specify a different type.


73-73: Unexpected any. Specify a different type.


91-91: Unexpected any. Specify a different type.


99-99: Change to an optional chain.


104-104: Change to an optional chain.


119-119: Change to an optional chain.


128-128: Unexpected any. Specify a different type.


1-8: Some named imports are only used as types.


8-15: Some named imports are only used as types.


15-16: Some named imports are only used as types.


191-191: This hook does not specify all of its dependencies: initCanvas

src/packages/signature/signature.tsx (12)

54-54: Do not use template literals if interpolation and special-character handling are not needed.


62-62: Change to an optional chain.


85-85: Unexpected any. Specify a different type.


104-104: Unexpected any. Specify a different type.


118-118: Unexpected any. Specify a different type.


125-125: Unexpected any. Specify a different type.


139-139: Change to an optional chain.


145-145: Change to an optional chain.


158-158: Change to an optional chain.


1-8: Some named imports are only used as types.


9-10: Some named imports are only used as types.


72-72: This hook does not specify all of its dependencies: checkCanvas

GitHub Check Runs (1)
codecov/patch failure (2)

src/packages/signature/signature.tsx: [warning] 87-87: src/packages/signature/signature.tsx#L87
Added line #L87 was not covered by tests


src/packages/signature/signature.tsx: [warning] 158-158: src/packages/signature/signature.tsx#L158
Added line #L158 was not covered by tests

Additional comments not posted (14)
src/packages/signature/demos/taro/demo1.tsx (1)

5-10: 确认函数的修改符合PR的目标,增加了对签名状态的处理,逻辑清晰。

src/packages/signature/doc.taro.md (1)

41-41: 文档更新正确地反映了 onConfirm 属性中新增的 isSigned 可选参数。

src/packages/signature/doc.md (1)

41-41: 文档更新正确地反映了 onConfirm 属性中新增的 isSigned 可选参数。

src/packages/signature/doc.zh-TW.md (1)

41-41: 文檔更新正確地反映了 onConfirm 属性中新增的 isSigned 可選參數。

src/packages/signature/demos/h5/demo1.tsx (1)

5-14: 确认函数的修改符合PR的目标,增加了对签名状态的处理,逻辑清晰。

src/packages/signature/doc.en-US.md (1)

41-41: The documentation update correctly reflects the addition of the isSigned optional parameter in the onConfirm property.

src/packages/signature/__test__/signature.spec.tsx (1)

7-7: 引入了 Button 组件,确保已经在项目中安装了此依赖。

Verification successful

引入了 Button 组件,确保已经在项目中安装了此依赖。根据验证结果,Button 组件确实存在于项目中。

  • src/packages/button/
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the Button component is installed in the project.

# Test: Search for the Button component in the node_modules directory.
fd --type f --name 'button' node_modules/@/packages/button

Length of output: 309



Script:

#!/bin/bash
# Description: Verify if the Button component is installed in the project.

# Test: Search for the Button component in the node_modules directory.
fd button node_modules/@/packages/button

Length of output: 160



Script:

#!/bin/bash
# Description: Verify if the Button component is installed in the project.

# Test: Search for the Button component in the entire node_modules directory.
fd button node_modules

Length of output: 124



Script:

#!/bin/bash
# Description: Verify if the Button component is installed in the project.

# Test: Search for the Button component in the entire repository.
fd button

Length of output: 349

src/packages/signature/signature.tsx (3)

20-24: 更新了 onConfirm 回调函数的签名,添加了 isSigned 参数。请确保文档和所有相关调用都已更新。


65-65: 添加了 isSignedRef 用于跟踪签名状态。这是一个合理的使用 useRef 的场景,因为它不需要触发重新渲染。


158-158: onConfirm 回调现在包括签名状态。请确保所有相关的单元测试都已更新以反映这一变化。

Verification successful

onConfirm 回调现在包括签名状态。经过验证,相关的单元测试已经更新以反映这一变化,confirm 函数确实处理了新的签名状态。

  • confirm 函数定义在 src/packages/signature/__test__/signature.spec.tsx 文件中,并且包含 isSigned 参数。
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the `onConfirm` callback is tested in any context.

# Test: Search for the `onConfirm` keyword in JavaScript/TypeScript test files.
rg --type js --type ts 'onConfirm' src/packages/signature/__test__/

Length of output: 148



Script:

#!/bin/bash
# Description: Extract test cases involving `onConfirm` to verify if they handle the new signature state.

# Extract the lines around the `onConfirm` reference to see the context of the test.
rg --type js --type ts -A 10 -B 10 'onConfirm={confirm}' src/packages/signature/__test__/signature.spec.tsx

Length of output: 222



Script:

#!/bin/bash
# Description: Extract test cases involving `onConfirm` to verify if they handle the new signature state.

# Extract the lines around the `onConfirm` reference to see the context of the test.
rg --type js --type ts -A 10 -B 10 'onConfirm=\{confirm\}' src/packages/signature/__test__/signature.spec.tsx

Length of output: 643



Script:

#!/bin/bash
# Description: Search for the `confirm` function definition and its usage in the test file to verify if it handles the new signature state.

# Search for the `confirm` function definition in the test file.
rg --type js --type ts 'function confirm' src/packages/signature/__test__/signature.spec.tsx

# Search for the `confirm` function usage in the test file.
rg --type js --type ts 'confirm(' src/packages/signature/__test__/signature.spec.tsx

Length of output: 248



Script:

#!/bin/bash
# Description: Search for the `confirm` function definition and its usage in the test file to verify if it handles the new signature state.

# Search for the `confirm` function definition in the test file.
rg --type js --type ts 'function confirm' src/packages/signature/__test__/signature.spec.tsx

# Search for the `confirm` function usage in the test file.
rg --type js --type ts 'confirm\(' src/packages/signature/__test__/signature.spec.tsx

Length of output: 242



Script:

#!/bin/bash
# Description: Search for the `confirm` function definition in the entire codebase to verify if it handles the new signature state.

# Search for the `confirm` function definition in the entire codebase.
rg --type js --type ts 'function confirm'

Length of output: 43



Script:

#!/bin/bash
# Description: Search for import statements in the test file to verify if `confirm` is imported from another module.

# Search for import statements in the test file.
rg --type js --type ts 'import' src/packages/signature/__test__/signature.spec.tsx

Length of output: 315



Script:

#!/bin/bash
# Description: Search for the `confirm` function definition within the test file to verify if it handles the new signature state.

# Search for the `confirm` function definition within the test file.
rg --type js --type ts 'const confirm' src/packages/signature/__test__/signature.spec.tsx

Length of output: 113



Script:

#!/bin/bash
# Description: Extract the full definition of the `confirm` function within the test file to verify if it handles the new signature state.

# Extract the full definition of the `confirm` function within the test file.
rg --type js --type ts -A 10 'const confirm' src/packages/signature/__test__/signature.spec.tsx

Length of output: 373

src/packages/signature/signature.taro.tsx (4)

26-26: onConfirm 回调函数现在接受一个新的参数 isSigned,用于指示是否已签名。请确保所有相关调用都已更新。


62-62: 添加了 isSignedRef 用于跟踪签名状态。这是一个合理的使用 useRef 的场景,因为它不需要触发重新渲染。


94-94: 在 handleClearBtn 中重置 isSignedRef.current = false。建议添加测试以确保此逻辑的正确性。


119-119: onConfirm 回调现在包括签名状态。请确保所有相关的单元测试都已更新以反映这一变化。

Verification successful

onConfirm 回调的单元测试已更新以反映签名状态的变化。

  • confirm 函数在测试文件中定义,并记录了 isSigneddataurl,表明它处理了新的签名状态参数。
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the `onConfirm` callback is tested in any context.

# Test: Search for the `onConfirm` keyword in JavaScript/TypeScript test files.
rg --type js --type ts 'onConfirm' src/packages/signature/__test__/

Length of output: 148



Script:

#!/bin/bash
# Extract the test cases that involve the `onConfirm` callback to verify if they cover the new signature status parameter.

# Display the relevant lines around the `onConfirm` usage in the test file.
rg --type js --type ts --context 10 'onConfirm={confirm}' src/packages/signature/__test__/signature.spec.tsx

Length of output: 223



Script:

#!/bin/bash
# Extract the test cases that involve the `onConfirm` callback to verify if they cover the new signature status parameter.

# Display the relevant lines around the `onConfirm` usage in the test file.
rg --type js --type ts --context 10 'onConfirm=\{confirm\}' src/packages/signature/__test__/signature.spec.tsx

Length of output: 644



Script:

#!/bin/bash
# Search for the `confirm` function definition and its usage in the test file to verify if it handles the new signature status parameter.

# Search for the `confirm` function definition in the test file.
rg --type js --type ts 'function confirm' src/packages/signature/__test__/signature.spec.tsx

# Search for the `confirm` function usage in the test file.
rg --type js --type ts 'confirm(' src/packages/signature/__test__/signature.spec.tsx

Length of output: 248



Script:

#!/bin/bash
# Search for the `confirm` function definition and its usage in the test file to verify if it handles the new signature status parameter.

# Search for the `confirm` function definition in the test file.
rg --type js --type ts 'function confirm' src/packages/signature/__test__/signature.spec.tsx

# Search for the `confirm` function usage in the test file.
rg --type js --type ts 'confirm\(' src/packages/signature/__test__/signature.spec.tsx

Length of output: 242



Script:

#!/bin/bash
# Search for the `confirm` function definition in the entire codebase to verify if it handles the new signature status parameter.

# Search for the `confirm` function definition in the entire codebase.
rg --type js --type ts 'function confirm'

Length of output: 43



Script:

#!/bin/bash
# Search for the `confirm` keyword in the test file to find its definition or import statement.

# Search for the `confirm` keyword in the test file.
rg --type js --type ts 'confirm' src/packages/signature/__test__/signature.spec.tsx

Length of output: 243


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to full the review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 85.87%. Comparing base (532e2d4) to head (14d044b).
Report is 2 commits behind head on next.

Files Patch % Lines
src/packages/signature/signature.tsx 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2288      +/-   ##
==========================================
+ Coverage   85.79%   85.87%   +0.08%     
==========================================
  Files         217      217              
  Lines       22798    22810      +12     
  Branches     2485     2494       +9     
==========================================
+ Hits        19559    19588      +29     
+ Misses       3234     3217      -17     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range and nitpick comments (10)
src/packages/signature/demos/taro/demo1.tsx (1)

Line range hint 18-18: 避免使用 any 类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null)
src/packages/signature/doc.taro.md (2)

Line range hint 53-53: 修复无效的链接片段。

- 使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。
+ 使用方法请参考 [ConfigProvider 组件](../path/to/configprovider)。

Line range hint 63-63: 删除多余的空行。

-
src/packages/signature/doc.md (2)

Line range hint 53-53: 修复无效的链接片段。

- 使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。
+ 使用方法请参考 [ConfigProvider 组件](../path/to/configprovider)。

Line range hint 61-61: 确保文件以单个换行符结束。

+
src/packages/signature/doc.zh-TW.md (2)

Line range hint 53-53: 修復無效的鏈接片段。

- 使用方法請參考 [ConfigProvider 組件](#/zh-CN/component/configprovider)。
+ 使用方法請參考 [ConfigProvider 組件](../path/to/configprovider)。

Line range hint 61-61: 確保文件以單個換行符結束。

+
src/packages/signature/demos/h5/demo1.tsx (1)

Line range hint 31-31: 避免使用 any 类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null)
src/packages/signature/doc.en-US.md (2)

Line range hint 53-53: Fix invalid link fragments.

- Please refer to [ConfigProvider component](#/en-US/component/configprovider).
+ Please refer to [ConfigProvider component](../path/to/configprovider).

Line range hint 61-61: Ensure the file ends with a single newline character.

+

Comment on lines 20 to 24
onConfirm?: (
canvas: HTMLCanvasElement,
dataurl: string,
hasSigatured?: boolean
) => void
Copy link

Choose a reason for hiding this comment

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

代码逻辑正确,但请注意 hasSigatured 应该是 hasSignatured,这里可能是一个拼写错误。

- hasSigatured?: boolean
+ hasSignatured?: boolean

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.

Suggested change
onConfirm?: (
canvas: HTMLCanvasElement,
dataurl: string,
hasSigatured?: boolean
) => void
onConfirm?: (
canvas: HTMLCanvasElement,
dataurl: string,
hasSignatured?: boolean
) => void

@@ -58,6 +62,7 @@
return !!(elem.getContext && elem.getContext('2d'))
}
const [isCanvasSupported, setIsCanvasSupported] = useState(false)
const [hasSignatured, setSignatured] = useState(false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

不需要使用 state,使用 ref 。只需要有个可以存状态的地方,也不会涉及到组件更新。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Outside diff range and nitpick comments (10)
src/packages/signature/demos/taro/demo1.tsx (1)

Line range hint 18-18: 建议为signatureRef指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.taro.md (2)

Line range hint 63-63: 请删除连续的空行,以保持文档的整洁。

- 

Line range hint 53-53: 请修正无效的链接片段,确保所有链接都是可访问的。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](正确的链接地址)
src/packages/signature/doc.md (2)

Line range hint 61-61: 请确保文件以单个换行符结束。

+ 

Line range hint 53-53: 请修正无效的链接片段,确保所有链接都是可访问的。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](正确的链接地址)
src/packages/signature/doc.zh-TW.md (2)

Line range hint 61-61: 请确保文件以单个换行符结束。

+ 

Line range hint 53-53: 请修正无效的链接片段,确保所有链接都是可访问的。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](正确的链接地址)
src/packages/signature/demos/h5/demo1.tsx (1)

Line range hint 31-31: 建议为signatureRef指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.en-US.md (2)

Line range hint 61-61: Please ensure the file ends with a single newline character.

+ 

Line range hint 53-53: Please correct the invalid link fragments to ensure all links are accessible.

- [ConfigProvider component](#/en-US/component/configprovider)
+ [ConfigProvider component](correct link address)

onConfirm?: (
canvas: HTMLCanvasElement,
dataurl: string,
hasSignatured?: boolean
Copy link

Choose a reason for hiding this comment

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

修正拼写错误。

- hasSignatured?: boolean
+ hasSigned?: boolean

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.

Suggested change
hasSignatured?: boolean
hasSigned?: boolean

@@ -144,7 +155,7 @@
default:
dataurl = canvas.toDataURL('image/png')
}
onConfirm && onConfirm(canvas, dataurl as string)
onConfirm && onConfirm(canvas, dataurl as string, hasSignatured)
Copy link

Choose a reason for hiding this comment

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

修正变量名错误。

- hasSignatured
+ hasSigned

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.

Suggested change
onConfirm && onConfirm(canvas, dataurl as string, hasSignatured)
onConfirm && onConfirm(canvas, dataurl as string, hasSigned)

@@ -79,6 +84,7 @@

const startEventHandler = (event: any) => {
event.preventDefault()
signaturedRef.current = true
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

添加测试覆盖此逻辑。

src/packages/signature/__test__/signature.spec.tsx 文件中没有找到对 signaturedRef 的引用,建议在测试文件中添加相应的测试逻辑,以确保 signaturedRef.current = true 的代码路径被覆盖。

  • 请在测试文件中添加对 signaturedRef 的测试逻辑。
Analysis chain

添加测试覆盖此逻辑。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type python $'signaturedRef.current = true'

Length of output: 80



Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type tsx 'signaturedRef.current = true'

Length of output: 74



Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type ts 'signaturedRef.current = true'

Length of output: 190



Script:

#!/bin/bash
# Description: Verify if there are test files related to the signature component.

# Test: Search for test files that might be related to the signature component.
fd --type f --name '*signature*test*'

Length of output: 290



Script:

#!/bin/bash
# Description: Verify if there are test files related to the signature component.

# Test: Search for test files that might be related to the signature component.
fd 'signature' --type f

Length of output: 261



Script:

#!/bin/bash
# Description: Verify if the test file covers the logic when signature starts.

# Test: Search within the test file for references to `signaturedRef` or related logic.
rg 'signaturedRef' src/packages/signature/__test__/signature.spec.tsx

Length of output: 69


const startEventHandler = (event: any) => {
signaturedRef.current = true
Copy link

Choose a reason for hiding this comment

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

为此事件处理函数添加类型定义,以避免使用 any 类型。

- const startEventHandler = (event: any) => {
+ const startEventHandler = (event: TouchEvent) => {

Committable suggestion was skipped due low confidence.

@@ -111,7 +116,7 @@
fileType: type,
canvasId: `${canvasId}`,
success: (res) => {
onConfirm && onConfirm(res.tempFilePath)
onConfirm && onConfirm(res.tempFilePath, signaturedRef.current)
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

onConfirm 回调添加测试,确保其在保存成功时被正确调用。

src/packages/signature/__test__/signature.spec.tsx 文件中找到了 onConfirm 的测试用例,但没有明确验证其在保存成功时被调用的情况。建议在现有测试用例中添加对 onConfirm 回调在保存成功时被正确调用的验证。

  • 文件: src/packages/signature/__test__/signature.spec.tsx
  • 位置: onConfirm={(canvas: HTMLCanvasElement, data: string) =>

请在这些位置添加相应的测试逻辑。

Analysis chain

onConfirm 回调添加测试,确保其在保存成功时被正确调用。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the test covers the `onConfirm` callback when the save operation is successful.

# Test: Search for the test cases covering the successful save scenario.
rg --type python $'onConfirm && onConfirm(res.tempFilePath, signaturedRef.current)'

Length of output: 115



Script:

#!/bin/bash
# Description: Verify if the test covers the `onConfirm` callback when the save operation is successful.

# Test: Search for the test cases covering the successful save scenario in JavaScript/TypeScript files.
rg --type js,ts 'onConfirm && onConfirm(res.tempFilePath, signaturedRef.current)'

Length of output: 113



Script:

#!/bin/bash
# Description: Verify if the test covers the `onConfirm` callback when the save operation is successful.

# Test: Search for the test cases covering the successful save scenario in JavaScript/TypeScript files.
rg --type js --type ts 'onConfirm && onConfirm(res.tempFilePath, signaturedRef.current)'

Length of output: 90



Script:

#!/bin/bash
# Description: Verify if the `onConfirm` callback is tested in any context.

# Test: Search for the `onConfirm` keyword in JavaScript/TypeScript test files.
rg --type js --type ts 'onConfirm'

Length of output: 16609

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range and nitpick comments (12)
src/packages/signature/demos/taro/demo1.tsx (1)

Line range hint 18-18: 建议为 signatureRef 指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.taro.md (2)

Line range hint 63-63: 建议删除多余的空行,以保持文档的整洁。

-

Line range hint 53-53: 链接片段应指向有效部分,请检查并修正。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](#/zh-CN/component/configprovider) // Assuming this is the correct link
src/packages/signature/doc.md (2)

Line range hint 61-61: 文件应以换行符结束,请添加。

+

Line range hint 53-53: 链接片段应指向有效部分,请检查并修正。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](#/zh-CN/component/configprovider) // Assuming this is the correct link
src/packages/signature/doc.zh-TW.md (2)

Line range hint 61-61: 文件應以換行符結束,請添加。

+

Line range hint 53-53: 鏈接片段應指向有效部分,請檢查並修正。

- [ConfigProvider 組件](#/zh-CN/component/configprovider)
+ [ConfigProvider 組件](#/zh-CN/component/configprovider) // Assuming this is the correct link
src/packages/signature/demos/h5/demo1.tsx (1)

Line range hint 31-31: 建议为 signatureRef 指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.en-US.md (2)

Line range hint 61-61: The file should end with a newline character, please add one.

+

Line range hint 53-53: Link fragments should point to valid sections, please check and correct.

- [ConfigProvider component](#/en-US/component/configprovider)
+ [ConfigProvider component](#/en-US/component/configprovider) // Assuming this is the correct link
src/packages/signature/signature.tsx (1)

[!TIP]
Codebase Verification

onSave 函数中,根据 signaturedRef.current 的状态决定是否调用 onConfirm 回调的逻辑没有被测试覆盖。

  • onSave 函数在 src/packages/signature/signature.tsxsrc/packages/signature/signature.taro.tsx 中定义和使用。
  • 没有找到直接或间接测试 onSave 函数的测试用例。

建议增加相应的单元测试以确保其正确性。

Analysis chain

Line range hint 143-158: 在 onSave 函数中,根据 signaturedRef.current 的状态决定是否调用 onConfirm 回调。这是一个重要的逻辑点,建议增加相应的单元测试以确保其正确性。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the logic in `onSave` related to calling `onConfirm` based on `signaturedRef.current` is covered by tests.

# Test: Search for the test cases covering this logic.
rg --type ts 'onConfirm && onConfirm(canvas, dataurl as string, signaturedRef.current)' src/packages/signature/__test__/signature.spec.tsx

Length of output: 140



Script:

#!/bin/bash
# Description: Verify if the `onSave` function is covered by tests, focusing on the logic involving `signaturedRef.current`.

# Test: Search for the `onSave` function calls in the test files.
rg --type ts 'onSave' src/packages/signature/__test__/signature.spec.tsx

Length of output: 72



Script:

#!/bin/bash
# Description: Verify if the `onSave` function is defined and used within the codebase, focusing on its logic involving `signaturedRef.current`.

# Search for the `onSave` function definition in the codebase.
rg --type ts 'function onSave' src/packages/signature

# Search for the `onSave` function usage in the codebase.
rg --type ts 'onSave' src/packages/signature

Length of output: 401



Script:

#!/bin/bash
# Description: Verify if the components or functions using `onSave` are covered by tests, focusing on the logic involving `signaturedRef.current`.

# Search for test cases involving the components or functions that use `onSave`.
rg --type ts 'canvasRef.current as HTMLCanvasElement' src/packages/signature/__test__
rg --type ts 'onSave()' src/packages/signature/__test__

Length of output: 145

src/packages/signature/signature.taro.tsx (1)

[!TIP]
Codebase Verification

onSave 函数中的关键逻辑没有被充分测试。建议增加相应的单元测试以确保其正确性,特别是涉及 signaturedRef.current 状态的逻辑。

  • onSave 函数中,根据 signaturedRef.current 的状态决定是否调用 onConfirm 回调。这是一个重要的逻辑点,建议增加相应的单元测试以确保其正确性。
Analysis chain

Line range hint 103-119: 在 onSave 函数中,根据 signaturedRef.current 的状态决定是否调用 onConfirm 回调。这是一个重要的逻辑点,建议增加相应的单元测试以确保其正确性。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the logic in `onSave` related to calling `onConfirm` based on `signaturedRef.current` is covered by tests.

# Test: Search for the test cases covering this logic.
rg --type ts 'onConfirm && onConfirm(res.tempFilePath, signaturedRef.current)' src/packages/signature/__test__/signature.spec.tsx

Length of output: 131



Script:

#!/bin/bash
# Description: Verify if the `onSave` function is covered by tests.

# Test: Search for the `onSave` function in the test files.
rg --type ts 'onSave' src/packages/signature/__test__/

Length of output: 54



Script:

#!/bin/bash
# Description: Verify if the `signaturedRef` and `onConfirm` are covered by tests.

# Test: Search for `signaturedRef` in the test files.
rg --type ts 'signaturedRef' src/packages/signature/__test__/

# Test: Search for `onConfirm` in the test files.
rg --type ts 'onConfirm' src/packages/signature/__test__/

Length of output: 232



Script:

#!/bin/bash
# Description: Extract the relevant test case from `signature.spec.tsx` that mentions `onConfirm`.

# Extract: Print the lines around the mention of `onConfirm` to understand the context.
rg --type ts -A 10 -B 10 'onConfirm' src/packages/signature/__test__/signature.spec.tsx

Length of output: 614

@@ -58,6 +62,7 @@
return !!(elem.getContext && elem.getContext('2d'))
}
const [isCanvasSupported, setIsCanvasSupported] = useState(false)
const signaturedRef = useRef<boolean>(false)
Copy link

Choose a reason for hiding this comment

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

请考虑使用 useState 替换 useRef 来管理 signaturedRef 的状态,这样可以在状态更新时重新渲染组件。

@@ -124,6 +130,7 @@
}
}
const handleClearBtn = () => {
signaturedRef.current = false
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

清除按钮的处理函数 handleClearBtn 及其重置签名状态的逻辑没有在单元测试中直接覆盖。建议在测试文件中添加相关测试用例,以确保该逻辑的正确性。

  • 请在 src/packages/signature/__test__/signature.spec.tsx 文件中添加对 handleClearBtn 函数的测试。
  • 确保测试覆盖 signaturedRef.current = false 的逻辑。
Analysis chain

在清除按钮的处理函数中,正确地重置了签名状态。请确保这一逻辑被覆盖在单元测试中。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the logic related to resetting signature state in `handleClearBtn` is covered by tests.

# Test: Search for the test cases covering the reset logic.
rg --type ts 'signaturedRef.current = false' src/packages/signature/__test__/signature.spec.tsx

Length of output: 97



Script:

#!/bin/bash
# Description: Verify if the `handleClearBtn` function is covered by tests and if the signature state reset logic is indirectly tested.

# Test: Search for the `handleClearBtn` function in the test files.
rg --type ts 'handleClearBtn' src/packages/signature/__test__/signature.spec.tsx

# Test: Search for any tests related to clearing or resetting the signature state.
rg --type ts 'clear' src/packages/signature/__test__/signature.spec.tsx
rg --type ts 'reset' src/packages/signature/__test__/signature.spec.tsx

Length of output: 224



Script:

#!/bin/bash
# Description: Verify if the `handleClearBtn` function is defined and used in the main codebase and if there are any other related test files.

# Search for the definition of `handleClearBtn` in the main codebase.
rg --type ts 'function handleClearBtn' src/packages/signature/

# Search for the usage of `handleClearBtn` in the main codebase.
rg --type ts 'handleClearBtn' src/packages/signature/

# Search for any other test files that might cover the logic related to clearing or resetting the signature state.
fd --type f --name '*.spec.tsx' | xargs rg --type ts 'clear'
fd --type f --name '*.spec.tsx' | xargs rg --type ts 'reset'

Length of output: 21745

@@ -59,8 +59,10 @@ const InternalSignature: ForwardRefRenderFunction<
const [canvasWidth, setCanvasWidth] = useState(0)
const ctx = useRef<CanvasContext | null>(null)
const [disalbeScroll] = useState('true')
const signaturedRef = useRef<boolean>(false)
Copy link

Choose a reason for hiding this comment

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

建议使用 useState 而不是 useRef 来管理签名状态,这样可以在状态更新时触发组件的重新渲染。

@pull-request-size pull-request-size bot added size/L and removed size/M labels May 28, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Outside diff range and nitpick comments (10)
src/packages/signature/demos/taro/demo1.tsx (1)

Line range hint 18-18: 建议为 signatureRef 指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.taro.md (2)

Line range hint 63-63: 请删除连续的空行,以保持文档的格式一致性。

- 
-

Line range hint 53-53: 请确保链接片段有效,以避免导航错误。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](正确的链接)
src/packages/signature/doc.md (2)

Line range hint 61-61: 请在文件末尾添加一个新行,以符合常规的文件格式要求。

+ 

Line range hint 53-53: 请确保链接片段有效,以避免导航错误。

- [ConfigProvider 组件](#/zh-CN/component/configprovider)
+ [ConfigProvider 组件](正确的链接)
src/packages/signature/doc.zh-TW.md (2)

Line range hint 61-61: 請在文件末尾添加一個新行,以符合常規的文件格式要求。

+ 

Line range hint 53-53: 請確保鏈接片段有效,以避免導航錯誤。

- [ConfigProvider 組件](#/zh-CN/component/configprovider)
+ [ConfigProvider 組件](正確的鏈接)
src/packages/signature/demos/h5/demo1.tsx (1)

Line range hint 31-31: 建议为 signatureRef 指定更精确的类型,以增强类型安全性。

- const signatureRef = useRef<any>(null)
+ const signatureRef = useRef<SignatureRefType>(null) // Assuming SignatureRefType is the correct type
src/packages/signature/doc.en-US.md (2)

Line range hint 61-61: Please add a newline at the end of the file to comply with conventional file formatting requirements.

+ 

Line range hint 53-53: Please ensure the link fragment is valid to avoid navigation errors.

- [ConfigProvider component](#/en-US/component/configprovider)
+ [ConfigProvider component](correct link)

const clear = () => {
console.log('clear')
}
const signatureRef = React.useRef<any>(null)
Copy link

Choose a reason for hiding this comment

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

使用 any 类型可能导致类型安全问题。建议指定更具体的类型。

- const signatureRef = React.useRef<any>(null)
+ const signatureRef = React.useRef<HTMLCanvasElement | null>(null)

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.

Suggested change
const signatureRef = React.useRef<any>(null)
const signatureRef = React.useRef<HTMLCanvasElement | null>(null)

const confirm = (
canvas: HTMLCanvasElement,
dataurl: string,
isSigned?: boolean
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

confirm 函数现在接受一个新的可选参数 isSigned,用于指示是否已签名。请确保所有对此函数的调用都已更新以传递此参数。

以下是需要注意的代码位置:

  • src/packages/signature/__test__/signature.spec.tsx
  • src/packages/signature/demos/h5/demo1.tsx
  • src/packages/signature/demos/h5/demo2.tsx
  • src/packages/signature/demos/taro/demo1.tsx
  • src/packages/signature/demos/taro/demo2.tsx

请检查这些文件中的 confirm 函数调用,并确保它们包含新的 isSigned 参数。

Analysis chain

confirm 函数现在接受一个新的可选参数 isSigned,用于指示是否已签名。请确保所有对此函数的调用都已更新以传递此参数。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all function calls to `confirm` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type tsx $'confirm\(' src/packages/signature/demos/h5/

Length of output: 88



Script:

#!/bin/bash
# Description: Verify all function calls to `confirm` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg 'confirm\('

Length of output: 3489

@@ -124,6 +130,7 @@
}
}
const handleClearBtn = () => {
isSignedRef.current = false
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

handleClearBtn 中重置 isSignedRef.current = false 的逻辑没有直接在测试中覆盖。建议添加测试以确保此逻辑的正确性。

  • 在测试文件 src/packages/signature/__test__/signature.spec.tsx 中没有找到 handleClearBtnisSignedRef 的相关测试。
  • 仅发现与 clear 相关的少量代码片段,但未能确认其是否覆盖了重置逻辑。

请添加相应的测试用例来验证 handleClearBtn 中重置 isSignedRef.current = false 的逻辑。

Analysis chain

handleClearBtn 中重置 isSignedRef.current = false。建议添加测试以确保此逻辑的正确性。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the logic related to resetting signature state in `handleClearBtn` is covered by tests.

# Test: Search for the test cases covering the reset logic.
rg --type ts 'isSignedRef.current = false' src/packages/signature/__test__/signature.spec.tsx

Length of output: 95



Script:

#!/bin/bash
# Description: Verify if the logic related to resetting signature state in `handleClearBtn` is covered by tests.

# Step 1: Check if `handleClearBtn` is tested.
rg --type ts 'handleClearBtn' src/packages/signature/__test__/signature.spec.tsx

# Step 2: Check if `isSignedRef` is tested indirectly.
rg --type ts 'isSignedRef' src/packages/signature/__test__/signature.spec.tsx

# Step 3: Check if there are any tests related to the clear button functionality.
rg --type ts 'clear' src/packages/signature/__test__/signature.spec.tsx

Length of output: 367

@@ -79,6 +84,7 @@

const startEventHandler = (event: any) => {
event.preventDefault()
isSignedRef.current = true
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

startEventHandler 中设置 isSignedRef.current = true 的逻辑没有在单元测试中直接或间接覆盖。建议添加相关的单元测试来确保此逻辑被测试覆盖。

  • 文件: src/packages/signature/signature.tsx
  • 代码行: 87
Analysis chain

startEventHandler 中设置 isSignedRef.current = true。请确保此逻辑被单元测试覆盖。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type ts 'isSignedRef.current = true' src/packages/signature/__test__/signature.spec.tsx

Length of output: 94



Script:

#!/bin/bash
# Description: Verify if the startEventHandler function is covered by unit tests.

# Test: Search for references to startEventHandler in the test files.
rg --type ts 'startEventHandler' src/packages/signature/__test__/

Length of output: 65



Script:

#!/bin/bash
# Description: Verify if the component or module containing startEventHandler is covered by unit tests.

# Test: Search for references to the component or module name in the test files.
component_name="Signature" # Replace with the actual component or module name if different
rg --type ts "$component_name" src/packages/signature/__test__/

Length of output: 246



Script:

#!/bin/bash
# Description: Verify if the start event logic in the Signature component is covered by unit tests.

# Test: Search for event simulations or function calls related to starting the signature process in the test file.
rg --type ts 'start' src/packages/signature/__test__/signature.spec.tsx

Length of output: 71


const startEventHandler = (event: any) => {
isSignedRef.current = true
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

startEventHandler 中设置 isSignedRef.current = true 的逻辑没有在现有的单元测试中被覆盖。请添加相应的单元测试来确保此逻辑的正确性。

  • 文件: src/packages/signature/signature.taro.tsx
  • 代码行: 65
Analysis chain

startEventHandler 中设置 isSignedRef.current = true。请确保此逻辑被单元测试覆盖。

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type ts 'isSignedRef.current = true' src/packages/signature/__test__/signature.spec.tsx

Length of output: 94



Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering the start event handler.
rg --type ts 'startEventHandler' src/packages/signature/__test__/signature.spec.tsx

# Test: Search for the test cases covering isSignedRef.
rg --type ts 'isSignedRef' src/packages/signature/__test__/signature.spec.tsx

# Test: Search for the test cases covering isSignedRef.current.
rg --type ts 'isSignedRef.current' src/packages/signature/__test__/signature.spec.tsx

Length of output: 247



Script:

#!/bin/bash
# Description: Verify if the test covers the logic when signature starts.

# Test: Search for the test cases covering start event.
rg --type ts 'startEvent' src/packages/signature/__test__/signature.spec.tsx

# Test: Search for the test cases covering signature.
rg --type ts 'signature' src/packages/signature/__test__/signature.spec.tsx

# Test: Search for the test cases covering handler.
rg --type ts 'handler' src/packages/signature/__test__/signature.spec.tsx

Length of output: 586

@oasis-cloud oasis-cloud merged commit 9e39617 into jdf2e:next May 28, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signature签名怎么判断他有没有签名? 要判断签名必填
2 participants