Просмотр исходного кода

修复组件被隐藏,组件图标的高度为0的问题

unknown 5 лет назад
Родитель
Сommit
58bee6f171

+ 1 - 1
o2web/source/x_component_process_Xform/Org.js

@@ -923,7 +923,7 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null ){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_process_Xform/Orgfield.js

@@ -581,7 +581,7 @@ MWF.xApplication.process.Xform.Orgfield = MWF.APPOrgfield =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null ){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_process_Xform/Personfield.js

@@ -887,7 +887,7 @@ MWF.xApplication.process.Xform.Personfield = MWF.APPPersonfield =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null ){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }