0.1.8 • Published 5 years ago

laravel-vue-tailwind-pagination v0.1.8

Weekly downloads
38
License
-
Repository
github
Last release
5 years ago

Vue Test Utils - Jest

Laravel Vue Pagination

A Vue.js pagination component for Laravel thats built for Tailwind.

Requirements

Demo & Docs

See https://laravel-vue-tailwind.github.io/pagination/

Component Installation

npm install laravel-vue-tailwind-pagination

or

yarn add laravel-vue-tailwind-pagination

Register the Plugin

import LaravelVuePagination from 'laravel-vue-tailwind-pagination';

Vue.use(LaravelVuePagination);

Add the following variants to your tailwind.config.js

variants: {
    opacity: ['disabled'],
    cursor: ['disabled'],
},

Basic Example

Pagination.vue

<laravel-vue-tailwind-pagination
    :data="users"
    :showNumbers="true">
</laravel-vue-tailwind-pagination>
export default {
    data() {
        return {
            users: {},
        }
    },
    created() {
        axios.get("http://laravel.test/api/users")
        .then(response => {
            this.users = response.data;
        })
    }
}

API

Pagination Props

NameTypeDefaultDescription
dataObject{}The data from paginated AJAX request
limitNumber1The pagination limit each side of the middle button.
sizeString"default"(optional) Must be default or small or large
showDisabledBooleantrue(optional) Pagination buttons next and previous, do you want them displayed if there is nothing to click?
showNumbersBooleanfalse(optional) Pagination show numbered buttons?

Development

To work on the package locally or to add to the documentation, run the following command:

npm run serve

To run the tests:

npm run test:unit
0.1.8

5 years ago

0.1.2

5 years ago

0.1.7

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago