# vue-list

> A Vue.js component designed to handle common functionality needed when handling lists of data for Laravel

Latest version **1.0.3** (published 2017-06-08) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue-list
pnpm add vue-list
yarn add vue-list
bun add vue-list
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-06-08 |
| First published | 2017-06-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Author | andyleach |
| Maintainers | andyleach |

## Links

- npm: https://www.npmjs.com/package/vue-list
- Repository: https://github.com/andyleach/vue-list
- Homepage: https://github.com/andyleach/vue-list#readme
- Issues: https://github.com/andyleach/vue-list/issues
- npm.io page: https://npm.io/package/vue-list

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.3.3
- [axios](https://npm.io/package/axios.md) ^0.16.1

## Recent versions

- 1.0.3 (latest) — 2017-06-08
- 1.0.2 — 2017-06-08
- 1.0.1 — 2017-06-08
- 1.0.0 — 2017-06-07

## README

# Vue-List
A Vue.js component designed to handle common functionality needed when handling lists of data.

<strong>This is not ready for use in production</strong>
## Setup

### bootstrap.js file
```javascript
/**
 * Vue is a modern JavaScript library for building interactive web interfaces
 * using reactive data binding and reusable components. Vue's API is clean
 * and simple, leaving you to focus on building your next great project.
 */
window.Vue = require('vue/dist/vue.js');

/**
 * We'll load the axios HTTP library which allows us to easily issue requests
 * to our Laravel back-end. This library automatically handles sending the
 * CSRF token as a header based on the value of the "XSRF" token cookie.
 */

window.axios = require('axios');

window.axios.defaults.headers.common = {
    'X-CSRF-TOKEN': window.Laravel.csrfToken,
    'X-Requested-With': 'XMLHttpRequest'
};

Vue.prototype.$http = axios;
```

### app.js
```javascript
var app = new Vue({
    el: '#app',
}).$mount();
```

## Usage In Component
```javascript
    import List from 'vue-list';

    export default {
        mixins: [List],
        mounted() {
            this.fetch(this.url)
        }
    });
```

### Props
| Name | Type   |
|------|--------|
| url  | String |

### Data
| Name       | Type   |
|------------|--------|
| items      | Array  |
| pagination | Object |

### Available Methods
| Methods          | Parameters | Events Fired                  |
|------------------|------------|-------------------------------|
| fetch            | url        | fetch:success, fetch:failed   |
| store            | item, url  | store:success, store:failed   |
| update           | item, url  | update:success, update:failed |
| remove           | item, url  | delete:success, delete:failed |
| next             | none       | none                          |
| prev             | none       | none                          |
| updatePagination | data       | none                          |

---
_Source: https://npm.io/package/vue-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
