Element UI version
2.14.1
OS/Browsers version
Mac OS
Vue version
2.6.12
Reproduction Link
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?
暂无
5条答案
按热度按时间g9icjywg1#
Translation of this issue:
Element UI version
2.14.1
OS/Browsers version
Mac OS
Vue version
2.6.12
Reproduction Link
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
fzsnzjdm2#
你自己再callback中写try catch 不就可以了吗
llmtgqce3#
你试试,我记得应该不行??
btxsgosb4#
按照 ant-design 文档提供的方法,应该是将 callback 放在 try catch 的 catch 中
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.