Socket
Socket
Sign inDemoInstall

v-page

Package Overview
Dependencies
21
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    v-page

A simple pagination bar


Version published
Maintainers
1
Install size
13.7 MB
Created

Changelog

Source

3.0.0 (2023-09-11)

  • Complete .d.ts document default slot content
  • Optimize component styles
  • The component default language is changed from cn to en
  • The module name exported by the component is changed from Page to PaginationBar

Readme

Source

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

v-page

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')

You can also 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>
import { ref } from 'vue'
import { PaginationBar } from 'v-page'
// set default page to 3
const pageNumber = ref(3)
const totalRow = ref(100)
// respond for pagination change
function paginationChange (data) {
  console.log(data) // { pageNumber: 1, pageSize: 10 }
}
</script>

Keywords

FAQs

Last updated on 11 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc