From 32f2535825f794651599cdf25a066548c3b05b72 Mon Sep 17 00:00:00 2001 From: CorrectRoad Date: Fri, 9 Aug 2024 10:43:26 +0800 Subject: [PATCH] feat: add withList func (#47) --- pkg/ysk/adapter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/ysk/adapter.go b/pkg/ysk/adapter.go index 5cf00f2..614428b 100644 --- a/pkg/ysk/adapter.go +++ b/pkg/ysk/adapter.go @@ -70,6 +70,11 @@ func (yskCard YSKCard) WithProgress(label string, progress int) YSKCard { return yskCard } +func (yskCard YSKCard) WithList(params []YSKCardListItem) YSKCard { + yskCard.Content.BodyList = params + return yskCard +} + type YSKCardContent struct { TitleIcon YSKCardIcon `json:"titleIcon" gorm:"column:title_icon"` TitleText string `json:"titleText" gorm:"column:title_text"`