# @lassehaslev/vue-crud

> Create read update delete logic for Vue

Latest version **0.3.4** (published 2017-03-05) · 0 weekly downloads

## Install

```sh
npm install @lassehaslev/vue-crud
pnpm add @lassehaslev/vue-crud
yarn add @lassehaslev/vue-crud
bun add @lassehaslev/vue-crud
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2017-03-05 |
| First published | 2016-12-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lasse S. Haslev |
| Maintainers | lassehaslev |

## Links

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

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.1.0

## Recent versions

- 0.3.4 (latest) — 2017-03-05
- 0.3.3 — 2017-02-17
- 0.3.2 — 2017-01-02
- 0.3.1 — 2017-01-02
- 0.3.0 — 2017-01-02
- 0.2.2 — 2017-01-02
- 0.2.1 — 2017-01-02
- 0.2.0 — 2016-12-22
- 0.1.0 — 2016-12-21

## README

# @lassehaslev/vue-crud

> Create read update delete logic for Vue

# Installation
Run ```npm install @lassehaslev/vue-crud --save``` in your project folder

## Usage
```js
import Crud from '@lassehaslev/vue-crud';
export default {

    mixins: [ Crud ],

    template: `
        <table class="table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th><div class="has-text-right">Action</div></th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="( item, index ) in items">
                    <td>{{ item }}</td>
                    <td class="has-text-right">
                        <button class="button is-warning" @click="update( null, index )">Empty</button>
                        <button class="button is-danger" @click="removeItem( item )">Remove</button>
                    </td>
                </tr>
            </tbody>
        </table>
        <button @click="append(null)" class="button is-primary">Append empry</button>
        <button @click="prepend(null)" class="button is-primary">Prepend empry</button>
        <button @click="removeAll" class="button is-danger">Delete all</button>
    </section>
    `,

    data() {
        return {
            items: [
                'Html',
                'Css',
                'Javascript',
            ],
        }
    },
```

## Development

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```

For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).

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