提交 b8cd391b 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'cherry-pick-9cc2840f' into 'release'

ElementUI的Elicon组件修复

See merge request o2oa/o2oa!5343
......@@ -64,5 +64,20 @@ MWF.xApplication.process.FormDesigner.Module.Elicon = MWF.FCElicon = new Class({
return this.copyNode;
},
setPropertyName: function(){},
setPropertyId: function(){}
setPropertyId: function(){},
_preprocessingModuleData: function(){
this.node.clearStyles();
//if (this.initialStyles) this.node.setStyles(this.initialStyles);
this.json.recoveryStyles = Object.clone(this.json.styles);
if (this.json.recoveryStyles) Object.each(this.json.recoveryStyles, function(value, key){
if ((value.indexOf("x_processplatform_assemble_surface")!=-1 || value.indexOf("x_portal_assemble_surface")!=-1)){
//需要运行时处理
}else{
this.node.setStyle(key, value);
delete this.json.styles[key];
}
}.bind(this));
this.json.preprocessing = "y";
},
});
......@@ -16,6 +16,17 @@ MWF.xApplication.process.Xform.Elicon = MWF.APPElicon = new Class(
{
Implements: [Events],
Extends: MWF.APP$Module,
_loadVue: function(callback){
if (!window.Vue){
var vue = (o2.session.isDebugger) ? "vue_develop" : "vue";
o2.loadAll({"css": "../o2_lib/vue/element/index.css", "js": [vue, "elementui"]}, { "sequence": true }, callback);
}else{
if (callback) callback();
}
},
_queryLoaded: function(){
this._loadVue();
}
// load: function(){
// this._loadModuleEvents();
......@@ -69,9 +80,9 @@ MWF.xApplication.process.Xform.Elicon = MWF.APPElicon = new Class(
// }
// };
// },
_createVueData: function(){
return this.json;
},
// _createVueData: function(){
// return this.json;
// },
// _afterMounted: function(el){
// this.node = el;
// this.node.set({
......@@ -83,33 +94,34 @@ MWF.xApplication.process.Xform.Elicon = MWF.APPElicon = new Class(
// this.fireEvent("postLoad");
// this.fireEvent("load");
// },
_createElementHtml: function(){
var html = "<i";
html += " :class=\"icon\"";
if (this.json.elProperties){
Object.keys(this.json.elProperties).forEach(function(k){
if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
}, this);
}
// var styles = {};
// if (this.json.iconSize) styles["font-size"] = this.json.iconSize+"px";
// if (this.json.iconColor) styles["color"] = this.json.iconColor;
// styles = Object.merge(styles, this.json.elStyles);
//
// if (styles){
// var style = "";
// Object.keys(styles).forEach(function(k){
// if (styles[k]) style += k+":"+styles[k]+";";
// }, this);
// html += " style=\""+style+"\"";
// }
html += " :style=\"[elStyles, {fontSize: iconSize+'px', color: iconColor}]\"";
html += "></i>";
return html;
}
// _createElementHtml: function(){
// debugger;
// var html = "<i";
// html += " :class=\"icon\"";
//
// if (this.json.elProperties){
// Object.keys(this.json.elProperties).forEach(function(k){
// if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
// }, this);
// }
//
// // var styles = {};
// // if (this.json.iconSize) styles["font-size"] = this.json.iconSize+"px";
// // if (this.json.iconColor) styles["color"] = this.json.iconColor;
// // styles = Object.merge(styles, this.json.elStyles);
// //
// // if (styles){
// // var style = "";
// // Object.keys(styles).forEach(function(k){
// // if (styles[k]) style += k+":"+styles[k]+";";
// // }, this);
// // html += " style=\""+style+"\"";
// // }
//
// html += " :style=\"[elStyles, {fontSize: iconSize+'px', color: iconColor}]\"";
//
//
// html += "></i>";
// return html;
// }
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册