Class FixedFooter

FixedFooter

顯示在 Card 底部的固定頁尾。

適用於 Google Workspace 外掛程式和 Google Chat 應用程式。

const fixedFooter = CardService.newFixedFooter().setPrimaryButton(
    CardService.newTextButton().setText('help').setOpenLink(
        CardService.newOpenLink().setUrl('http://www.google.com')),
);

方法

方法傳回類型簡短說明
setPrimaryButton(button)FixedFooter在固定頁尾中設定主要按鈕。
setSecondaryButton(button)FixedFooter在固定頁尾中設定次要按鈕。

內容詳盡的說明文件

setPrimaryButton(button)

在固定頁尾中設定主要按鈕。主要按鈕必須是 TextButtonStyle.FILLED 按鈕。如果主要按鈕的背景顏色未設定,按鈕會使用外掛程式資訊清單中定義的主要顏色。

參數

名稱類型說明
buttonTextButton新增按鈕。

回攻員

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


setSecondaryButton(button)

在固定頁尾中設定次要按鈕。次要按鈕必須是 TextButtonStyle.OUTLINED 按鈕。如果未呼叫 setPrimaryButton(button) 設定主要按鈕,這個方法不會執行任何動作。

參數

名稱類型說明
buttonTextButton新增按鈕。

回攻員

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