Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Kenshin/as-pagination

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Kenshin/as-pagination

  • v0.0.0-20120515032647-b71b8e1fb84e
  • Source
  • Go
  • Socket score

Version published
Created
Source

##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]

  • 适合任意Flash Player 10.x+
  • 支持复杂分页

联系方式:

版权和许可:

Copyright 2012 k-zone.cn
Licensed under MIT or GPL Version 2 licenses

FAQs

Package last updated on 15 May 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc