refactor: 优化性能

This commit is contained in:
Argo Zhang 2020-02-05 14:34:12 +08:00
parent b22e097fe0
commit 35ae9a84d7
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
3 changed files with 11 additions and 6 deletions

View File

@ -77,11 +77,13 @@ namespace Bootstrap.Admin.Pages.Components
}
/// <summary>
/// OnParametersSet 方法
/// SetParametersAsync 方法
/// </summary>
protected override void OnParametersSet()
public override Task SetParametersAsync(ParameterView parameters)
{
parameters.SetParameterProperties(this);
if (string.IsNullOrEmpty(Id)) throw new InvalidOperationException("Modal Component Id property must be set");
return base.SetParametersAsync(ParameterView.Empty);
}
/// <summary>

View File

@ -98,16 +98,17 @@ namespace Bootstrap.Admin.Pages.Views.Admin.Components
}
/// <summary>
/// OnParametersSet 方法
/// SetParametersAsync 方法
/// </summary>
/// <returns></returns>
protected override void OnParametersSet()
public override System.Threading.Tasks.Task SetParametersAsync(ParameterView parameters)
{
base.OnParametersSet();
parameters.SetParameterProperties(this);
QueryModel.Category = "";
QueryModel.IsResource = -1;
QueryApp.AddRange(DictHelper.RetrieveApps().Select(app => new SelectedItem() { Text = app.Value, Value = app.Key }));
DefineApp.AddRange(DictHelper.RetrieveApps().Select(app => new SelectedItem() { Text = app.Value, Value = app.Key }));
return base.SetParametersAsync(ParameterView.Empty);
}
/// <summary>

View File

@ -30,9 +30,11 @@ namespace Bootstrap.Admin.Pages.Views.Admin.Components
/// <summary>
/// OnParametersSet 方法
/// </summary>
protected override void OnParametersSet()
public override System.Threading.Tasks.Task SetParametersAsync(ParameterView parameters)
{
parameters.SetParameterProperties(this);
FixedHeader = DictHelper.RetrieveFixedTableHeader();
return base.SetParametersAsync(ParameterView.Empty);
}
/// <summary>