refactor: 抽取共享 getFullFormValues 表单读取工具
This commit is contained in:
1 parent
29116678aa
commit
aa2b6f35b0
7 files changed
+20
-8
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import type { FormInstance } from "antd";
|
||||
|
||||
// 动态隐藏的字段会被 Ant Design Form 卸载,onFinish 默认只返回仍挂载的字段。
|
||||
// 提交时读取完整表单存储,避免切换区块后隐藏字段的修改丢失。
|
||||
export function getFullFormValues<T = Record<string, unknown>>(form: FormInstance): T {
|
||||
return form.getFieldsValue(true) as T;
|
||||
}
|
||||
Reference in new issue
Block a user