office.js的官方版本在这里可用:
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
它在代码中包含以下行:
window.history.replaceState = null;
window.history.pushState = null;
这破坏了我在 Excel Add-ins 中一些历史功能(我使用 react
和 react-router
)。
为什么 office.js 要使这些历史函数无效?文档中没有任何解释。