2020-06-15 22:23:08 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using OneOf;
|
|
|
|
|
|
|
|
|
|
namespace AntDesign
|
|
|
|
|
{
|
|
|
|
|
public partial class DescriptionsItem : AntDomComponentBase, IDescriptionsItem
|
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
2020-09-16 13:58:16 +08:00
|
|
|
|
public string Title { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public RenderFragment TitleTemplate { get; set; }
|
2020-06-15 22:23:08 +08:00
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public int Span { get; set; } = 1;
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
|
|
|
|
|
|
[CascadingParameter]
|
|
|
|
|
public Descriptions Descriptions { get; set; }
|
|
|
|
|
|
2020-07-21 23:48:43 +08:00
|
|
|
|
protected override void Dispose(bool disposing)
|
|
|
|
|
{
|
|
|
|
|
this.Descriptions?.Items.Remove(this);
|
|
|
|
|
base.Dispose(disposing);
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-15 22:23:08 +08:00
|
|
|
|
protected override void OnInitialized()
|
|
|
|
|
{
|
|
|
|
|
this.Descriptions?.Items.Add(this);
|
|
|
|
|
base.OnInitialized();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|