如何将xtype: 'selectfield‘放到var定义的对象里

var selectItem=new Ext.form.Select({
		 //xtype: 'selectfield',
					id:'chooseIndexChart',
                    name: 'chartType',
                    options: [
                        {text: 'Line',  value: 'line'},
                        {text: 'Bar', value: 'bar'},
						{text: 'Pie',value:'pie'},
						{text: 'Scatter',value:'scatter'},
						{text:'Area',value:'area'}
                    ],
					listeners: {
                            change: {
							 fn: function(){ 
									//lineChart.hide();	
									chageIndexChart(this.getValue());
								}
                            }
						}
	});

你可能感兴趣的:(function)