From b19d52b5a787b2222821817e83a4fc09f8b68598 Mon Sep 17 00:00:00 2001 From: Nine <948825551@qq.com> Date: Wed, 13 May 2020 06:06:03 +0800 Subject: [PATCH] =?UTF-8?q?!81=20=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20Timeline=20=E6=96=87=E6=A1=A3=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4=E8=AD=A6=E5=91=8A=20*=20doc:=20=E6=B7=BB=E5=8A=A0=20s?= =?UTF-8?q?ealed=20=E5=85=B3=E9=94=AE=E5=AD=97=E5=88=B0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BA=BF=E6=96=87=E6=A1=A3=E7=B1=BB=20*=20doc:=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20timeline=20=E6=96=87=E6=A1=A3=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/Timelines.razor | 2 ++ .../Pages/Timelines.razor.cs | 31 +++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor b/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor index 8f0faf271..f66b13913 100644 --- a/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor +++ b/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor @@ -16,3 +16,5 @@ + + diff --git a/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor.cs b/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor.cs index 289c739c9..79c6901c8 100644 --- a/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor.cs +++ b/src/BootstrapBlazor.WebConsole/Pages/Timelines.razor.cs @@ -1,4 +1,5 @@ using BootstrapBlazor.Components; +using BootstrapBlazor.WebConsole.Common; using System; using System.Collections.Generic; using System.Linq; @@ -6,7 +7,10 @@ using System.Threading.Tasks; namespace BootstrapBlazor.WebConsole.Pages { - public partial class Timelines + /// + /// + /// + public sealed partial class Timelines { private bool isRevers { get; set; } @@ -42,7 +46,7 @@ namespace BootstrapBlazor.WebConsole.Pages /// /// /// - protected readonly List timelineitems = new List + protected readonly IEnumerable timelineitems = new TimelineItem[] { new TimelineItem{ Content="创建时间",DateTime=DateTime.Now.ToString("yyyy-MM-dd")}, new TimelineItem{ Content="通过审核",DateTime=DateTime.Now.AddDays(1).ToString("yyyy-MM-dd")}, @@ -52,11 +56,32 @@ namespace BootstrapBlazor.WebConsole.Pages /// /// /// - protected readonly List timelineitemsColor = new List + protected readonly IEnumerable timelineitemsColor = new TimelineItem[] { new TimelineItem{ Color=Color.Warning, Content="创建时间",DateTime=DateTime.Now.ToString("yyyy-MM-dd")}, new TimelineItem{ Color=Color.Info, Content="通过审核",DateTime=DateTime.Now.AddDays(1).ToString("yyyy-MM-dd")}, new TimelineItem{ Color=Color.Success, Content="活动按期开始",DateTime=DateTime.Now.AddDays(2).ToString("yyyy-MM-dd")} }; + + /// + /// 获得属性方法 + /// + /// + private IEnumerable GetAttributes() => new AttributeItem[] + { + // TODO: 移动到数据库中 + new AttributeItem() { + Name = "Reverse", + Description = "是否倒序显示", + Type = "boolean", + }, + new AttributeItem() { + Name = "Items", + Description = "数据集合", + Type = "IEnumerable", + ValueList = "—", + DefaultValue = " — " + } + }; } }