!2361 refactor(#I4SD6E): rename OnUpdate to OnUpdateAsync on Layout component

* chore: bump version to beta07
* refactor: OnUpdate 更改为  OnUpdateAsync
This commit is contained in:
Argo 2022-01-27 04:42:09 +00:00
parent dc84f9c3fe
commit fe2d87ee81
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>6.2.9-beta05</Version>
<Version>6.2.9-beta07</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -129,7 +129,7 @@ public partial class Layout : IAsyncDisposable
/// 获得/设置 更新回调方法 默认 null
/// </summary>
[Parameter]
public Func<string, Task>? OnUpdate { get; set; }
public Func<string, Task>? OnUpdateAsync { get; set; }
[Inject]
[NotNull]
@ -231,11 +231,11 @@ public partial class Layout : IAsyncDisposable
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public async Task Update(string key)
public async Task UpdateAsync(string key)
{
if (OnUpdate != null)
if (OnUpdateAsync != null)
{
await OnUpdate(key);
await OnUpdateAsync(key);
}
}