修复清理vengine

This commit is contained in:
2023-09-19 10:55:14 +08:00
parent b9e9636d72
commit 0bf34fa215
31 changed files with 289 additions and 252 deletions

View File

@@ -15,6 +15,7 @@ namespace Tnb.Vengine.Domain;
public class VmDbProp : VmBaseProp
{
#region Properties
/// <summary>
/// 字段名称
/// </summary>
@@ -70,7 +71,8 @@ public class VmDbProp : VmBaseProp
/// 描述
/// </summary>
public string? descrip { get; set; }
#endregion
#endregion Properties
/// <summary>
/// 获取默认值
@@ -79,7 +81,7 @@ public class VmDbProp : VmBaseProp
public object? GetDefaultValue()
{
object? val = null;
if(!required) { return val; }
if (!required) { return val; }
if (string.IsNullOrEmpty(defValue))
{
val = csType switch
@@ -168,11 +170,13 @@ public class VmDbProp : VmBaseProp
comp.attr.Add("maxlength", length);
comp.attr.Add("showWordLimit", true);
break;
case "int":
case "short":
case "long":
comp.type = "el-input-number";
break;
case "DateTime":
comp.type = "el-date-picker";
break;
@@ -205,6 +209,5 @@ public class VmDbProp : VmBaseProp
//if(isJson) sb.Add("IsJson = true")
if (sb.Any()) attr += $"\t[SugarColumn({sb.JoinAsString(", ")})]{Environment.NewLine}";
return attr;
}
}