瀏覽代碼

同步预览数据

qinyan 1 年之前
父節點
當前提交
0d7e60cf7f
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/modules/editor/components/Viewport/Header/index.tsx

+ 6 - 0
src/modules/editor/components/Viewport/Header/index.tsx

@@ -12,6 +12,12 @@ export default defineUI({
     const { store, actions, controls, jumpIndexHtml } = editor;
 
     function showPreviewModal() {
+      controls.screenCtrl.saveScreenPage();
+      const rootPage = controls.pageCtrl.rootPage;
+      rootPage.value.pageMode = controls.screenCtrl.state.screen.pageMode;
+      rootPage.value.pageSizeType =
+        controls.screenCtrl.state.screen.pageSizeType;
+
       queenApi.dialog(
         <PreviewDesignModal data={controls.pageCtrl.designData} />,
         {