qinyan 1 年之前
父節點
當前提交
6cf9d1b243

+ 6 - 2
src/modules/editor/components/CompUI/defines/createAttrsForm.tsx

@@ -7,12 +7,16 @@ import { Size } from "../formItems/Size";
 import Slider from "../formItems/Slider";
 import { createColorOpts } from "./formOpts/createColorOpts";
 import { Divider } from "ant-design-vue";
+import { GroupNumber } from "../formItems/GroupNumber";
 
 export const layoutColumns: ColumnItem[] = [
   {
-    // label: "尺寸",
+    label: "尺寸",
     dataIndex: "layout.size",
-    component: Size,
+    component: GroupNumber,
+    props: {
+      labels: ["宽度", "高度"],
+    },
   },
   // {
   //   label: "对齐",

+ 0 - 1
src/modules/editor/module/actions/edit.tsx

@@ -620,7 +620,6 @@ export const editActions = EditorModule.action({
   },
   // 组件重命名
   async resetCompName(comp: DesignComp) {
-    console.log("comp.title: ", comp);
     const res = await queenApi.showInput({
       title: "重命名",
       defaultValue: comp.title,

+ 3 - 0
src/modules/editor/objects/Toolbars/default.ts

@@ -92,6 +92,9 @@ export const toolbars = createToolbars({
   // 重命名
   rename: {
     component: TipIcons.Rename,
+    getVisible(comp) {
+      return comp.compKey == "Text" ? false : true;
+    },
     onClick(comp) {
       this.actions.resetCompName(comp);
     },