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

[form] FormInstanceFunctions reset方法报错 #856

Closed
RionZZZ opened this issue May 23, 2022 · 8 comments
Closed

[form] FormInstanceFunctions reset方法报错 #856

RionZZZ opened this issue May 23, 2022 · 8 comments
Assignees
Labels
to be published to be published

Comments

@RionZZZ
Copy link

RionZZZ commented May 23, 2022

tdesign-vue-next 版本

0.15.0

重现链接

No response

重现步骤

ref="form"
···
const form = ref()
···
form.value.reset()

报错:
form.tsx:91 Uncaught (in promise) TypeError: e.preventDefault is not a function
at Proxy.reset2 (form.tsx:91:12)

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @RionZZZ,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

♥️ 有劳 @LeeJim @PengYYYYY 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @RionZZZ

@k1nz
Copy link
Contributor

k1nz commented May 23, 2022

https://stackblitz.com/edit/angular-um4vtq?file=src%2Fdemo.vue

似乎没有问题呢,可以提供一下 demo

@skytt
Copy link
Contributor

skytt commented May 24, 2022

https://stackblitz.com/edit/angular-um4vtq?file=src%2Fdemo.vue

似乎没有问题呢,可以提供一下 demo

这个demo,把组件reset事件的响应给去掉,会报错,辛苦看看...
image
image

@PengYYYYY
Copy link
Collaborator

发了一个 0.15.1-alpha.1 的包,可以先用一下

@PengYYYYY PengYYYYY mentioned this issue May 24, 2022
15 tasks
@PengYYYYY PengYYYYY added the to be published to be published label May 24, 2022
@RionZZZ
Copy link
Author

RionZZZ commented May 24, 2022

https://stackblitz.com/edit/angular-um4vtq?file=src%2Fdemo.vue

似乎没有问题呢,可以提供一下 demo

对 就是上面说的原因。一定要加@reset方法,但是我既然已经用了instance方法,为啥还要加@reset

@PengYYYYY
Copy link
Collaborator

https://stackblitz.com/edit/angular-um4vtq?file=src%2Fdemo.vue
似乎没有问题呢,可以提供一下 demo

对 就是上面说的原因。一定要加@reset方法,但是我既然已经用了instance方法,为啥还要加@reset

0.15.1-alpha.1 用这个包试试

@PengYYYYY
Copy link
Collaborator

0.15.2 已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published to be published
Projects
None yet
Development

No branches or pull requests

5 participants