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

vue3-pagin8

v1.0.0

Published

Vue pagination using beautiful and simple methods

Downloads

26

Readme

Vue Pagin8

telegram-cloud-photo-size-4-6023883429155814448-m telegram-cloud-photo-size-4-6023883429155814449-m telegram-cloud-photo-size-4-6023883429155814450-m telegram-cloud-photo-size-4-6023883429155814451-m telegram-cloud-photo-size-4-6023883429155814452-m telegram-cloud-photo-size-4-6023883429155814453-m telegram-cloud-photo-size-4-6023883429155814454-m telegram-cloud-photo-size-4-6026135228969500601-m

Simple and bautiful Vue 3 pagination component (Vue 2 Here)

This pagination component can be used by client which changes the page with arrows or input

this project will be completed with new features and more styles in the future.

you can contribute in this project using the github repository.

Installation

for install vue3-pagin8 you must run the following command in your command-line:

npm install vue3-pagin8

Demo

You can see demo Here

Import Component-level

You should just import the component and use it.

<template>
  <div>
    <!-- Your Other Codes -->
    <!-- When triggering currentPage event, you should call your backend api to get $event page that shows the selected page by client -->
    <Paginate 
    :initPage="1" 
    :totalPages="totalPage" 
    @currentPage="callApiToGetOtherPage($event)"
    :color="red"
    >
    </Paginate>

    <!-- Your Other Codes -->
  </div>
</template>

<script>
import Paginate from "vue3-pagin8";

export default {
data(){
    return{
        initPage:1,
        totalPages:1, // From backend
    }
}
// Your Other Codes
  components: {
    Paginate,
  },
// Your Other Codes
};
</script>

Import Globally

You should just import vue3-pagin8 on main.js file in root directory of your project:

import Vue from 'vue'
// Your other imports
import Paginate from 'vue3-pagin8'
// ...
Vue.component('Paginate', Paginate)
// ...

Props and Events

Props:

| Property | Usage | Accepted Value | | -------- | -------- | -------- | | :initPage | Pagination starts with which page | 1,2,3,.. | | :totalPages | How many pages exist in your document that you are paginating | 1,2,3,..| | :color | Your selected color depends on your UI |'green','red','orange','blue','gray','purple','dark'|

Events:

| Event | Usage | Parameters | | -------- | -------- | -------- | | @currentPage | This event has been triggered when client changes the page number after it's been triggered you must pass the $event value to the client | @currentPage(yourApiCall($event)) $event shows the page that client selected. | reset | This event is used in specific cases, when you want to use component in a single page and reset it when v-if changes, you must define ref property (<Paginate ref="pagin8" />) for component and access to the function with it. (this.$refs.pagin8.reset()) in script part or ($refs.pagin8.reset()) in html | null |