refactor: 增加 PageContent 组件的描述信息

This commit is contained in:
Argo Zhang 2020-01-19 11:50:15 +08:00
parent f66aac9d30
commit ba8320708a
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 5 additions and 4 deletions

View File

@ -6,18 +6,18 @@ using System.Linq;
namespace Bootstrap.Admin.Components namespace Bootstrap.Admin.Components
{ {
/// <summary> /// <summary>
/// /// PageContent 网页组件
/// </summary> /// </summary>
public class PageContent : ComponentBase public class PageContent : ComponentBase
{ {
/// <summary> /// <summary>
/// /// 获得/设置 组件名字
/// </summary> /// </summary>
[Parameter] [Parameter]
public string Name { get; set; } = ""; public string Name { get; set; } = "";
/// <summary> /// <summary>
/// /// 渲染组件方法
/// </summary> /// </summary>
/// <param name="builder"></param> /// <param name="builder"></param>
protected override void BuildRenderTree(RenderTreeBuilder builder) protected override void BuildRenderTree(RenderTreeBuilder builder)
@ -25,6 +25,7 @@ namespace Bootstrap.Admin.Components
var name = Name.SpanSplit("/").LastOrDefault(); var name = Name.SpanSplit("/").LastOrDefault();
if (!string.IsNullOrEmpty(name)) if (!string.IsNullOrEmpty(name))
{ {
// TODO: 稍后重构使用标签动态加载组件
var t = Type.GetType($"Bootstrap.Admin.Pages.Admin.{name}"); var t = Type.GetType($"Bootstrap.Admin.Pages.Admin.{name}");
if (t != null) if (t != null)
{ {

View File

@ -1,7 +1,7 @@
namespace Bootstrap.Admin.Components namespace Bootstrap.Admin.Components
{ {
/// <summary> /// <summary>
/// /// PageContentAttributes 实体类
/// </summary> /// </summary>
public class PageContentAttributes public class PageContentAttributes
{ {