Commit 0f49b3f6 authored by 黄奎's avatar 黄奎

页面修改

parent 91a210fc
......@@ -18,7 +18,7 @@
return {
id: 'editor' + (Math.floor((Math.random() * 10000) + 1)),
editor: null,
changeState:false,
changeState: false,
isInputChange: false,
tempContent: this.defaultMsg
}
......@@ -66,7 +66,23 @@
},
loadUe() {
const _this = this;
UE.registerUI('appinsertimage', (editor, uiName) => {
return new UE.ui.Button({
name: uiName,
title: '插入图片',
//添加额外样式,指定icon图标,这里默认使用一个重复的icon
cssRules: 'background-position: -381px 0px;',
onclick() {
self.editor = editor;
_this.changeState = true;
},
});
});
this.editor = UE.getEditor(this.id, this.config); // 初始化UE
let self = this;
this.editor.addListener("ready", function () {
_this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。
});
......@@ -78,29 +94,14 @@
});
this.editor.addListener('keyup', editor => {
this.isInputChange = false;
var str = _this.editor.getContent();
_this.$emit('input', _this.editor.getContent());
});
this.editor.addListener('contentChange', editor => {
this.isInputChange = false;
var str = _this.editor.getContent();
_this.$emit('input', _this.editor.getContent());
});
let self = this;
UE.registerUI('appinsertimage', (editor, uiName) => {
return new UE.ui.Button({
name: uiName,
title: '插入图片',
//添加额外样式,指定icon图标,这里默认使用一个重复的icon
cssRules: 'background-position: -381px 0px;',
onclick() {
self.ue = editor
_this.isInputChange = true;
_this.changeState=true;
},
});
});
}
},
destroyed() {
......
......@@ -168,12 +168,12 @@
}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
this.addMsg.Id=jsonData.Id;
this.addMsg.PageName=jsonData.PageName;
this.addMsg.IsUse=jsonData.IsUse;
this.addMsg.IsShowNav=jsonData.IsShowNav;
this.addMsg.IsHome=jsonData.IsHome;
this.addMsg.DetailsList=jsonData.DetailsList;
this.addMsg.Id = jsonData.Id;
this.addMsg.PageName = jsonData.PageName;
this.addMsg.IsUse = jsonData.IsUse;
this.addMsg.IsShowNav = jsonData.IsShowNav;
this.addMsg.IsHome = jsonData.IsHome;
this.addMsg.DetailsList = jsonData.DetailsList;
this.CustomIsShowAdd = false;
} else {
this.Info(res.data.message);
......
......@@ -664,6 +664,6 @@ UE.I18N['zh-cn'] = {
},
'autosave': {
'saving':'保存中...',
'success':'本地保存成功'
'success':''
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment