sencha > 下拉加载更多

view 里面的

Ext.define('Sencha.view.IndexList', {
    extend: 'Ext.List',	
    xtype: 'index_list_xx',
    requires: ['Sencha.store.IndexListST'],  
       
    config: {    
    	//load more plugin  start----
        plugins: [
        	/*
            {
                xclass: 'Ext.plugin.PullRefresh',
                pullRefreshText: '松开手加载更多...'
            },
            */
            {
                xclass: 'Ext.plugin.ListPaging',
                autoPaging: true,
                loadMoreText:'下拉加载更多...'
                
            }
        ],    	
        //load more plugin  end----
			scrollable:true,
        title: 'American XX',  
        itemTpl: '{pic} ___ {name}',   
        store: 'IndexListST',    
    } 
});

store:

Ext.define('Sencha.store.IndexListST', {
    extend: 'Ext.data.Store', //继承
    config: {
        fields: ['pic', 'title'],
		autoLoad: true,
        proxy: {
            type: 'ajax',
            url: 'http://192.168.1.199/duduke/json/1.php?type=index_list',
            extraParams: {
                apikey: '8a341f85c657435989e75c9a83294762',
                per_page: 'all'
            }   
        }        

    }
});

猜你喜欢

转载自mft.iteye.com/blog/1965780
今日推荐