mirror of
https://gitee.com/hoslay/ddei-editor.git
synced 2025-12-07 09:38:41 +08:00
修复bug
This commit is contained in:
parent
9a706d3631
commit
7780695079
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ddei-editor",
|
"name": "ddei-editor",
|
||||||
"version": "1.2.42",
|
"version": "1.2.42-1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"author": "hoslay <3697355039@qq.com>",
|
"author": "hoslay <3697355039@qq.com>",
|
||||||
|
|||||||
12
src/App.vue
12
src/App.vue
@ -68,12 +68,12 @@ export default defineComponent({
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
i18n: { //国际化配置
|
// i18n: { //国际化配置
|
||||||
lang: "en_US", //强制设定语言,如果不设置则读取浏览器的语言设置
|
// lang: "ja_JP", //强制设定语言,如果不设置则读取浏览器的语言设置
|
||||||
langs: { //导入自定义语言包,可以覆盖自带的语言包中相同的内容
|
// langs: { //导入自定义语言包,可以覆盖自带的语言包中相同的内容
|
||||||
// "ja_JP": i18nJP
|
// "ja_JP": i18nJP
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
extensions: [
|
extensions: [
|
||||||
// //布局的配置
|
// //布局的配置
|
||||||
DDeiCoreStandLayout.configuration({
|
DDeiCoreStandLayout.configuration({
|
||||||
|
|||||||
@ -83,7 +83,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.options.extensions.splice(0,0,DDeiCore)
|
this.options.extensions.splice(0,0,DDeiCore)
|
||||||
let editor = DDeiEditor.newInstance(this.id, this.id, true, this.options);
|
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)
|
editor.setI18nLang(this.options?.i18n?.lang)
|
||||||
|
|
||||||
this.editor = editor
|
this.editor = editor
|
||||||
|
|
||||||
editor.appContext = getCurrentInstance().appContext
|
editor.appContext = getCurrentInstance().appContext
|
||||||
@ -191,13 +199,7 @@ export default {
|
|||||||
if (options?.config?.height) {
|
if (options?.config?.height) {
|
||||||
this.$refs.editor_div.style.height = options?.config?.height + "px";
|
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){
|
if (options?.config?.initData){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user