qinyan 1 year ago
parent
commit
7010d28788

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

@@ -17,9 +17,10 @@ export default defineComponent({
   },
   },
   setup(props) {
   setup(props) {
     const editor = initEditor();
     const editor = initEditor();
-    const { helper, controls } = editor;
+    const { store, helper, controls } = editor;
     const page = controls.pageCtrl;
     const page = controls.pageCtrl;
-    
+    store.setMode("preview");
+
     controls.pageCtrl.setDesignData(cloneDeep(props.data));
     controls.pageCtrl.setDesignData(cloneDeep(props.data));
 
 
     const pageRef = ref();
     const pageRef = ref();