fix:代码生成,api.js 命令问题,导致vue导入失败。

This commit is contained in:
zhangcheng 2023-05-26 13:20:01 +08:00
parent c01922cac1
commit bbef33c90b
3 changed files with 11 additions and 4 deletions

View File

@ -191,7 +191,13 @@ public class GenUtils {
* @return 业务名 * @return 业务名
*/ */
public static String getBusinessName(String tableName) { public static String getBusinessName(String tableName) {
return StrUtil.toCamelCase(tableName); boolean autoRemovePre = genConfig.isAutoRemovePre();
String tablePrefix = genConfig.getTablePrefix();
if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) {
String[] searchList = StringUtils.split(tablePrefix, ",");
tableName = replaceFirst(tableName, searchList);
}
return StringUtils.convertToCamelCase(tableName);
} }
/** /**

View File

@ -1,5 +1,6 @@
package com.ruoyi.generator.util; package com.ruoyi.generator.util;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.constant.GenConstants; import com.ruoyi.common.constant.GenConstants;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
@ -163,7 +164,7 @@ public class VelocityUtils {
// 大写类名 // 大写类名
String className = genTable.getClassName(); String className = genTable.getClassName();
// 业务名称 // 业务名称
String businessName = genTable.getBusinessName(); String businessName = StrUtil.lowerFirst(genTable.getBusinessName());
String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/"); String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/");
String mybatisPath = MYBATIS_PATH + "/" + moduleName; String mybatisPath = MYBATIS_PATH + "/" + moduleName;

View File

@ -200,7 +200,7 @@
</template> </template>
</el-table-column> </el-table-column>
</WmsTable> </WmsTable>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -337,7 +337,7 @@
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)
<el-table-column label="$comment" prop="${javaField}"> <el-table-column label="$comment" prop="${javaField}">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.$javaField" placeholder="请输入$comment" /> <el-input v-model.trim="scope.row.$javaField" placeholder="请输入$comment" />
</template> </template>
</el-table-column> </el-table-column>
#end #end