Class CarouselCard

CarouselCard

可做為輪轉介面項目顯示的資訊卡。

適用於 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'));

方法

方法傳回類型簡短說明
addFooterWidget(widget)CarouselCard將指定小工具新增至這個輪轉介面資訊卡的頁尾。
addWidget(widget)CarouselCard將指定的小工具新增至這個輪轉介面資訊卡。

內容詳盡的說明文件

addFooterWidget(widget)

將指定小工具新增至這個輪轉介面資訊卡的頁尾。小工具會按照新增順序顯示。

const carouselCard = CardService.newCarouselCard()
    .addFooterWidget(
        CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));

參數

名稱類型說明
widgetWidget要新增至輪播資訊卡頁尾的小工具。

回攻員

CarouselCard - 這個物件,用於鏈結。


addWidget(widget)

將指定的小工具新增至這個輪轉介面資訊卡。小工具會按照新增順序顯示。

const carouselCard = CardService.newCarouselCard()
    .addWidget(
        CardService.newTextParagraph().setText('a text paragraph in the carousel card'));

參數

名稱類型說明
widgetWidget要新增至輪播資訊卡的微件。

回攻員

CarouselCard - 這個物件,用於鏈結。