修复bug

This commit is contained in:
猴赛雷 2024-11-08 16:32:58 +08:00
parent 9a706d3631
commit 7780695079
3 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ddei-editor",
"version": "1.2.42",
"version": "1.2.42-1",
"private": false,
"type": "module",
"author": "hoslay <3697355039@qq.com>",

View File

@ -68,12 +68,12 @@ export default defineComponent({
]
}
},
i18n: { //
lang: "en_US", //
langs: { //
// "ja_JP": i18nJP
}
},
// i18n: { //
// lang: "ja_JP", //
// langs: { //
// "ja_JP": i18nJP
// }
// },
extensions: [
// //
DDeiCoreStandLayout.configuration({

View File

@ -83,7 +83,15 @@ export default {
}
this.options.extensions.splice(0,0,DDeiCore)
let editor = DDeiEditor.newInstance(this.id, this.id, true, this.options);
//
if (this.options?.i18n) {
if (this.options.i18n.langs) {
editor.registerLangs(this.options.i18n.langs)
}
}
editor.setI18nLang(this.options?.i18n?.lang)
this.editor = editor
editor.appContext = getCurrentInstance().appContext
@ -191,13 +199,7 @@ export default {
if (options?.config?.height) {
this.$refs.editor_div.style.height = options?.config?.height + "px";
}
//
if(options?.i18n){
if(options.i18n.langs){
this.editor.registerLangs(options.i18n.langs)
}
}
//
if (options?.config?.initData){