|
@@ -7,6 +7,7 @@ import { remainingPaths } from "/@/router";
|
|
|
import { transformI18n } from "/@/plugins/i18n";
|
|
|
import { storageSession } from "/@/utils/storage";
|
|
|
import { useAppStoreHook } from "/@/store/modules/app";
|
|
|
+import { i18nChangeLanguage } from "@wangeditor/editor";
|
|
|
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
|
|
|
|
|
const errorInfo = "当前路由配置不正确,请检查配置";
|
|
@@ -109,6 +110,15 @@ export function useNav() {
|
|
|
return remainingPaths.includes(path);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 切换wangEditorV5国际化
|
|
|
+ * @param language string 可选值 en、zh-CN
|
|
|
+ * @returns void
|
|
|
+ */
|
|
|
+ function changeWangeditorLanguage(language: string): void {
|
|
|
+ i18nChangeLanguage(language);
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
logout,
|
|
|
backHome,
|
|
@@ -122,6 +132,7 @@ export function useNav() {
|
|
|
pureApp,
|
|
|
username,
|
|
|
avatarsStyle,
|
|
|
- getDropdownItemStyle
|
|
|
+ getDropdownItemStyle,
|
|
|
+ changeWangeditorLanguage
|
|
|
};
|
|
|
}
|