我想在我的專案中的這個選單上添加自定義操作。但找不到任何關于如何訪問的檔案。

uj5u.com熱心網友回復:
您正在尋找通用動作
- 這些是在插件清單中指定的
- 通用操作包含
labels(您在三點選單中看到的選單條目)并與一個openLink或runFunction操作相關聯 - 取決于您的意圖
檔案中的示例清單:
"oauthScopes": [
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata"
],
"addOns": {
"common": {
"name": "Universal Actions Only Addon",
"logoUrl": "https://www.example.com/hosted/images/2x/my-icon.png",
"openLinkUrlPrefixes": [
"https://www.google.com",
"https://www.example.com/urlbase"
],
"universalActions": [{
"label": "Open google.com",
"openLink": "https://www.google.com"
}, {
"label": "Open contact URL",
"runFunction": "openContactURL"
}, {
"label": "Open settings",
"runFunction": "createSettingsResponse"
}, {
"label": "Run background sync",
"runFunction": "runBackgroundSync"
}],
...
},
"gmail": {
"contextualTriggers": [
{
"unconditional": {},
"onTriggerFunction": "getContextualAddOn"
}
]
},
...
},
...
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/494441.html
