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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-pagination-mini

v1.0.0

Published

A simple Vue component to pagination

Downloads

3

Readme

vue-pagination-mini

Installation

npm install --save vue-pagination-mini

Example

<template>
  <div id="app">
    <vue-pagination
      :total="55"
      :page-size="13"
      :current-page="1"
      :show-total="true"
      :show-sizes="true"
      :show-jump="true"
      @current-change="currentChange"
      @size-change="sizeChange">
    </vue-pagination>
  </div>
</template>

<script>
import VuePagination from '../dist/vue-pagination.min.js'

export default {
  name: 'App',
  components: {
    VuePagination
  },
  methods: {
    currentChange (val) {
      console.log(`current page is ${val}`);
      console.log(`当前页 ${val}`);
    },
    sizeChange (val) {
      console.log(`pageSize is ${val}`);
      console.log(`每页的大小 ${val}`);
    }
  }
}
</script>

Props

| Name | Type | Default | optional | Description | :------------ | :--------| :-------| :--------| :----------- | total | Number | 1 | | The total number of data (required) | pageSize | Number | 10 | | The number of bars displayed per page (required) | currentPage | Number | 1 | | Current page (required) | showTotal | Boolean | false | | Displays the attributes of the total number | showSizes | Boolean | false | | Displays properties that change the size of each page | showJump | Boolean | false | | Displays the properties of the current page jump | preText | String | | | The text inside the front page button | nextText | Boolean | false | | The text inside the back page button | step | Number | 5 | | Quick page turning step | color | String | #428bca | | Theme colors | size | String | small | small/middle/large | Component size | pageSizes | Array | [10, 20, 30, 50] | | The number of optional values per page.

Events

| Name | Callback | Description | :-------------------| :-----------------------------| :---------- | size-change | Size per page | PageSize is triggered when it changes. | current-change | The current page currentPage | The currentPage change will trigger.

Props

| 名称 | 类型 | 默认值 | 可选值 | 描述 | :------------ | :--------| :-------| :--------| :----------- | total | Number | 1 | | 数据总数 (必填) | pageSize | Number | 10 | | 每页显示的数量 (必填) | currentPage | Number | 1 | | 当前的页数 (必填) | showTotal | Boolean | false | | 显示总数的属性 | showSizes | Boolean | false | | 显示每页大小的属性 | showJump | Boolean | false | | 显示跳转的属性 | preText | String | | | 向前翻页按钮内的文本 | nextText | Boolean | false | | 向后翻页按钮内的文本 | step | Number | 5 | | 快速翻页的步长 | color | String | #428bca | | 主题颜色 | size | String | small | small/middle/large | 组件的尺寸大小 | pageSizes | Array | [10, 20, 30, 50] | | 每页显示个数选择器的选项设置

Events

| Name | Callback | Description | :-------------------| :-----------------------------| :---------- | size-change | 每页条数size | pageSize 改变时会触发 | current-change | 当前页currentPage | currentPage 改变时会触发