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

CRUD即时保存,接口保存失败后,无法重置组件编辑状态,resetOnFailed属性配置无效 #11455

Open
coderzmy01 opened this issue Jan 7, 2025 · 0 comments

Comments

@coderzmy01
Copy link

实现场景:

CRUD即时保存,希望在接口保存失败后,能够重置组件编辑状态,如官方的 https://aisuda.bce.baidu.com/amis/zh-CN/components/crud#%E5%8D%B3%E6%97%B6%E4%BF%9D%E5%AD%98 提供的实例一样;配置脚本{ "id": "u:e837fca181a2", "name": "status", "label": "开关", "title": "是否启用", "quickEdit": { "id": "u:ac8e7c2747ff", "mode": "inline", "type": "switch", "trueValue": "A", "falseValue": "F", "resetOnFailed": true, "saveImmediately": true, "name": "status", "onEvent": {} }, "placeholder": "-" }

存在的问题:

使用时报错
image

当前方案:

定位是源码中的 options?.resetOnFailed && this.control.reset();

code here...
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

1 participant