Procházet zdrojové kódy

Merge branch 'devliwei2' of http://124.70.149.18:10880/lianghj/queenshow into devliwei2

liwei před 1 rokem
rodič
revize
c5db3a2d0f

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

@@ -32,7 +32,7 @@ export default defineUI({
         </Radio.Group> */}
         <div class="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2">
           <div class="text-16px font-bold text-light-50 max-w-240px truncate leading-normal">
-            {controls.pageCtrl.designData?.title}
+            {controls.pageCtrl.state.title}
           </div>
         </div>
         <aside class="space-x-12px">

+ 2 - 0
src/modules/editor/controllers/PageCtrl/index.ts

@@ -20,6 +20,7 @@ export class PageCtrl extends ModuleControl<EditorModule> {
         currStreamCardId: "",
         rootId: "",
         designId: "",
+        title: ''
     }, history)
 
     initEvent() {
@@ -89,6 +90,7 @@ export class PageCtrl extends ModuleControl<EditorModule> {
     setDesignData(data: Partial<DesignTemp>) {  
        history.enable = false;
        this.designData = new DesignTemp(data);
+       this.state.title = data.title || '';
         //设置组件父子关系
         const ite = (root:any)=> {
           const cards = root.children?.default || [];