diff --git a/ZR.Admin.WebApi/appsettings.json b/ZR.Admin.WebApi/appsettings.json index d9f765b1..d4c987ba 100644 --- a/ZR.Admin.WebApi/appsettings.json +++ b/ZR.Admin.WebApi/appsettings.json @@ -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": "" //前端代码存储路径eg:D:\Work\ZRAdmin-Vue3 }, //邮箱配置信息 "MailOptions": { diff --git a/ZR.CodeGenerator/CodeGeneratorTool.cs b/ZR.CodeGenerator/CodeGeneratorTool.cs index 11989046..f65de042 100644 --- a/ZR.CodeGenerator/CodeGeneratorTool.cs +++ b/ZR.CodeGenerator/CodeGeneratorTool.cs @@ -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";