Office Web Addin 中从命令到任务窗格的触发事件

问题描述

我正在使用 React 开发 Office/Excel Web 插件,其中我有一些 Ribbon/ContextMenu 按钮,需要更新 Taskpane UI 中的数据。以前我使用的是 Storage 事件,它运行良好。然而,最近我搬到了 Shared JS Runtime,它停止了存储事件,因为现在命令和任务窗格都在同一个页面下工作,所以存储事件肯定不会按照定义触发。 我正在努力在 Shared Js Runtime 中找出任何可能的解决方案/事件,以将事件从 commands.js 触发到 Taskpane/Component/App.js 文件。 请推荐

解决方法

以下 github 存储库说明了按下功能区按钮时更新任务窗格的一种方法。
https://github.com/OfficeAddins/sharedruntime

enter image description here

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...