Extjs5 Store按照指定的字段排序

/**
 * Created by NULL on 2016/2/24.
 * 审核日志
 */
Ext.define('App.store.common.AuditLogStore', {
    extend: 'Ext.data.Store',
    model: 'App.model.common.AuditLogModel',
    pageSize: Global.size,
    proxy: {
        type: 'ajax',
        actionMethods: {read: 'get' },
        url: Global.context +"/common/audit-log",
        reader: {
            type: 'json',
            totalProperty: 'totalCount',
            rootProperty: 'data'
        }
    },
    autoLoad: true,
    remoteSort:true,
    sorters:[
        {property:'createTime',direction:'DESC' }
    ]

});

相关推荐