用于构建 Modify 对象的构建器,该对象通过将 Modify 对象传递给 Action 来更改和更新现有卡的界面。如需了解用法,请参阅更新配置卡片。
仅适用于扩展 Google Workspace Studio 的 Google Workspace 插件。
用法示例:
const insertSection = AddOnsResponseService.newInsertSection().insertBelowSection('sample_id') .setSection(CardService.newCardSection().setHeader('New Section')); const modifyCard = AddOnsResponseService.newModifyCard().setInsertSection(insertSection); const navigation = AddOnsResponseService.newNavigation().addModifyCard(modifyCard);
方法
| 方法 | 返回类型 | 简介 |
|---|---|---|
set | Modify | 为此修改卡片对象设置 Insert。 |
set | Modify | 为此修改卡片对象设置 Insert。 |
set | Modify | 为此修改卡片对象设置 Remove。 |
set | Modify | 为此修改卡片对象设置 Remove。 |
set | Modify | 为此修改卡片对象设置替换 Card,替换部分应具有与现有卡片部分相同的 ID。 |
set | Modify | 为此修改卡片对象设置替换微件,替换微件应具有与现有微件相同的 ID。 |
set | Modify | 为此修改卡片对象设置 Update。 |
详细文档
set Insert Section(insertSection)
为此修改卡片对象设置 Insert。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
insert | Insert | 要应用于卡片的插入部分。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Insert Widget(insertWidget)
为此修改卡片对象设置 Insert。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
insert | Insert | 要应用于卡片的 Insert。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Remove Section(removeSection)
为此修改卡片对象设置 Remove。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
remove | Remove | 要应用于卡片的 Remove。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Remove Widget(removeWidget)
为此修改卡片对象设置 Remove。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
remove | Remove | 要应用于卡片的 Remove。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Replace Section(replacementSection)
为此修改卡片对象设置替换 Card,替换部分应具有与现有卡片部分相同的 ID。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
replacement | Card | 用于覆盖现有卡片部分的替换部分。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Replace Widget(replacementWidget)
为此修改卡片对象设置替换微件,替换微件应具有与现有微件相同的 ID。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
replacement | Widget | 用于覆盖现有 widget 的替换 widget。 |
返回
Modify - 用于链式调用的修改卡片对象。
set Update Widget(updateWidget)
为此修改卡片对象设置 Update。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
update | Update | 要应用于卡片的 Update。 |
返回
Modify - 用于链式调用的修改卡片对象。