修复分页问题

This commit is contained in:
liaoxuezhi 2019-10-09 15:18:08 +08:00
parent f4d8e175f6
commit 0c7a7704be

View File

@ -135,8 +135,10 @@ export const CRUDStore = ServiceStore.named('CRUDStore')
const data = { const data = {
...self.data, ...self.data,
total: items.length,
items: items.slice((self.page - 1) * self.perPage, self.page * self.perPage) items: items.slice((self.page - 1) * self.perPage, self.page * self.perPage)
}; };
self.total = parseInt(data.total || data.count, 10) || 0;
self.reInitData(data); self.reInitData(data);
return; return;
} }