Browse Source

数据网格中多行文本的显示问题

huqi 5 years ago
parent
commit
e1d3552607

+ 7 - 1
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -720,7 +720,13 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
                     if( module.json.type == "ImageClipper" ){
                     if( module.json.type == "ImageClipper" ){
                         this._createImage( cell, module, data.text );
                         this._createImage( cell, module, data.text );
                     }else{
                     }else{
-                        cell.set("text", data.text.join(", "));
+                        var text = this._getValueText(idx, data.text.join(", "));
+                        if( module.json.type == "Textarea"){
+                            cell.set("html", text);
+                        }else{
+                            cell.set("text", text);
+                        }
+                        //cell.set("text", data.text.join(", "));
                     }
                     }
                 }
                 }
             }else{
             }else{

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

@@ -479,7 +479,8 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 						}
 						}
 					}
 					}
 				}else{
 				}else{
-					this._createNewEditTd(newTr, idx, editorTds[idx].get("id"), data.text.join(", "), titleThs.length-1);
+					var text = this._getValueText(idx-1, data.text.join(", "));
+					this._createNewEditTd(newTr, idx, editorTds[idx].get("id"), text, titleThs.length-1);
 				}
 				}
 			}else{
 			}else{
 				if (!cell) this._createNewEditTd(newTr, idx, id, "", titleThs.length-1);
 				if (!cell) this._createNewEditTd(newTr, idx, id, "", titleThs.length-1);