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

formRef.value?.validate 为啥 vxe-form 的校验这么奇怪,不会返回 true 或者 false,表单会正常显示错误,但是不会抛出任何错误,而是返回 formData 数据 #2731

Closed
2 tasks done
sishen654 opened this issue Jan 8, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@sishen654
Copy link

可复现的链接(必须为公开链接,仅包含能复现问题的示例代码):

https://stackblitz.com/edit/vitejs-vite-uzys3dgd?file=src%2FApp.vue

是否已准备好复现链接与示例代码?

  • 我确定已准备好以上复现链接

问题描述与截图:

image
image

期望的结果:

返回 true 或者 false,也可以直接返回 promise.reject

操作系统:

win10

浏览器版本:

最新

vue 版本:

3.3.13

vxe-pc-ui 版本:

4.2.15

vxe-table 版本:

4.7.85

是否使用当前最新版本?

  • 我确定已经更新到最新版本后依然存在该问题
@sishen654 sishen654 added the bug Something isn't working label Jan 8, 2025
@zkzgs
Copy link

zkzgs commented Jan 8, 2025

table就是这个样子,返回的是你校验不通过的数据,表单应该也一样
image

@sishen654
Copy link
Author

table就是这个样子,返回的是你校验不通过的数据,表单应该也一样 image

对,我测试了下,如果有报错会返回个对象,没有就是 undefined,文档一点提示没有,如果写过 antd 或者 element-ui 基本都得懵逼在这了

@xlz26296
Copy link
Contributor

xlz26296 commented Jan 8, 2025

这里文档

@sishen654
Copy link
Author

这里文档

感谢大佬指正🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants