fix: 修复模板画布点选与保存切页回归
This commit is contained in:
1 parent
e6d843b4a7
commit
cd2992c00a
15 files changed
+98
-40
No files matched your search
@@ -98,6 +98,7 @@ interface BrandSaveMutationOptions extends BrandPresentationFormState {
|
||||
config: Record<string, unknown> | null | undefined;
|
||||
sections: TemplateAdminSection[];
|
||||
queryClient: QueryClient;
|
||||
onSaved: () => void;
|
||||
}
|
||||
|
||||
export function useBrandSaveMutation({
|
||||
@@ -105,6 +106,7 @@ export function useBrandSaveMutation({
|
||||
config,
|
||||
sections,
|
||||
queryClient,
|
||||
onSaved,
|
||||
}: BrandSaveMutationOptions) {
|
||||
return useMutation({
|
||||
mutationFn: (values: PresentationValues) => {
|
||||
@@ -125,6 +127,7 @@ export function useBrandSaveMutation({
|
||||
return createApiClient().updateAdminBrand({ ...changed, config: contentConfig });
|
||||
},
|
||||
onSuccess: () => {
|
||||
onSaved();
|
||||
message.success("页面内容已保存为草稿,发布后小程序才会更新");
|
||||
window.dispatchEvent(new Event("template-preview-refresh"));
|
||||
void queryClient.invalidateQueries({ queryKey: ["admin-brand"] });
|
||||
|
||||
Reference in new issue
Block a user