Ext JS是一个基于JavaScript和Html5的Web应用程序框架。 我喜欢将radiogroup列添加到交换机类型列表,案例陈述。 即使使用Alexander.Berg的组件对我也没用
column : function(type , attribs){
var me = this;
var xtype = 'textfield';
var attribs = attribs || {};
var def = {}
switch(type){
case 'id':
xtype = 'numberfield';
def.sortable = false;
def.hidden = true ;
def.hideable = false;
def.allowBlank = true;
break;
case 'readonly':
def.editor = false;
def.flex = 1;
def.sortable = true;
def.allowBlank = true;
def.width = 75;
def.field = {
typeAhead : true,
triggerAction : 'all',
selectOnTab : true,
lazyRender : true,
listClass : 'x-combo-list-small'
}
break;
...
build Columns : function(fields){
var me = this ;
var counter = fields.length();
//zero is false
Ext.each(fields ,function(field){
console.log(field);
fields[counter++] = me.column(field.type||'text' ,field);
});
//console.log(fields);
return fields
}