修复清理vengine
This commit is contained in:
@@ -16,14 +16,14 @@ public class AcmenVmodelContext : TemplateContext
|
||||
_da = da;
|
||||
Vm = vm;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public IDataAccess _da { get; set; }
|
||||
|
||||
public Vmodel Vm { get; }
|
||||
|
||||
public string NsPrefix { get { return "Tnb"; } }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public string NsPrefix
|
||||
{ get { return "Tnb"; } }
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Globalization;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Tnb.Vengine;
|
||||
|
||||
@@ -115,9 +114,10 @@ public class CodeHelper
|
||||
float.TryParse(propDefine, out float f);
|
||||
return (int)f;
|
||||
}
|
||||
|
||||
public static int PropDefineToScale(string? propDefine)
|
||||
{
|
||||
float.TryParse(propDefine, out float f);
|
||||
return (int)(f * 10) % 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using JNPF.Common.Configuration;
|
||||
using Tnb.Core;
|
||||
|
||||
namespace Tnb.Vengine;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public class TemplateContext
|
||||
{
|
||||
#region 模板文件名,同时作为模板Key
|
||||
|
||||
public const string KeyAppService = "AppService";
|
||||
public const string KeyDto = "AppServiceDto";
|
||||
public const string KeyEntity = "EntityInfo";
|
||||
@@ -17,10 +17,11 @@ public class TemplateContext
|
||||
public const string KeyEntityPageVue = "EntityPageVue";
|
||||
public const string KeyTableForeigns = "TableForeigns";
|
||||
public const string KeyVmodel = "Vmodel";
|
||||
#endregion
|
||||
|
||||
#endregion 模板文件名,同时作为模板Key
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public TemplateContext(string moduleCode)
|
||||
{
|
||||
@@ -31,27 +32,32 @@ public class TemplateContext
|
||||
#endif
|
||||
ModuleCode = moduleCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public string BasePath { get; set; }
|
||||
|
||||
private string ModuleCode { get; }
|
||||
|
||||
private string ModulePath => Path.Combine(BasePath, $"{ModuleCode}.Acmen");
|
||||
private string UiProjPath => Path.Combine(BasePath, "ItMgrWeb");
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public string AppServicePath => Path.Combine(ModulePath, "AppServices");
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public string PagePath => Path.Combine(UiProjPath, "src", "views");
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
@@ -75,4 +81,4 @@ public enum eLambdaType
|
||||
Where,
|
||||
MemberBinding,
|
||||
OneToMany
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user