共用方式為


ThumbnailCard class

簡化建置縮圖卡片的卡片產生器類別。

Extends

建構函式

ThumbnailCard(Session)

建立新的 ThumbnailCard。

方法

buttons(ICardAction[] | IIsCardAction[])

適用於目前卡片的一組動作。 並非所有頻道都支援按鈕或具有按鈕的卡片。 某些通道可能會選擇使用自訂鍵盤來轉譯按鈕。

images(ICardImage[] | IIsCardImage[])

傳訊支援所有媒體格式:音訊、視訊、影像和縮圖,以及優化內容下載。

subtitle(TextType, any[])

子標題會出現在 [標題] 字段下方,只有字型樣式與 [標題] 不同。

tap(ICardAction | IIsCardAction)

當使用者點選卡片時,將會啟動此動作。 並非所有頻道都支持點選動作,有些頻道可能會選擇將點選動作轉譯為標題連結。

text(TextType, any[])

文字欄位會出現在副標題下方,只有字型樣式與 [子標題] 不同。

title(TextType, any[])

卡片的標題。

toAttachment()

傳回卡片的 JSON

建構函式詳細資料

ThumbnailCard(Session)

建立新的 ThumbnailCard。

new ThumbnailCard(session?: Session)

參數

session
Session

(選擇性)將用來當地語系化任何文字。

方法詳細資料

buttons(ICardAction[] | IIsCardAction[])

適用於目前卡片的一組動作。 並非所有頻道都支援按鈕或具有按鈕的卡片。 某些通道可能會選擇使用自訂鍵盤來轉譯按鈕。

function buttons(list: ICardAction[] | IIsCardAction[])

參數

傳回

images(ICardImage[] | IIsCardImage[])

傳訊支援所有媒體格式:音訊、視訊、影像和縮圖,以及優化內容下載。

function images(list: ICardImage[] | IIsCardImage[])

參數

傳回

subtitle(TextType, any[])

子標題會出現在 [標題] 字段下方,只有字型樣式與 [標題] 不同。

function subtitle(text: TextType, args: any[])

參數

text
TextType
args

any[]

傳回

tap(ICardAction | IIsCardAction)

當使用者點選卡片時,將會啟動此動作。 並非所有頻道都支持點選動作,有些頻道可能會選擇將點選動作轉譯為標題連結。

function tap(action: ICardAction | IIsCardAction)

參數

傳回

text(TextType, any[])

文字欄位會出現在副標題下方,只有字型樣式與 [子標題] 不同。

function text(text: TextType, args: any[])

參數

text
TextType
args

any[]

傳回

title(TextType, any[])

卡片的標題。

function title(text: TextType, args: any[])

參數

text
TextType
args

any[]

傳回

toAttachment()

傳回卡片的 JSON

function toAttachment()

傳回