Class ModifyCard

修改資訊卡

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);

方法

方法傳回類型簡短說明
setInsertSection(insertSection)ModifyCard為這個修改資訊卡物件設定 InsertSection
setInsertWidget(insertWidget)ModifyCard設定這個修改資訊卡物件的 InsertWidget
setRemoveSection(removeSection)ModifyCard設定這個修改資訊卡物件的 RemoveSection
setRemoveWidget(removeWidget)ModifyCard設定這個修改資訊卡物件的 RemoveWidget
setReplaceSection(replacementSection)ModifyCard為這個修改資訊卡物件設定替代 CardSection,替代區塊應與現有資訊卡區塊的 ID 相同。
setReplaceWidget(replacementWidget)ModifyCard為這個修改資訊卡物件設定替代小工具,替代小工具的 ID 應與現有小工具相同。
setUpdateWidget(updateWidget)ModifyCard設定這個修改資訊卡物件的 UpdateWidget

內容詳盡的說明文件

setInsertSection(insertSection)

設定這個修改資訊卡物件的 InsertSection

參數

名稱類型說明
insertSectionInsertSection要套用至卡片的插入區段。

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setInsertWidget(insertWidget)

設定這個修改資訊卡物件的 InsertWidget

參數

名稱類型說明
insertWidgetInsertWidget要套用至資訊卡的 InsertWidget

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setRemoveSection(removeSection)

設定這個修改資訊卡物件的 RemoveSection

參數

名稱類型說明
removeSectionRemoveSection要套用至資訊卡的 RemoveSection

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setRemoveWidget(removeWidget)

設定這個修改資訊卡物件的 RemoveWidget

參數

名稱類型說明
removeWidgetRemoveWidget要套用至資訊卡的 RemoveWidget

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setReplaceSection(replacementSection)

為這個修改資訊卡物件設定替代 CardSection,替代區塊應與現有資訊卡區塊的 ID 相同。

參數

名稱類型說明
replacementSectionCardSection要覆寫現有卡片區塊的替代區塊。

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setReplaceWidget(replacementWidget)

為這個修改資訊卡物件設定替代小工具,替代小工具的 ID 應與現有小工具相同。

參數

名稱類型說明
replacementWidgetWidget用來覆寫現有小工具的替代小工具。

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。


setUpdateWidget(updateWidget)

設定這個修改資訊卡物件的 UpdateWidget

參數

名稱類型說明
updateWidgetUpdateWidget要套用至資訊卡的 UpdateWidget

回攻員

ModifyCard - 這個修改資訊卡物件,用於鏈結。