3.2.1 • Published 9 months ago

v-page v3.2.1

Weekly downloads
366
License
MIT
Repository
github
Last release
9 months ago

v-page · CircleCI code coverage npm version license npm download JavaScript Style Guide

A simple pagination bar for vue3, including size Menu, i18n support features

If you are using vue 2.x version, please use v-page 2.x version instead

Examples and Documentation

Documentation and examples and please visit below sites

Installation

https://nodei.co/npm/v-page.png?downloads=true&downloadRank=true&stars=true

# npm
npm i v-page
# yarn
yarn add v-page
# pnpm
pnpm add v-page

Include and install plugin in your main.js file

import { createApp } from 'vue'
import App from './app.vue'
import { PaginationBar } from 'v-page'

const app = createApp(App)
// install component globally
app.use(PaginationBar, {
  // globally config options
})
app.mount('#app')

Use v-page as a locally component

<template>
  <PaginationBar />
</template>

<script setup>
import { PaginationBar } from 'v-page'
</script>

Usage

<template>
  <PaginationBar
    v-model="pageNumber"
    :total-row="totalRow"
    @change="paginationChange"
  />
</template>

<script setup lang='ts'>
import { ref } from 'vue'
import { PaginationBar } from 'v-page'
import type { PageInfo } from 'v-page'
// set default page to 3
const pageNumber = ref<number>(3)
const totalRow = ref<number>(100)
// respond for pagination change
function paginationChange (data: PageInfo): void {
  console.log(data) // { pageNumber: 1, pageSize: 10, totalPage: 10 }
}
</script>
3.2.1

9 months ago

3.2.0

9 months ago

3.1.0

1 year ago

3.0.0-beta.3

2 years ago

3.0.0-beta.4

2 years ago

3.0.0

2 years ago

3.0.0-beta.2

2 years ago

3.0.0-beta.1

3 years ago

2.1.0

3 years ago

2.0.10

4 years ago

2.0.9

5 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago