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

[Bug 上报] wd-signature 签名组件, SignatureExpose 定义错误 #867

Closed
xiaobu-zefa opened this issue Jan 23, 2025 · 1 comment
Closed
Assignees
Labels
🐞bug: need confirm 待确认的bug

Comments

@xiaobu-zefa
Copy link

Wot Design Uni 版本号

1.6.1

平台

微信小程序

复现Demo地址(如不提供,将被直接关闭)

--

重现步骤

export type SignatureExpose = {
  /** 点击清除按钮清除签名 */
  clear: () => void
  /** 点击确定按钮 */
  confirm: (result: SignatureResult) => void
}

点击确定按钮的定义错误:

实际上的实现是:

defineExpose<SignatureExpose>({
  clear,
  confirm: confirmSignature
})

// 确认签名
const confirmSignature = () => {
  canvasToImage()
}

并没有参数: result: SignatureResult

不影响使用, 但是编辑器会报红

期望的结果是什么?

export type SignatureExpose = {
  /** 点击清除按钮清除签名 */
  clear: () => void
  /** 点击确定按钮 */
  confirm: () => void
}

实际的结果是什么?

export type SignatureExpose = {
  /** 点击清除按钮清除签名 */
  clear: () => void
  /** 点击确定按钮 */
  confirm: (result: SignatureResult) => void
}

环境信息

No response

其他补充信息

No response

@xiaobu-zefa xiaobu-zefa added the 🐞bug: need confirm 待确认的bug label Jan 23, 2025
@810505339 810505339 self-assigned this Jan 24, 2025
@810505339
Copy link
Collaborator

Image
types传入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug: need confirm 待确认的bug
Projects
None yet
Development

No branches or pull requests

2 participants