Class TextFormatChip

文本格式条状标签

文本格式的可点击 chip。

仅适用于扩展 Google Workspace Studio 的 Google Workspace 插件。

用法示例:

const chip = AddOnsResponseService.newChip()
    .setTextFormatIcon(AddOnsResponseService.newTextFormatIcon()
      .setIconUrl("https://www.google.com/icon.png"))
    .setLabel("test_label")
    .setUrl("https://www.google.com/chip.png");

}

方法

方法返回类型简介
setLabel(label)TextFormatChip设置在条状标签中显示的文本。
setTextFormatIcon(icon)TextFormatChip设置条状标签中显示的图标。
setUrl(url)TextFormatChip设置点击条状标签后要前往的网址。

详细文档

setLabel(label)

设置在条状标签中显示的文本。

参数

名称类型说明
labelString功能块的文本标签。

返回

TextFormatChip - 此芯片对象,用于链式调用。


setTextFormatIcon(icon)

设置条状标签中显示的图标。

参数

名称类型说明
iconTextFormatIcon要在芯片中设置的 TextFormatIcon

返回

TextFormatChip - 此芯片对象,用于链式调用。


setUrl(url)

设置点击条状标签后要前往的网址。

参数

名称类型说明
urlString条状标签的目标网址。

返回

TextFormatChip - 此芯片对象,用于链式调用。