Sencha Touch開發入門2

1.函數的加載html

Ext.application({
    name: 'Sencha',


    launch: function () {
app

//代碼略函數

                                      }性能

                              });spa


2.組件的建立。有兩種方式:create和new。htm

var panel=Ext.create('Ext.Panel',{//代碼略it

                                  });io


var panel=new Ext.Panel({ //代碼略function

                                  });配置

3.添加組件也有兩種方式:xtype和create

//實例1

{

id:'newPanel',

xtype:'panel',

title:'面板',

html:'<p>面板</p>'

}

//實例2

Ext.create('Ext.Panel',{

id:'newPanel',

title:'面板',

html:'<p>面板</p>'

});

使用xtype配置選項建立組件的最大好處在於可使用組件的延遲渲染的特性,提升程序性能。

相關文章
相關標籤/搜索