前端代码生成路径增加配置

This commit is contained in:
不做码农 2022-05-26 13:32:55 +08:00
parent e317fabe7a
commit e985633d53
2 changed files with 8 additions and 3 deletions

View File

@ -34,8 +34,9 @@
"conn": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;user=zr;pwd=abc;database=ZrAdmin;Trusted_Connection=SSPI",
"dbType": 1, //MySql = 0, SqlServer = 1
"autoPre": true, //
"author": "zr",
"tablePrefix": "sys_" //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"author": "admin",
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"vuePath": "" //egD:\Work\ZRAdmin-Vue3
},
//
"MailOptions": {

View File

@ -38,8 +38,12 @@ namespace ZR.CodeGenerator
_option.ServicesNamespace = _option.BaseNamespace + "Service";
_option.ApiControllerNamespace = _option.BaseNamespace + "Admin.WebApi";
var vuePath = AppSettings.GetConfig("gen:vuePath");
dto.VueParentPath = dto.VueVersion == 3 ? "ZRAdmin-vue" : "ZR.Vue";
if (!vuePath.IsEmpty())
{
dto.VueParentPath = vuePath;
}
dto.GenOptions = _option;
string PKName = "Id";