mirror of
https://github.com/Kuingsmile/word-GPT-Plus.git
synced 2026-04-25 16:25:49 +03:00
[GH-ISSUE #113] [Feature]: 支持office2016retail和office2019retail #80
Labels
No labels
bug
enhancement
help wanted
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/word-GPT-Plus#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @unclelaotie on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/Kuingsmile/word-GPT-Plus/issues/113
Originally assigned to: @Kuingsmile on GitHub.
前置阅读 | Pre-reading
服务类型 | Service Type
Self-hosted service
系统信息 | System Information
Windows
Office 版本 | Office Version
office 2016 retail
功能请求 | Feature request
The error "Office.js has not fully loaded. Your app must call 'Office.onReady()' as part of its loading sequence (or set the 'Office.initialize' function)" may occur due to several reasons:
Internet Explorer 11. The browser does not understand ES6.
Slow network. The error occurs because the MS code is waiting for "Office.initialize" to be initialized using a timeout loop.
Deployment issues. The error may appear when deploying the application to Azure.
23
To resolve the issue, try the following:
Convert all arrow functions to normal functions.
Add "target" as ES6 in tsconfig.
Set "Office.initialize" to a dummy function before calling "Office.onReady()".
能否按这个解决方法调整代码以支持office2016和2019零售版呢?
@Kuingsmile commented on GitHub (Dec 23, 2025):
我看下 最近在重写整个代码
@unclelaotie commented on GitHub (Dec 24, 2025):
GitHub Copilot Chat Assistant — 结论:要让这个项目在 Office 2016(retail,常在 Windows 上用 IE11 Trident 运行 Add-in)上稳定运行,需要做比较大的改动,不是小修小补就能解决的。
主要原因(简要)
仓库使用 Vue 3 + Element Plus,这两者都不支持 IE11(Vue3 本身依赖 Proxy 等现代特性,无法在 IE11 上运行)。
index.html 使用了 type="module" 脚本,IE11 不支持 ES modules。
代码中使用了现代浏览器 API(ResizeObserver、fetch、Promise、ES6+ 特性等),IE11 缺少许多内建 API。
若某些依赖(例如 @langchain/... 或其它现代库)假定现代浏览器/ESM 环境,可能根本无法在 IE11 中运行,甚至通过 polyfill 也无法完全兼容。
需要做的改动(清单)
明确策略(先选一个)
方案 A(更彻底但稳定):把前端从 Vue 3 / Element Plus 降级或重写为能支持 IE11 的栈(例如 Vue 2 + Element UI 或其他 IE11 兼容框架)。这是兼容性最高但工作量最大的方案。
方案 B(构建层做兼容):尝试保留 Vue3,使用构建工具输出 legacy ES5 bundle + polyfills(如 @vitejs/plugin-legacy / Babel + core-js),并用 non-module/nomodule 机制在 IE11 中加载。注意:Vue3 即便打成 ES5,很多特性(Proxy)仍不可用,兼容性可能不可行或不稳定。
方案 C(后端代理):把不能在 IE 中运行的复杂逻辑(如某些 SDK、langchain 之类)移到后端服务,前端仅做最小 UI 与后端通信。这样可减少浏览器端依赖,但仍需UI兼容处理。
构建与打包
在构建中加入 legacy 输出(Babel 转 ES5、core-js polyfills、regenerator-runtime)。
改 index.html,从 module/ESM 引用改为传统 script(或用 nomodule 机制同时提供现代/legacy)。
框架与组件库
如果选择支持 IE11,建议将 Vue3 + Element Plus 替换为 Vue2 + Element UI(或其他 IE11 支持良好的库),或彻底换一个能兼容的前端实现。
Polyfill / API 替换
添加 polyfills:Promise、fetch(或用 XHR 回退)、Object.assign、Map/Set、Symbol、Array.prototype.includes、Intl(若用到)等。
替换/Polyfill ResizeObserver、AbortController、IntersectionObserver 等 API(或避免使用)。
第三方依赖检查
检查所有 npm 依赖,确认哪些依赖不支持 IE11(特别是使用 Proxy、WebAssembly、ESM-only 的包)。对不可兼容的依赖需替换或迁移到后端。
Office Add-in 特有
保证 Office.js 版本在 Office 2016 下可用(通常可,但要测试)。
调试与侧加载(sideload)流程,在目标 Office 环境下逐页测试功能。
测试与修复
在真实 Office 2016 环境(Windows + IE11 runtime)上做完整回归,修复样式和行为差异。
问了cursor,看来没那么简单啊
@Kuingsmile commented on GitHub (Dec 24, 2025):
这么看不如用office tool plus装个新版本office更快🤣
---- 回复的原邮件 ----
| 发件人 | @.> |
| 日期 | 2025年12月24日 21:28 |
| 收件人 | @.> |
| 抄送至 | @.>@.> |
| 主题 | Re: [Kuingsmile/word-GPT-Plus] [Feature]: 支持office2016retail和office2019retail (Issue #113) |
unclelaotie left a comment (Kuingsmile/word-GPT-Plus#113)
GitHub Copilot Chat Assistant — 结论:要让这个项目在 Office 2016(retail,常在 Windows 上用 IE11 Trident 运行 Add-in)上稳定运行,需要做比较大的改动,不是小修小补就能解决的。
主要原因(简要)
仓库使用 Vue 3 + Element Plus,这两者都不支持 IE11(Vue3 本身依赖 Proxy 等现代特性,无法在 IE11 上运行)。
index.html 使用了 type="module" 脚本,IE11 不支持 ES modules。
代码中使用了现代浏览器 API(ResizeObserver、fetch、Promise、ES6+ 特性等),IE11 缺少许多内建 API。
若某些依赖(例如 @langchain/... 或其它现代库)假定现代浏览器/ESM 环境,可能根本无法在 IE11 中运行,甚至通过 polyfill 也无法完全兼容。
需要做的改动(清单)
明确策略(先选一个)
方案 A(更彻底但稳定):把前端从 Vue 3 / Element Plus 降级或重写为能支持 IE11 的栈(例如 Vue 2 + Element UI 或其他 IE11 兼容框架)。这是兼容性最高但工作量最大的方案。
方案 B(构建层做兼容):尝试保留 Vue3,使用构建工具输出 legacy ES5 bundle + polyfills(如 @vitejs/plugin-legacy / Babel + core-js),并用 non-module/nomodule 机制在 IE11 中加载。注意:Vue3 即便打成 ES5,很多特性(Proxy)仍不可用,兼容性可能不可行或不稳定。
方案 C(后端代理):把不能在 IE 中运行的复杂逻辑(如某些 SDK、langchain 之类)移到后端服务,前端仅做最小 UI 与后端通信。这样可减少浏览器端依赖,但仍需UI兼容处理。
构建与打包
在构建中加入 legacy 输出(Babel 转 ES5、core-js polyfills、regenerator-runtime)。
改 index.html,从 module/ESM 引用改为传统 script(或用 nomodule 机制同时提供现代/legacy)。
框架与组件库
如果选择支持 IE11,建议将 Vue3 + Element Plus 替换为 Vue2 + Element UI(或其他 IE11 支持良好的库),或彻底换一个能兼容的前端实现。
Polyfill / API 替换
添加 polyfills:Promise、fetch(或用 XHR 回退)、Object.assign、Map/Set、Symbol、Array.prototype.includes、Intl(若用到)等。
替换/Polyfill ResizeObserver、AbortController、IntersectionObserver 等 API(或避免使用)。
第三方依赖检查
检查所有 npm 依赖,确认哪些依赖不支持 IE11(特别是使用 Proxy、WebAssembly、ESM-only 的包)。对不可兼容的依赖需替换或迁移到后端。
Office Add-in 特有
保证 Office.js 版本在 Office 2016 下可用(通常可,但要测试)。
调试与侧加载(sideload)流程,在目标 Office 环境下逐页测试功能。
测试与修复
在真实 Office 2016 环境(Windows + IE11 runtime)上做完整回归,修复样式和行为差异。
问了cursor,看来没那么简单啊
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: @.***>
@unclelaotie commented on GitHub (Dec 27, 2025):
有些地方只能用office2016,或者可以开发时前后端分开?前端用vue2+es5,后端用新技术,兼容性就提升了,只是建议啊
@Kuingsmile commented on GitHub (Dec 27, 2025):
vue2已经是过时的技术了,而且即使换vue2 用到的依赖包也不支持了
---- 回复的原邮件 ----
| 发件人 | @.> |
| 日期 | 2025年12月27日 15:42 |
| 收件人 | @.> |
| 抄送至 | @.>@.> |
| 主题 | Re: [Kuingsmile/word-GPT-Plus] [Feature]: 支持office2016retail和office2019retail (Issue #113) |
unclelaotie left a comment (Kuingsmile/word-GPT-Plus#113)
有些地方只能用office2016,或者可以开发时前后端分开?前端用vue2+es5,后端用新技术,兼容性就提升了,只是建议啊
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: @.***>