npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

skyeye-vue-component-pagination

v1.0.3

Published

自定义分页组件

Readme

自定义分页组件

通过Vue实现的分页组件,可以自定义每页的个数,支持国际化(中文和英文,后续还会支持更多的国际语言)

参数介绍

leng: 列表的总条数(default:0),
active: 当前正在展示的页(从0开始,按照的是数组的索引,实际展示的页码应该是:active+1)(default:0),
per: 每页展示的个数(default:0),
perList: 每页展示的页码选择数组(default:[10, 20, 30, 40, 50]),
language: 定义使用什么语言展示(default:'chinese')
onPageChange: 切换页码时候的回调函数(default:function(){}),
showPerChoice: 是否展示页面展示条数自定义功能(default: false)

###例子 当前组件js文件中通过下面进行安装,可以自定义组件的名字,默认是skyeye-pagination

这里介绍通过ES6的方式进行安装和使用
通过npm install skyeye-vue-component-pagination
js文件中:import skyeyePagination from 'skyeye-vue-component-pagination'
Vue.use(skyeyePagination, {
    name: 'pagination' 可以自定义
})
定义一个测试数据:data:{
    leng: 99,
    active: 0,
    per: 10,
    perList: [10,15,20,30],
    language: 'english',
    onPageChange: 一个定义在methods里的回调:eg:changePage,
    showPerChoice: true
}
html文件中引用:
<pagination 
    :leng: "data.leng"
    :active: "data.active"
    :per: "data.per"
    :per-list: "data.perList"
    :language: "data.language"
    :on-page-change: changePage
    :show-per-choice: true
></pagination>

安装

如下‘FILE_PATH’代表vue-component-pagination
// 全局
<script src="FILE_PATH"></script>
Vue.use(VuecomponentPagination)

// AMD
define([FILE_PATH], function(VuecomponentPagination){
    Vue.use(VuecomponentPagination)
})
require([FILE_PATH], function(VuecomponentPagination){
    Vue.use(VuecomponentPagination)
})

// CommonJS
var VuecomponentPagination = require(FILE_PATH)
Vue.use(VuecomponentPagination)

// ES6
import VuecomponentPagination from FILE_PATH
Vue.use(VuecomponentPagination)
==可以自定义组件名字Vue.use(VuecomponentPagination, {name: 'ooooo'})==

示例运行

运行环境:node, vue 1.0.14以上
进入项目目录:
   执行npm run start启动服务
   执行npm run dev进入开发模式
然后,直接访问httl://127.0.0.1:3333