feat: start to refactor.

This commit is contained in:
rabbitism
2023-12-27 00:58:50 +08:00
parent 5ac95a9965
commit 0c4b6edfc2
6 changed files with 111 additions and 171 deletions

View File

@@ -13,7 +13,7 @@ public class TimelineDemoViewModel: ViewModelBase
Time = DateTime.Now,
TimeFormat = "yyyy-MM-dd HH:mm:ss",
Description = "Item 1",
Content = "First",
Header = "审核中",
ItemType = TimelineItemType.Success,
},
new()
@@ -21,7 +21,7 @@ public class TimelineDemoViewModel: ViewModelBase
Time = DateTime.Now,
TimeFormat = "HH:mm:ss",
Description = "Item 2",
Content = "Content 2",
Header = "发布成功",
ItemType = TimelineItemType.Success,
},
new()
@@ -29,23 +29,9 @@ public class TimelineDemoViewModel: ViewModelBase
Time = DateTime.Now,
TimeFormat = "HH:mm:ss",
Description = "Item 3",
Content = "Content 3",
Header = "审核失败",
ItemType = TimelineItemType.Ongoing,
},
new()
{
Time = DateTime.Now,
TimeFormat = "HH:mm:ss",
Description = "Item 4",
Content = "Content 4"
},
new()
{
Time = DateTime.Now,
TimeFormat = "HH:mm:ss",
Description = "Item 5",
Content = "Content 5"
},
}
};
}
@@ -54,6 +40,6 @@ public class TimelineItemViewModel: ObservableObject
public DateTime Time { get; set; }
public string? TimeFormat { get; set; }
public string? Description { get; set; }
public string? Content { get; set; }
public string? Header { get; set; }
public TimelineItemType ItemType { get; set; }
}