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

dt-vue-pagination

v1.1.3

Published

Customized fork of vuejs-dt-pagination that allows pass custom href's to paginator pages

Downloads

7

Readme

vuejs-uib-pagination

Best and complete pagination plugin for Vue.js 2.0. Inspired in Angular Bootstrap Pagination.

Not Using Bootstrap?

No problem! The plugin template is not 100% Bootstrap dependent, that is why you can build your own styles for your pagination!

Demo

Click here.

Installation

$ npm install vuejs-uib-pagination

Quick Start

Global:

<script src="node_modules/vue/dist/vue.js"></script>
<script src="node_modules/vuejs-uib-pagination/dist/vuejs-uib-pagination.js"></script>

CommonJS:

var Vue = require("vue");
var pagination = require("vuejs-uib-pagination");

Vue.use(pagination);

ES2015:

import * as Vue from "vue";
import pagination from "vuejs-uib-pagination";

Vue.use(pagination);

Use

HTML:

<div id="app">
    <div is="uib-pagination" v-model="pagination" :total-items="22"></div>
    <!-- or -->
    <uib-pagination v-model="pagination" :total-items="22"></uib-pagination>
</div>

Script:

var app = new Vue({
    el: "#app",
    data: {
        pagination: { }
    }
});

Settings

The settings are almost the same as Angular Bootstrap Pagination, there are only 3 differences:

  • v-model is an object and has these keys:
  • page-label does not accept expressions, it works with functions.
  • template-url is not supported.

boundary-links

(Default: false) - Whether to display First / Last buttons.

<div is="uib-pagination" v-model="pagination" :boundary-links="false"></div>

boundary-link-numbers

(Default: false) - Whether to always display the first and last page numbers. If max-size is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary. NOTE: max-size refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential.

<div is="uib-pagination" v-model="pagination" :boundary-link-numbers="false"></div>

direction-links

(Default: true) - Whether to display Previous / Next buttons.

<div is="uib-pagination" v-model="pagination" :direction-links="true"></div>

first-text

(Default: First) - Text for First button.

<div is="uib-pagination" v-model="pagination" first-text="First"></div>

force-ellipses

(Default: false) - Also displays ellipses when rotate is true and max-size is smaller than the number of pages.

<div is="uib-pagination" v-model="pagination" :force-ellipses="false"></div>

items-per-page

(Default: 10) - Maximum number of items per page. A value less than one indicates all items on one page.

<div is="uib-pagination" v-model="pagination" :items-per-page="10"></div>

last-text

(Default: Last) - Text for Last button.

<div is="uib-pagination" v-model="pagination" last-text="Last"></div>

max-size

(Default: null) - Limit number for pagination size.

<div is="uib-pagination" v-model="pagination" :max-size="7"></div>

next-text

(Default: Next) - Text for Next button.

<div is="uib-pagination" v-model="pagination" next-text="Next"></div>

change

This can be used to call a function whenever the page changes.

<div is="uib-pagination" v-model="pagination" @change="someFunction"></div>

disabled

(Default: false) - Used to disable the pagination component.

<div is="uib-pagination" v-model="pagination" :disabled="false"></div>

v-model

(Required)

  • pagination (Default: 1) - Current page number. First page is 1.
  • numPages (Readonly) - Total number of pages to display.
<div is="uib-pagination" v-model="pagination"></div>

page-label

(Default: identity) - Override the page label based on passing the current page indexes. Supports page number with a paramenter.

<div is="uib-pagination" v-model="pagination" :page-label="someFunction"></div>

previous-text

(Default: Previous) - Text for Previous button.

<div is="uib-pagination" v-model="pagination" previous-text="Previous"></div>

rotate

(Default: true) - Whether to keep current page in the middle of the visible ones.

<div is="uib-pagination" v-model="pagination" :rotate="true"></div>

total-items

Total number of items in all pages.

<div is="uib-pagination" v-model="pagination" :total-items="72"></div>

Inspiration

Give people comming from Angular.js major facility to use pagination.

License

MIT