Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Vue component for create a tiny pagination with Flexbox

License

NotificationsYou must be signed in to change notification settings

coderdiaz/vue-tiny-pagination

Repository files navigation

A Vue component for create a tiny paginate with Flexbox

Install/Usage

# Install with npm$ npm i -S vue-tiny-pagination# or yarn$ yarn add vue-tiny-pagination
<divid="app"><tiny-pagination:total="currentTotal"@tiny:change-page="changePage"/></div>

You can useLocal Registration:

import{TinyPagination}from'vue-tiny-pagination';newVue({el:'#app',data(){return{currentTotal:100,currentPage:1,};},methods:{changePage(pagination){this.currentPage=pagination.page;},},components:{    TinyPagination,},});

orGlobal Registration:

importTinyPaginationfrom'vue-tiny-pagination';Vue.use(TinyPagination);// or with a custom component nameimport{TinyPagination}from'vue-tiny-pagination';Vue.component('custom-name',TinyPagination);

Usage in browser

In browser you can use Unpkg, Jsdelivr, CDN.js, etc.

# Unpkghttps://unpkg.com/vue-tiny-pagination@latest/dist/vue-tiny-pagination.js# JSDelivrhttps://cdn.jsdelivr.net/npm/vue-tiny-pagination@latest/dist/vue-tiny-pagination.min.js

Documentation

Props

NameDescriptionTypeDefaultRequired
totalA number of total itemsNumber-true
pageProp to set a default pageNumber1false
langDefault language to show (Available: en, es)Stringenfalse
customClassProp to set a custom class.String""false
limitsProp to set a default limits to page sizes.Array[10, 15, 20,50,100]false
showLimitProp to disable the limit selectorBooleantruefalse

Events

EventDescription
tiny:change-pageGet the current page from paginationpayload: { page: 1 }
tiny:change-limitGet the current limit from paginationpayload: { limit: 1 }

Community

All feedback and suggestions are welcome!

License

This is a open-source software licensed under theMIT license

About

A Vue component for create a tiny pagination with Flexbox

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp