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表单] onSubmit事件回调中的validateResult不是bool #2979

Closed
limengning opened this issue Dec 14, 2023 · 2 comments
Closed

[Form表单] onSubmit事件回调中的validateResult不是bool #2979

limengning opened this issue Dec 14, 2023 · 2 comments

Comments

@limengning
Copy link

tdesign-vue 版本

1.8.1

重现链接

No response

重现步骤

Form控件 @submit 事件回调,返回的validateResult不是bool,而是一个对象
image

期望结果

返回检验是否通过的bool

实际结果

返回检验结果的对象

框架版本

Vue(2.7.15)

浏览器版本

MS Edge(120.0.2210.61)

系统版本

Win11

Node版本

12

补充说明

No response

Copy link
Contributor

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

@chaishi
Copy link
Collaborator

chaishi commented Dec 14, 2023

是的,不是 bool 类型,符合预期。
大多数业务是需要明确告知用户具体哪里校验没通过,不能返回一个简单的 bool 类型,这将无法满足其他的业务场景。

@chaishi chaishi closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants