代码生成预览新增加vue版本判断

This commit is contained in:
不做码农
2022-04-27 11:33:55 +08:00
parent 07d206f6ff
commit 58bee3074b
6 changed files with 627 additions and 45 deletions

View File

@@ -221,13 +221,15 @@ namespace ZR.Admin.WebApi.Controllers
/// 预览代码
/// </summary>
/// <param name="tableId"></param>
/// <param name="VueVersion"></param>
/// <returns></returns>
[HttpPost("preview/{tableId}")]
[ActionPermissionFilter(Permission = "tool:gen:preview")]
public IActionResult Preview(long tableId = 0)
public IActionResult Preview(long tableId = 0, int VueVersion = 0)
{
GenerateDto dto = new();
dto.TableId = tableId;
dto.VueVersion = VueVersion;
if (dto == null || dto.TableId <= 0)
{
throw new CustomException(ResultCode.CUSTOM_ERROR, "请求参数为空");