Browse Source

perf: 调整代码生成器基础信息顺序

xingyu 2 years ago
parent
commit
a9c7d87872

+ 25 - 25
yudao-ui-admin-vue3/src/views/infra/codegen/components/BasicInfoForm.vue

@@ -40,6 +40,21 @@ const rules = reactive({
   classComment: [required]
 })
 const schema = reactive<FormSchema[]>([
+  {
+    label: '上级菜单',
+    field: 'parentMenuId',
+    component: 'TreeSelect',
+    componentProps: {
+      data: menuOptions,
+      props: defaultProps,
+      checkStrictly: true,
+      nodeKey: 'id'
+    },
+    labelMessage: '分配到指定菜单下,例如 系统管理',
+    colProps: {
+      span: 24
+    }
+  },
   {
     label: '表名称',
     field: 'tableName',
@@ -64,6 +79,15 @@ const schema = reactive<FormSchema[]>([
       span: 12
     }
   },
+  {
+    label: '类名称',
+    field: 'className',
+    component: 'Input',
+    labelMessage: '类名称(首字母大写),例如SysUser、SysMenu、SysDictData 等等',
+    colProps: {
+      span: 12
+    }
+  },
   {
     label: '生成模板',
     field: 'templateType',
@@ -104,15 +128,6 @@ const schema = reactive<FormSchema[]>([
       span: 12
     }
   },
-  {
-    label: '类名称',
-    field: 'className',
-    component: 'Input',
-    labelMessage: '类名称(首字母大写),例如SysUser、SysMenu、SysDictData 等等',
-    colProps: {
-      span: 12
-    }
-  },
   {
     label: '类描述',
     field: 'classComment',
@@ -122,21 +137,6 @@ const schema = reactive<FormSchema[]>([
       span: 12
     }
   },
-  {
-    label: '上级菜单',
-    field: 'parentMenuId',
-    component: 'TreeSelect',
-    componentProps: {
-      data: menuOptions,
-      props: defaultProps,
-      checkStrictly: true,
-      nodeKey: 'id'
-    },
-    labelMessage: '分配到指定菜单下,例如 系统管理',
-    colProps: {
-      span: 12
-    }
-  },
   {
     label: '作者',
     field: 'author',
@@ -154,7 +154,7 @@ const schema = reactive<FormSchema[]>([
       rows: 4
     },
     colProps: {
-      span: 12
+      span: 24
     }
   }
 ])