Przeglądaj źródła

生成实体时,实体名称默认转换大驼峰名称

jjwsoft 2 lat temu
rodzic
commit
578febe5df

+ 2 - 1
Web/src/views/system/database/component/genEntity.vue

@@ -48,7 +48,7 @@
 
 
 <script lang="ts" setup name="sysGenEntity">
 <script lang="ts" setup name="sysGenEntity">
 import { onMounted, reactive, ref } from 'vue';
 import { onMounted, reactive, ref } from 'vue';
-
+import { camelCase, upperFirst } from 'lodash-es';
 import { getAPI } from '/@/utils/axios-utils';
 import { getAPI } from '/@/utils/axios-utils';
 import { SysDatabaseApi, SysDictTypeApi } from '/@/api-services/api';
 import { SysDatabaseApi, SysDictTypeApi } from '/@/api-services/api';
 
 
@@ -73,6 +73,7 @@ onMounted(async () => {
 const openDialog = (row: any) => {
 const openDialog = (row: any) => {
 	state.ruleForm.configId = row.configId;
 	state.ruleForm.configId = row.configId;
 	state.ruleForm.tableName = row.tableName;
 	state.ruleForm.tableName = row.tableName;
+	state.ruleForm.entityName = upperFirst(camelCase(row.tableName));
 	state.ruleForm.baseClassName = 'EntityBase';	
 	state.ruleForm.baseClassName = 'EntityBase';	
 	state.isShowDialog = true;
 	state.isShowDialog = true;
 };
 };