[Bug] Added CustomMenu, when registering plugin engine, LocaleService cannot be loaded.
Gocgo opened this issue · comments
在您提交此问题之前,您是否检查了以下内容?
- 这真的是个问题吗?
- 我已经在 Github Issues 中搜索过了,但没有找到类似的问题。
受影响的包和版本
univer-0.1.14
复现链接
可复现最小demo仓库地址:https://github.com/Gocgo/univer-demo.git
主页在pages/Home目录下,universheet组件在components/UniverSheet目录下, univer.registerPlugin(UniverSheetsCustomMenuPlugin);注释掉,universheet可以正常展示
加载引擎会导致产生如图的报错,无法加载LocaleService
预期行为
应当可以加载引擎,展示自定义的custom-menu,zai
实际行为
实际产生了报错
运行环境
Chrome
系统信息
No response
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Origin Title: [Bug] 新增CustomMenu,注册plugin引擎时,无法加载LocaleService
Title: [Bug] Added CustomMenu, when registering plugin engine, LocaleService cannot be loaded.
Before you submitted this question, did you check the following?
- Is this really a problem?
- I've searched Github Issues but haven't found any similar issues.
Affected packages and versions
universal-0.1.14
Recurrence link
The smallest reproducible demo warehouse address: https://github.com/Gocgo/univer-demo.git
The homepage is in the pages/Home directory, and the universheet component is in the components/UniverSheet directory. Comment out univer.registerPlugin(UniverSheetsCustomMenuPlugin); and the universheet can be displayed normally.
Loading the engine will result in an error as shown in the figure, and the LocaleService cannot be loaded.
Expected behavior
It should be possible to load the engine and display customized custom-menu, zai
Actual behavior
An error actually occurred
Running environment
Chrome
system message
No response
This is a known issue. We are not sure what Umi has done that caused the TypeScript decorators to not execute as expected. The provided link (https://stackblitz.com/edit/vitejs-vite-exfdw3?file=src%2Fpages%2Fplugins%2FDataSourcePlugin.tsx) is a workaround for this problem.
If you are able to find a solution, we would greatly appreciate your help in resolving this issue.