Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saurssaurav/pagination-js-vue

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saurssaurav/pagination-js-vue - npm Package Compare versions

Comparing version 0.0.2-dev.0 to 1.0.0-dev.0

12

./lib/index.js

@@ -1,2 +0,2 @@

import { defineComponent as P, computed as C, openBlock as u, createElementBlock as l, createElementVNode as c, Fragment as d, renderList as f, normalizeClass as _, toDisplayString as m } from "vue";
import { defineComponent as P, computed as C, openBlock as u, createElementBlock as l, createElementVNode as p, Fragment as d, renderList as f, normalizeClass as _, toDisplayString as m } from "vue";
const v = (o, e) => o - e, k = (o, e) => o + e + 1, h = (o) => {

@@ -33,12 +33,12 @@ const e = [], { currentPage: r, pageSidesToCurrentPage: a, totalPage: i } = o, g = v(r, a), t = k(r, a);

return (t, n) => (u(), l("div", S, [
c("div", {
class: "pagination__page",
p("div", {
class: "pagination__page pagination__page--first",
onClick: n[0] || (n[0] = (s) => a(t.currentPage - 1))
}, "<"),
(u(!0), l(d, null, f(g.value, (s, p) => (u(), l("div", {
key: p,
(u(!0), l(d, null, f(g.value, (s, c) => (u(), l("div", {
key: c,
class: _(["pagination__page", { "pagination__page--active": i(s) }]),
onClick: (E) => a(s)
}, m(s), 11, T))), 128)),
c("div", {
p("div", {
class: "pagination__page",

@@ -45,0 +45,0 @@ onClick: n[1] || (n[1] = (s) => a(t.currentPage + 1))

@@ -1,2 +0,2 @@

import { defineComponent as P, computed as C, openBlock as u, createElementBlock as l, createElementVNode as c, Fragment as d, renderList as f, normalizeClass as _, toDisplayString as m } from "vue";
import { defineComponent as P, computed as C, openBlock as u, createElementBlock as l, createElementVNode as p, Fragment as d, renderList as f, normalizeClass as _, toDisplayString as m } from "vue";
const v = (o, e) => o - e, k = (o, e) => o + e + 1, h = (o) => {

@@ -33,12 +33,12 @@ const e = [], { currentPage: r, pageSidesToCurrentPage: a, totalPage: i } = o, g = v(r, a), t = k(r, a);

return (t, n) => (u(), l("div", S, [
c("div", {
class: "pagination__page",
p("div", {
class: "pagination__page pagination__page--first",
onClick: n[0] || (n[0] = (s) => a(t.currentPage - 1))
}, "<"),
(u(!0), l(d, null, f(g.value, (s, p) => (u(), l("div", {
key: p,
(u(!0), l(d, null, f(g.value, (s, c) => (u(), l("div", {
key: c,
class: _(["pagination__page", { "pagination__page--active": i(s) }]),
onClick: (E) => a(s)
}, m(s), 11, T))), 128)),
c("div", {
p("div", {
class: "pagination__page",

@@ -45,0 +45,0 @@ onClick: n[1] || (n[1] = (s) => a(t.currentPage + 1))

{
"name": "@saurssaurav/pagination-js-vue",
"version": "0.0.2-dev.0",
"version": "1.0.0-dev.0",
"description": "Simple pagination package for vue js",

@@ -26,3 +26,3 @@ "author": "isaurssaurav <saurssaurav33@gmail.com>",

"dependencies": {
"@saurssaurav/pagination-js-core": "^0.0.2-dev.0",
"@saurssaurav/pagination-js-core": "^1.0.0-dev.0",
"vue": "^3.3.4"

@@ -36,3 +36,3 @@ },

},
"gitHead": "53a524045f2c8099955bbc015742fc47763f93c9"
"gitHead": "cdfba03ec3da5d2385d6b064ebe1335234d637d7"
}

@@ -1,11 +0,46 @@

# `vue`
# Pagination Vue
> TODO: description
Simple and light weight pagination for vue.
![image](https://raw.githubusercontent.com/isaurssaurav/pagination-js/tree/main/packages/vue/image.png)
## Installation
```
$ npm i @saurssaurav/pagination-js-vue
```
## Usage
```js
<script setup lang="ts">
import { ref } from 'vue';
import PaginationTest from '@saurssaurav/pagination-js-vue';
import '@saurssaurav/pagination-js-core/style.css'; // import default pagination css
const currentPage = ref(1);
const onChange = (page) => {
currentPage.value = page;
};
</script>
<template>
<pagination-test
:totalPage=10
:pageSidesToCurrentPage=2
:currentPage="currentPage"
@onChangeCurrentPage="onChange"
></pagination-test>
</template>
```
const vue = require('vue');
// TODO: DEMONSTRATE API
```
## Props
| Name | Type | Default | Description |
| ------------------------ | -------- | ------- | -------------------------------------------------------------------- |
| `totalSize` | Number | | **Required.** Total data size |
| `currentPage` | Number | | **Required.** Active page number |
| `onChangeCurrentPage` | Function | | **Required.** Page change handler. Receive current pageNumber as arg |
| `pageSidesToCurrentPage` | Number | | **Required.** Neighbouring pages to active page |

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc