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,
     });