element Missing catch in [bug report] form item validate

dohp0rv5  于 4个月前  发布在  其他
关注(0)|答案(5)|浏览(98)

Element UI version

2.14.1

OS/Browsers version

Mac OS

Vue version

2.6.12

https://github.com/ElemeFE/element/blob/dev/packages/form/src/form-item.vue#L217

Steps to reproduce

打开代码:https://github.com/ElemeFE/element/blob/dev/packages/form/src/form-item.vue#L217
validate 缺少 catch,如果 callback 中出错,会导致状态 state 一直都是 validating。

What is Expected?

增加 catch

What is actually happening?

暂无

g9icjywg

g9icjywg1#

Translation of this issue:

Element UI version

2.14.1

OS/Browsers version

Mac OS

Vue version

2.6.12

https://github.com/ElemeFE/element/blob/dev/packages/form/src/form-item.vue#L217

Steps to reproduce

Open code: https://github.com/ElemeFE/element/blob/dev/packages/form/src/form-item.vue#L217

There is no catch in validate. If there is an error in the callback, the state will always be validating.

What is Expected?

Add catch

What is actually happening?

Not yet

fzsnzjdm

fzsnzjdm2#

你自己再callback中写try catch 不就可以了吗

llmtgqce

llmtgqce3#

你试试,我记得应该不行??

btxsgosb

btxsgosb4#

按照 ant-design 文档提供的方法,应该是将 callback 放在 try catch 的 catch 中

pobjuy32

pobjuy325#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题