Improve WeChat MP replies and ship MindSpace/H5 production updates.
Add WeChat service account routing with sync acks, connectivity tests, and context isolation; document deploy runbooks; and bundle related MindSpace, voice, Plaza, and server gateway changes for production rollout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,6 +15,7 @@ export function MindSpacePageEditablePreviewFrame({
|
||||
compact = false,
|
||||
fillViewport = false,
|
||||
showHint = true,
|
||||
onFrameReady,
|
||||
onContentChange,
|
||||
}: {
|
||||
title: string;
|
||||
@@ -26,6 +27,7 @@ export function MindSpacePageEditablePreviewFrame({
|
||||
compact?: boolean;
|
||||
fillViewport?: boolean;
|
||||
showHint?: boolean;
|
||||
onFrameReady?: (iframe: HTMLIFrameElement | null) => void;
|
||||
onContentChange: (html: string) => void;
|
||||
}) {
|
||||
const scrollInsideFrame = compact || fillViewport;
|
||||
@@ -99,6 +101,13 @@ export function MindSpacePageEditablePreviewFrame({
|
||||
};
|
||||
}, [maxHeight, minHeight, scrollInsideFrame, srcdoc]);
|
||||
|
||||
useEffect(() => {
|
||||
onFrameReady?.(iframeRef.current);
|
||||
return () => {
|
||||
onFrameReady?.(null);
|
||||
};
|
||||
}, [onFrameReady, reloadKey, srcdoc, minHeight, maxHeight, scrollInsideFrame, compact, fillViewport]);
|
||||
|
||||
if (previewFailed) {
|
||||
return <div className="mindspace-state mindspace-error">页面预览加载失败</div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user