Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
github.com/Kenshin/as-pagination
##Pagination Actionscript 3.0 Library 基于ActionScript 3.0的分页逻辑
引入:
add page4as3lib-1.0.swc to libs folder
或者:
add com\ksria\as3\pagination\ to src folder
使用:
import com.ksria.as3.pagination.core.Pagination; import com.ksria.as3.pagination.vo.PaginationVO; total : 总数 page : 当前页 pagesize : 每页包含的内容 offset : 偏移量(例如1 2 3 4 5 6,点击6时,产生4 5 6 7 8 9,而非 7 8 9 10 11 12) length : 例如 上一页 2 3 4 5 6 下一页,则步长为5 var pv : PaginationVO = Pagination.build( total, page, pagesize, offset, length );
计算后结果:
pv.total //总数 pv.page //当前页 pv.pagesize //每页的内容数 pv.lastpage //最后一页 pv.loopcount //共计多少分页 pv.previous //前一页 pv.next //后一页 pv.isprevious //是否显示前一页 pv.isnext //是否显示后一页 pv.begin //开始 pv.end //结束 pv.length //原始的步长(即传入的参数,也是begin -> end时的步长) pv.step //步长(真实的步长) pv.isforward //是否可以前进,指">>" pv.isback //是否可以后退,指"<<" pv.forward //前进到第几页 pv.back //后退到第几页 pv.offset //偏移量
Node.js 版:https://github.com/kenshin/node-pagination
Javascrip版:https://github.com/kenshin/js-pagination
version 1.0 [2011-01-08]
Copyright 2012 k-zone.cn
Licensed under MIT or GPL Version 2 licenses
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.