liwei 1 년 전
부모
커밋
41fa89e1f6
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/modules/editor/components/Viewport/Header/PreviewDesignModal.tsx
  2. 1 1
      src/pages/h5/share/Promotion.tsx

+ 1 - 1
src/modules/editor/components/Viewport/Header/PreviewDesignModal.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
 
     function getPageH() {
       const rootPage = controls.pageCtrl.rootPage;
-      const pageH = rootPage?.layout?.size[1] || Design_Page_Size[1];
+      const pageH = rootPage?.layout.size?.[1] || Design_Page_Size[1];
       return helper.designToNaturalSize(pageH, {
         adaptiveH: true,
       });

+ 1 - 1
src/pages/h5/share/Promotion.tsx

@@ -53,7 +53,7 @@ export default defineComponent(() => {
 
   function getPageH() {
     const rootPage = editor.controls.pageCtrl.rootPage;
-    const pageH = rootPage?.layout?.size[1] || Design_Page_Size[1];
+    const pageH = rootPage?.layout.size?.[1] || Design_Page_Size[1];
     return editor.helper.designToNaturalSize(pageH, {
       adaptiveH: true,
     });