InsertSection 物件的建構工具。開發人員可以將 Insert 傳遞至 Modify,在資訊卡中插入新區段。
僅適用於擴充 Google Workspace Studio 的 Google Workspace 外掛程式。
用法範例:
const insertSection = AddOnsResponseService.newInsertSection().insertBelowSection('sample_id') .setSection(CardService.newCardSection().setHeader('New Section')); const modifyCard = AddOnsResponseService.newModifyCard() .setInsertSection(insertSection);
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
insert | Insert | 設定 onCardTop 旗標,指出是否應在資訊卡頂端插入新區段。 |
insert | Insert | 設定區段 ID,新區段會插入其下方。 |
set | Insert | 設定要插入的卡片區塊。 |
內容詳盡的說明文件
insert At Top(onCardTop)
設定 onCardTop 旗標,指出是否應在資訊卡頂端插入新區段。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
on | Boolean | onCardTop 旗標。 |
回攻員
Insert:插入區段物件,用於鏈結。
insert Below Section(sectionId)
設定區段 ID,新區段會插入其下方。如果找不到區段 ID,新區段會插入卡片結尾。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
section | String | 要插入下方區段的 ID。 |
回攻員
Insert:插入區段物件,用於鏈結。