我正在 Google 表格上开发 Google Workspace 插件。我在 appscript.json 中设置了清单文件,如下所示。奇怪的是,当我在 Google 表格中更改选项卡时会触发 homepageTrigger,因此我的卡片界面会有效地重新加载。我已经使用 Google 在此处提供的示例附加代码对此进行了测试:https ://developers.google.com/gsuite/add-ons/how-tos/navigation并且仍然看到问题。以下是完整的 appscript.json 清单代码:
{
"timeZone": "America/New_York",
"dependencies": {
"libraries": [
{
"userSymbol": "OAuth2",
"libraryId": "1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF",
"version": "40"
}
],
"enabledAdvancedServices": [
{
"userSymbol": "Sheets",
"version": "v4",
"serviceId": "sheets"
}
]
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/script.external_request"
],
"runtimeVersion": "V8",
"urlFetchWhitelist": ["https://api.getpickaxe.com/"],
"addOns": {
"common": {
"name": "Pickaxe",
"logoUrl": "https://i.ibb.co/HgnvcNx/Lead-Search-Icon-Active-1.png",
"layoutProperties": {
"primaryColor": "#7541EE",
"secondaryColor": "#7541EE"
}
},
"sheets": {
"homepageTrigger": {
"runFunction": "onHomepage"
}
}
}
}
这是 onHomepage 函数 - 只需调用此链接上引用的示例代码:https ://developers.google.com/gsuite/add-ons/how-tos/navigation
function onHomepage() {
return createNavigationCard();
};
有没有其他人看到这个问题?