在用户提交并关闭对话框时显示通知。
适用于扩展 Google Chat 的 Google Workspace 加载项。
const notification = AddOnsResponseService.newNotification().setText("You closed a dialog!");
方法
| 方法 | 返回类型 | 简介 |
|---|---|---|
set | Notification | 设置要在通知中显示的文字。 |
详细文档
set Text(text)
设置要在通知中显示的文字。必需。
const notification = AddOnsResponseService.newNotification().setText("You closed a dialog!");
参数
| 名称 | 类型 | 说明 |
|---|---|---|
text | String | 通知文本。 |
返回
Notification - 此对象,用于链式调用。