qinyan 1 년 전
부모
커밋
3f009aaf93
2개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 0
      src/modules/editor/components/CompUI/defines/createAttrsForm.tsx
  2. 7 5
      src/pages/editor/EditPage/index.tsx

+ 3 - 0
src/modules/editor/components/CompUI/defines/createAttrsForm.tsx

@@ -148,6 +148,9 @@ export const bdColumns: ColumnItem[] = [
     label: "边框颜色",
     dataIndex: "layout.border.color",
     ...createColorOpts(),
+    getValue(v) {
+      return v || "#000";
+    },
   },
   {
     label: "边框尺寸",

+ 7 - 5
src/pages/editor/EditPage/index.tsx

@@ -9,9 +9,15 @@ import { defineComponent } from "vue";
 export default defineComponent(() => {
   const editor = initEditor();
   const resource = useResource();
-  resource.controls.categoryCtrl.init();
   const auth = useAuth();
 
+  resource.controls.categoryCtrl.getUserCate().then(() => {
+    const categories = resource.controls.categoryCtrl.state.categories;
+    const list: any = categories.find((d: any) => d.type == "h5");
+    const res = list?.children.find((e: any) => e.name == "平台");
+    editor.store.setTplCategory(res?.children);
+  });
+
   const params = new URLSearchParams(location.hash.split("?")[1]);
   editor.actions.switchMode((params.get("mode") || "editPage") as EditorMode);
   const prodId = params.get("id");
@@ -24,10 +30,6 @@ export default defineComponent(() => {
         editor.actions.initWkDesign(prodId);
         return;
       }
-      const categories = resource.controls.categoryCtrl.state.categories;
-      const list: any = categories.find((d: any) => d.type == "h5");
-      const res = list?.children.find((e: any) => e.name == "平台");
-      editor.store.setTplCategory(res?.children);
       editor.actions.initDesign(prodId, isSys);
     } else {
       editor.jumpIndexHtml();