可做為輪轉介面項目顯示的資訊卡。
適用於 Google Workspace 外掛程式和 Google Chat 應用程式。
const carouselCard = CardService.newCarouselCard() .addWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card')) .addFooterWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
add | Carousel | 將指定小工具新增至這個輪轉介面資訊卡的頁尾。 |
add | Carousel | 將指定的小工具新增至這個輪轉介面資訊卡。 |
內容詳盡的說明文件
addWidget(widget)
將指定的小工具新增至這個輪轉介面資訊卡。小工具會按照新增順序顯示。
const carouselCard = CardService.newCarouselCard() .addWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card'));
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
widget | Widget | 要新增至輪播資訊卡的微件。 |
回攻員
CarouselCard - 這個物件,用於鏈結。