通过


CardImage class

Builder 类,用于简化向卡片添加图像。

构造函数

CardImage(Session)

创建新的 CardImage。

方法

alt(TextType, any[])

要用于辅助功能倒置的图像的备用文本。

create(Session, string)

为给定 URL 创建新的 CardImage。

tap(ICardAction | IIsCardAction)

点击图像时要执行的作。

toImage()

返回图像的 JSON。

url(string)

要显示的图像的 URL。

构造函数详细信息

CardImage(Session)

创建新的 CardImage。

new CardImage(session?: Session)

参数

session
Session

(可选)将用于本地化任何文本。

方法详细信息

alt(TextType, any[])

要用于辅助功能倒置的图像的备用文本。

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

参数

text
TextType
args

any[]

返回

create(Session, string)

为给定 URL 创建新的 CardImage。

static function create(session: Session, url: string)

参数

session
Session
url

string

返回

tap(ICardAction | IIsCardAction)

点击图像时要执行的作。

function tap(action: ICardAction | IIsCardAction)

参数

返回

toImage()

返回图像的 JSON。

function toImage()

返回

url(string)

要显示的图像的 URL。

function url(u: string)

参数

u

string

返回