|
楼主 |
发表于 2017-8-3 15:19:58
|
显示全部楼层
你说的是采用第一种或者第二种动态创建组件的方式,那我采用第三种如何去控制可折叠呢?
顺便问问这样动态生成的input如何设置为日期组件来使用,format该如何加?金额类型如何加"format"="0,000.00"
以下是我的代码
var parentNode = this.getElementByXid('content1');
var targetElement = this.getElementByXid('row4');
this.i++;
var group=$('<div component="$UI/system/components/justep/controlGroup/controlGroup" class="x-control-group mycontrol" title="标题('+this.i+')" collapsible="true" style="border:0;padding:0;margin:0px;background:#fff;width:100%; border-bottom:1px #eaeff3 solid;">'+
'<div class="x-control-group-title"style="font-size:14px; padding-top:0px;padding-bottom:0px;">'+
' <span>标题('+this.i+')</span></div>'+
'<div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label30 mydate" >'+
'<label class="x-label">开始日期</label>'+
'<input component="$UI/system/components/justep/input/input" class="form-control x-edit mydate" style="background-color:#fff;" format:"yyyy-MM-dd",></input></div> '+
'<div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label30">'+
'<label class="x-label">结束日期</label>'+
'<input component="$UI/system/components/justep/input/input" class="form-control x-edit mydate" style="background-color:#fff;" format:"yyyy-MM-dd",></input></div></div>');
justep.Bind.addNode(parentNode,group[0],targetElement); |
|