SHARE
TWEET

Untitled

a guest Aug 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 本地分页函数
  2. export function getPaginationData(page: number = 1, pageSize: number = 20, data: any[] = []) {
  3.   const offset = (page - 1) * pageSize;
  4.   const total = data.length;
  5.   return (offset + pageSize >= total) ? data.slice(offset, total) : data.slice(offset, offset + pageSize);
  6. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top