1.0.19 • Published 5 years ago

lb-vue-pagination v1.0.19

Weekly downloads
22
License
GNU
Repository
gitlab
Last release
5 years ago

Screenshot

Description

Install

npm install lb-vue-pagination --save

Include plugin in your main.js file.

import Vue from 'vue'
import lbVuePagination from 'lb-vue-pagination';
Vue.component('lb-vue-pagination', lbVuePagination);

Using

template code

<template>
    <lb-vue-pagination v-model="pagination" :total-count="totalCount" search-placeholder="Search" items-placeholder="Items per page"></lb-vue-pagination>
</template>

script code

export default {
    data(){
        return {
            totalCount: 300,
            pagination: {
                query: '',
                currentPage: 1,
                limit: 20,
                initialId: [],
                searchTimeout: false
            }
        }
    },
    watch:
    {
        'pagination.query'(query)
        {
            //when someone queries, do the store reload here
        },
        'pagination.currentPage'(page)
        {
            //when someone changes the page, do the store reload here
        }
    }
};

Available settings

PropertyTypeRequiredDescription
totalCountint*Total count of all records for a pagination results
value (v-model)object*Object in form as descripbed in example
searchPlaceholderstringPlaceholder for search, if using vue-i18n it will use key 'SEARCH', if omited will use "Search"
itemsPlaceholderstringPlaceholder for items per page selector, if using vue-i18n it will use key 'ITEMSPERPAGE', if omited, will use "Items per page"

1.0.19

5 years ago

1.0.18

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago