huqi 5 лет назад
Родитель
Сommit
8a5b395bfe

+ 9 - 2
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -1321,8 +1321,15 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
         }.bind(this));
     },
     _afterLoaded: function(){
-        this._loadDatagridStyle();
-        if (this.table) this.table.setStyle("display", "none");
+        if (this.moduleValueAG){
+            this.moduleValueAG.then(function(){
+                this._loadDatagridStyle();
+                if (this.table) this.table.setStyle("display", "none");
+            }.bind(this));
+        }else{
+            this._loadDatagridStyle();
+            if (this.table) this.table.setStyle("display", "none");
+        }
     },
     resetData: function(){
         this.setData(this._getValue());

+ 7 - 2
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -934,7 +934,6 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 		this._loadBorderStyle();
 		this._loadZebraStyle();
 		this._loadSequence();
-
 	},
 	loadGridEditStyle: function(){
 		if (this.editorTr){
@@ -1106,7 +1105,13 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 		}.bind(this));
 	},
 	_afterLoaded: function(){
-		this._loadDatagridStyle();
+		if (this.moduleValueAG){
+			this.moduleValueAG.then(function(){
+				this._loadDatagridStyle();
+			}.bind(this));
+		}else{
+			this._loadDatagridStyle();
+		}
 	},
 	/**
 	 * 重置组件的值为默认值或置空。