diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt
index d101e69..2653e4e 100644
--- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt
+++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt
@@ -201,6 +201,19 @@ $end
$end
+$if(replaceDto.OperBtnStyle == 2)
+
+$if(replaceDto.ShowBtnView)
+
+$end
+$if(replaceDto.ShowBtnEdit)
+
+$end
+$if(replaceDto.ShowBtnDelete)
+
+$end
+
+$else
$if(replaceDto.ShowBtnView)
$end
@@ -209,6 +222,7 @@ $if(replaceDto.ShowBtnEdit)
$end
$if(replaceDto.ShowBtnDelete)
+$end
$end
diff --git a/ZR.CodeGenerator/CodeGeneratorTool.cs b/ZR.CodeGenerator/CodeGeneratorTool.cs
index 1020638..3bf61f0 100644
--- a/ZR.CodeGenerator/CodeGeneratorTool.cs
+++ b/ZR.CodeGenerator/CodeGeneratorTool.cs
@@ -50,7 +50,8 @@ namespace ZR.CodeGenerator
ShowBtnView = dto.GenTable.Options.CheckedBtn.Any(f => f == 5),
ShowBtnTruncate = dto.GenTable.Options.CheckedBtn.Any(f => f == 6),
ShowBtnMultiDel = dto.GenTable.Options.CheckedBtn.Any(f => f == 7),
- ViewFileName = dto.GenTable.BusinessName.FirstUpperCase()
+ ViewFileName = dto.GenTable.BusinessName.FirstUpperCase(),
+ OperBtnStyle = dto.GenTable.Options.OperBtnStyle
};
var columns = dto.GenTable.Columns;
diff --git a/ZR.CodeGenerator/Model/ReplaceDto.cs b/ZR.CodeGenerator/Model/ReplaceDto.cs
index 6ea178f..e2f974e 100644
--- a/ZR.CodeGenerator/Model/ReplaceDto.cs
+++ b/ZR.CodeGenerator/Model/ReplaceDto.cs
@@ -69,5 +69,9 @@ namespace ZR.CodeGenerator.Model
/// vue页面文件名
///
public string ViewFileName { get; set; }
+ ///
+ /// 操作按钮样式
+ ///
+ public int OperBtnStyle { get; set; }
}
}
diff --git a/ZR.Model/System/Generate/GenTable.cs b/ZR.Model/System/Generate/GenTable.cs
index ec49963..6e3199e 100644
--- a/ZR.Model/System/Generate/GenTable.cs
+++ b/ZR.Model/System/Generate/GenTable.cs
@@ -105,7 +105,7 @@ namespace ZR.Model.System.Generate
public class Options
{
- public long ParentMenuId { get; set; } = 0;
+ public long ParentMenuId { get; set; }
public string SortType { get; set; } = "asc";
public string SortField { get; set; } = string.Empty;
public string TreeCode { get; set; } = string.Empty;
@@ -128,5 +128,9 @@ namespace ZR.Model.System.Generate
/// 自动生成菜单
///
public bool GenerateMenu { get; set; }
+ ///
+ /// 操作按钮样式
+ ///
+ public int OperBtnStyle { get; set; } = 1;
}
}