webix-jet datatable page 通用参数和返回值处理


webix.proxy.page = { $proxy: true, load: function(view, params) { params=params||{start:0,count:view.config.datafetch}; params.current=(params.start/params.count)+1; params.size=params.count; delete params.start; delete params.count; var r= webix.ajax().sync().get(this.source, params).response; var result={}; var data=JSON.parse(r).data; result.data=data.records; result.pos=(data.current-1)*data.size; result.total_count=data.total; return result; } };