Skip to content

Commit a1bafad

Browse files
authored
release v2.3.8
release v2.3.8
2 parents 600b6ba + 2e7df0c commit a1bafad

12 files changed

Lines changed: 432 additions & 367 deletions

File tree

demo/WalkingTec.Mvvm.Demo/Views/Home/FrontPage.cshtml

Lines changed: 201 additions & 180 deletions
Large diffs are not rendered by default.

demo/WalkingTec.Mvvm.Demo/Views/Home/Layout.cshtml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
</li>
3636
<li class="layui-nav-item" lay-unselect>
3737
<a href="javascript:;">
38+
@if(Model.LoginUserInfo?.PhotoId != null)
39+
{
40+
<img class="layui-nav-img" src="api/_file/getfile/@Model.LoginUserInfo.PhotoId" />
41+
}
3842
<cite>@Model.LoginUserInfo.Name</cite>
3943
</a>
4044
<dl class="layui-nav-child">

doc/WalkingTec.Mvvm.Doc/Views/VM/ListAction.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ protected override List<GridAction> InitGridAction()
9393
</tr>
9494
<tr>
9595
<td>GridActionParameterTypesEnum.MultiIds</td>
96-
<td>按钮会获取勾选的多行数据的id调用新方法,比如批量修改,批量删除</td>
96+
<td>按钮会获取勾选的多行数据的id调用新方法,比如批量修改,批量删除(注意MultiIds的时候框架会使用标记为[Post]的方法)</td>
9797
</tr>
9898
<tr>
9999
<td>GridActionParameterTypesEnum.SingleIdWithNull</td>
100100
<td>可以勾选一行,也可以不选</td>
101101
</tr>
102102
<tr>
103103
<td>GridActionParameterTypesEnum.MultiIdWithNull</td>
104-
<td>可以勾选多行,也可以不选</td>
104+
<td>可以勾选多行,也可以不选(注意MultiIds的时候框架会使用标记为[Post]的方法)</td>
105105
</tr>
106106
<tr>
107107
<td>GridActionParameterTypesEnum.AddRow</td>

src/WalkingTec.Mvvm.Core/BaseCRUDVM.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ protected virtual TModel GetById(object Id)
160160
}
161161

162162
//获取数据
163-
rv = query.CheckID(Id).SingleOrDefault();
163+
rv = query.CheckID(Id).AsNoTracking().SingleOrDefault();
164164
if (rv == null)
165165
{
166166
throw new Exception("数据不存在");

src/WalkingTec.Mvvm.Core/Utils.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,23 @@ public static List<Assembly> GetAllAssembly()
3636
var dir = new DirectoryInfo(Path.GetDirectoryName(path));
3737

3838
var dlls = dir.GetFiles("*.dll", SearchOption.AllDirectories);
39-
39+
string[] systemdll = new string[]
40+
{
41+
"Microsoft.",
42+
"System.",
43+
"Swashbuckle.",
44+
"ICSharpCode",
45+
"Newtonsoft.",
46+
"Oracle.",
47+
"Pomelo.",
48+
"SQLitePCLRaw."
49+
};
50+
4051
foreach (var dll in dlls)
4152
{
4253
try
4354
{
44-
if (dll.Name.StartsWith("Microsoft.") == false)
55+
if (systemdll.Any(x => dll.Name.StartsWith(x)) == false)
4556
{
4657
rv.Add(AssemblyLoadContext.Default.LoadFromAssemblyPath(dll.FullName));
4758
}

src/WalkingTec.Mvvm.Mvc/BaseApiController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ private void SetReInit(ModelStateDictionary msd, BaseVM model)
350350
#endregion
351351

352352
#region Validate model
353+
[NonAction]
353354
public Dictionary<string, string> RedoValidation(object item)
354355
{
355356
Dictionary<string, string> rv = new Dictionary<string, string>();

src/WalkingTec.Mvvm.Mvc/BaseController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ private void SetReInit(ModelStateDictionary msd, BaseVM model)
535535
#endregion
536536

537537
#region Validate model
538+
[NonAction]
538539
public Dictionary<string,string> RedoValidation(object item)
539540
{
540541
Dictionary<string, string> rv = new Dictionary<string, string>();
@@ -559,6 +560,7 @@ public Dictionary<string,string> RedoValidation(object item)
559560
/// <param name="vm">ViewModel</param>
560561
/// <param name="prefix">prefix</param>
561562
/// <returns>true if success</returns>
563+
[NonAction]
562564
public bool RedoUpdateModel(object vm, string prefix = null)
563565
{
564566
try

src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public static IServiceCollection AddFrameworkService(this IServiceCollection ser
5959
var binPath = new FileInfo(binLocation).Directory?.FullName;
6060
if (File.Exists(Path.Combine(binPath, "appsettings.json")))
6161
{
62+
Directory.SetCurrentDirectory(binPath);
6263
configBuilder.SetBasePath(binPath)
6364
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
6465
.AddEnvironmentVariables();

src/WalkingTec.Mvvm.Mvc/Helper/IconFontsHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static List<ComboSelectListItem> IconFontItems
2424

2525
public static void GenerateIconFont()
2626
{
27-
var baseDirs = new string[] { "/wwwroot/font", "/wwwroot/layui" };
27+
var baseDirs = new string[] { "wwwroot/font", "wwwroot/layui" };
2828

2929
var iconFontHashSet = new HashSet<string>();
3030
var IconFontDic = new Dictionary<string, string[]>();

0 commit comments

Comments
 (0)