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

修复ElementUI组件的一些小bug

上级 b6da413c
...@@ -87,7 +87,17 @@ MWF.xApplication.process.FormDesigner.Module.$ElComponent = MWF.FC$ElComponent = ...@@ -87,7 +87,17 @@ MWF.xApplication.process.FormDesigner.Module.$ElComponent = MWF.FC$ElComponent =
}, },
_mountVueApp: function(){ _mountVueApp: function(){
if (!this.vueApp) this.vueApp = this._createVueExtend(); if (!this.vueApp) this.vueApp = this._createVueExtend();
this.vm = new Vue(this.vueApp).$mount(this.node); try{
this.vm = new Vue(this.vueApp);
this.vm.$o2module = this;
this.vm.$o2callback = callback;
this.vm.$mount(this.node);
}catch(e){
this.node.store("module", this);
this._loadVueCss();
if (callback) callback();
}
}, },
_createVueData: function(){ _createVueData: function(){
return {}; return {};
......
...@@ -74,7 +74,18 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new ...@@ -74,7 +74,18 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
}, },
_loadVue: function(callback){ _loadVue: function(callback){
if (!window.Vue){ if (!window.Vue){
o2.load(["vue_develop", "elementui"], { "sequence": true }, callback); o2.load(["vue_develop", "elementui"], { "sequence": true }, function(){
window.Vue.config.errorHandler = function (err, vm, info) {
if (vm.$o2module && info=="nextTick"){
vm.$o2module._createVueAppNode();
vm.$o2module.node.setStyles(vm.$o2module.css.moduleNodeError);
vm.$el.parentNode.replaceChild(vm.$o2module.node, vm.$el);
vm.$el = vm.$o2module.node;
if (vm.$o2callback) vm.$o2module._afterMounted(vm.$o2module.node, vm.$o2callback);
}
}
if (callback) callback();
});
}else{ }else{
if (callback) callback(); if (callback) callback();
} }
...@@ -134,17 +145,9 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new ...@@ -134,17 +145,9 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
this.vueApp = this._createVueExtend(callback); this.vueApp = this._createVueExtend(callback);
try{ try{
this.vm = new Vue(this.vueApp); this.vm = new Vue(this.vueApp);
// var p = { this.vm.$o2module = this;
// "$options": { this.vm.$o2callback = callback;
// "errorCaptured": function(err, vm, info){
// alert("p: errorCaptured:"+info);
// }
// }
// }
// this.vm.$parent = p;
// this.vm.config.errorHandler = function (err, vm, info) {
// alert("errorHandler: "+info)
// }
this.vm.$mount(this.node); this.vm.$mount(this.node);
}catch(e){ }catch(e){
this.node.store("module", this); this.node.store("module", this);
...@@ -170,7 +173,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new ...@@ -170,7 +173,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
}, },
errorCaptured: function(err, vm, info){ errorCaptured: function(err, vm, info){
alert("errorCaptured:"+info); alert("errorCaptured:"+info);
// return false; return false;
} }
}; };
}, },
......
...@@ -31,10 +31,29 @@ ...@@ -31,10 +31,29 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
...@@ -46,6 +46,26 @@ ...@@ -46,6 +46,26 @@
"opacity": 1, "opacity": 1,
"display": "inline-block" "display": "inline-block"
}, },
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"buttonIcon": { "buttonIcon": {
"height": "26px", "height": "26px",
"cursor": "pointer", "cursor": "pointer",
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
...@@ -46,6 +46,26 @@ ...@@ -46,6 +46,26 @@
"opacity": 1, "opacity": 1,
"display": "inline-block" "display": "inline-block"
}, },
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"buttonIcon": { "buttonIcon": {
"height": "26px", "height": "26px",
"cursor": "pointer", "cursor": "pointer",
......
...@@ -42,6 +42,21 @@ ...@@ -42,6 +42,21 @@
"opacity": 1, "opacity": 1,
"padding": "0 3px", "padding": "0 3px",
"display": "inline-block" "display": "inline-block"
},
"moduleNodeError": {
"border": "1px dashed #999",
"cursor": "pointer",
"overflow": "hidden",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"padding": "0 3px",
"display": "inline-block",
"height": "40px",
"width": "100px"
} }
} }
...@@ -47,6 +47,25 @@ ...@@ -47,6 +47,25 @@
"display": "block", "display": "block",
"min-width": "60px" "min-width": "60px"
}, },
"moduleNodeError": {
"border": "1px dashed #333",
"min-height": "60px",
"cursor": "pointer",
"line-height": "normal",
"width": "auto",
"background": "transparent",
"overflow": "hidden",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "block",
"min-width": "60px"
},
"iconNode": { "iconNode": {
"width": "70px", "width": "70px",
"height": "24px", "height": "24px",
......
...@@ -247,7 +247,17 @@ MWF.xApplication.process.FormDesigner.Module.Elcontainer = MWF.FCElcontainer = n ...@@ -247,7 +247,17 @@ MWF.xApplication.process.FormDesigner.Module.Elcontainer = MWF.FCElcontainer = n
}, },
_mountVueApp: function(callback){ _mountVueApp: function(callback){
if (!this.vueApp) this.vueApp = this._createVueExtend(callback); if (!this.vueApp) this.vueApp = this._createVueExtend(callback);
this.vm = new Vue(this.vueApp).$mount(this.node); try{
this.vm = new Vue(this.vueApp);
this.vm.$o2module = this;
this.vm.$o2callback = callback;
this.vm.$mount(this.node);
}catch(e){
this.node.store("module", this);
this._loadVueCss();
if (callback) callback();
}
}, },
_createVueExtend: function(callback){ _createVueExtend: function(callback){
var _self = this; var _self = this;
......
...@@ -38,6 +38,15 @@ ...@@ -38,6 +38,15 @@
"-webkit-user-select": "none", "-webkit-user-select": "none",
"-moz-user-select": "none", "-moz-user-select": "none",
"opacity": 1 "opacity": 1
},
"moduleNodeError": {
"border": "1px dashed #333",
"min-height": "30px",
"cursor": "pointer",
"margin": "3px 3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"opacity": 1
} }
} }
...@@ -43,6 +43,22 @@ ...@@ -43,6 +43,22 @@
"opacity": 1, "opacity": 1,
"font-size": "16px", "font-size": "16px",
"display": "inline-block" "display": "inline-block"
},
"moduleNodeError": {
"border": "1px dashed #333",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"font-size": "16px",
"display": "inline-block",
"width": "40px",
"height": "40px"
} }
} }
...@@ -31,10 +31,29 @@ ...@@ -31,10 +31,29 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
......
...@@ -31,10 +31,29 @@ ...@@ -31,10 +31,29 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
......
...@@ -42,6 +42,22 @@ ...@@ -42,6 +42,22 @@
"opacity": 1, "opacity": 1,
"padding": "0 3px", "padding": "0 3px",
"display": "inline-block" "display": "inline-block"
},
"moduleNodeError": {
"border": "1px dashed #999",
"cursor": "pointer",
"overflow": "hidden",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"padding": "0 3px",
"display": "inline-block",
"height": "40px",
"width": "100px"
} }
} }
...@@ -44,6 +44,27 @@ ...@@ -44,6 +44,27 @@
"top": "auto", "top": "auto",
"left": "auto", "left": "auto",
"opacity": 1, "opacity": 1,
"height": "auto",
"width": "auto",
"display": "inline-block"
},
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "200px",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block" "display": "inline-block"
}, },
"buttonIcon": { "buttonIcon": {
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
"border-radius": "5px", "border-radius": "5px",
"border-top": "1px dashed #999", "border-top": "1px dashed #999",
"border-left": "1px dashed #999", "border-left": "1px dashed #999",
"border-right": "1px dashed #333", "border-right": "1px dashed #999",
"border-bottom": "1px dashed #333", "border-bottom": "1px dashed #999",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
...@@ -43,6 +43,23 @@ ...@@ -43,6 +43,23 @@
"left": "auto", "left": "auto",
"opacity": 1, "opacity": 1,
}, },
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"height": "40px"
},
"buttonIcon": { "buttonIcon": {
"height": "26px", "height": "26px",
"cursor": "pointer", "cursor": "pointer",
......
...@@ -31,10 +31,29 @@ ...@@ -31,10 +31,29 @@
}, },
"moduleNode": { "moduleNode": {
"border-radius": "100px", "border-radius": "100px",
"border-top": "1px solid #999", "border-top": "1px dashed #999",
"border-left": "1px solid #999", "border-left": "1px dashed #999",
"border-right": "1px solid #333", "border-right": "1px dashed #999",
"border-bottom": "1px solid #333", "border-bottom": "1px dashed #999",
"overflow": "hidden",
"cursor": "pointer",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"top": "auto",
"left": "auto",
"opacity": 1,
"display": "inline-block"
},
"moduleNodeError": {
"border-radius": "5px",
"border-top": "1px dashed #999",
"border-left": "1px dashed #999",
"border-right": "1px dashed #999",
"border-bottom": "1px dashed #999",
"height": "40px",
"width": "80px",
"overflow": "hidden", "overflow": "hidden",
"cursor": "pointer", "cursor": "pointer",
"margin": "3px", "margin": "3px",
......
...@@ -1065,7 +1065,7 @@ MWF.xApplication.process.FormDesigner.LP = { ...@@ -1065,7 +1065,7 @@ MWF.xApplication.process.FormDesigner.LP = {
"noDataText": "无数据文本", "noDataText": "无数据文本",
"loadingText": "加载中文本", "loadingText": "加载中文本",
"remoteMethod": "远程搜索方法", "remoteMethod": "远程搜索方法",
"multipleLimit": "最多可", "multipleLimit": "最多可",
"max": "最大值", "max": "最大值",
"min": "最小值", "min": "最小值",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册