ModifyCard 物件的建構工具,可將 ModifyCard 物件傳遞至 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。 |
內容詳盡的說明文件
setInsertSection(insertSection)
為這個修改資訊卡物件設定 InsertSection。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
insert | Insert | 要套用至資訊卡的插入區段。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setInsertWidget(insertWidget)
為這個修改資訊卡物件設定 InsertWidget。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
insert | Insert | 要套用至資訊卡的 Insert。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setRemoveSection(removeSection)
為這個修改資訊卡物件設定 RemoveSection。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
remove | Remove | 要套用至資訊卡的 Remove。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setRemoveWidget(removeWidget)
為這個修改資訊卡物件設定 RemoveWidget。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
remove | Remove | 要套用至資訊卡的 Remove。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setReplaceSection(replacementSection)
為這個修改資訊卡物件設定替換的 CardSection,替換區塊應與現有資訊卡區塊的 ID 相同。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
replacement | Card | 要覆寫現有資訊卡區塊的替代區塊。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setReplaceWidget(replacementWidget)
為這個修改資訊卡物件設定替代小工具,替代小工具的 ID 應與現有小工具相同。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
replacement | Widget | 用來覆寫現有小工具的替代小工具。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。
setUpdateWidget(updateWidget)
為這個修改資訊卡物件設定 UpdateWidget。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
update | Update | 要套用至資訊卡的 Update。 |
回攻員
ModifyCard - 這個修改資訊卡物件,用於鏈結。