extjs virtual store不触发load,before等事件

这些事件虽然原生store中可以正常使用,而且virtual store的api文档中也写有这些事件,但在代码中不生效。

我的版本是extjs 6.5.3 modern toolkit.

测试代码

        deal: {
            autoLoad: true,
            type: 'virtual',
            model: 'EPMMS.model.Deal',
            proxy: {
                type: 'ajax',
                url: 'deal/index',
                //extraParams:{isVerifyType:1},
                reader: {
                    type: 'json',
                    rootProperty: 'deal.data',
                    totalProperty: 'deal.totalItemCount',
                }
            },
            listeners: {
                load: function (thisStore, records, successful) {
                    console.log('load deal');
/*                    records.map(function (rec) {
                        console.log(rec);
                    });*/
                }
            },
        }

猜你喜欢

转载自haohetao.iteye.com/blog/2414850