refactor: 抽取共享 getFullFormValues 表单读取工具
This commit is contained in:
1 parent
29116678aa
commit
aa2b6f35b0
7 files changed
+20
-8
No files matched your search
@@ -11,6 +11,7 @@ import type {
|
||||
TrustContent,
|
||||
} from "@personal-brand/api-client";
|
||||
import { createApiClient } from "../../lib/api.js";
|
||||
import { getFullFormValues } from "../../lib/form-values.js";
|
||||
import {
|
||||
applyBrandPreviewValues,
|
||||
applyPresentationValues,
|
||||
@@ -161,7 +162,7 @@ export function useBrandPreviewDraft({
|
||||
const handleValuesChange = (changed: PresentationValues, allValues: PresentationValues) => {
|
||||
onDirty();
|
||||
const synchronized: PresentationValues = {
|
||||
...(form.getFieldsValue(true) as PresentationValues),
|
||||
...getFullFormValues<PresentationValues>(form),
|
||||
...allValues,
|
||||
};
|
||||
for (const section of sections) {
|
||||
|
||||
Reference in new issue
Block a user