An open API service indexing awesome lists of open source software.

https://github.com/lassehaslev/vue-table

Simple table using Vue2
https://github.com/lassehaslev/vue-table

Last synced: about 1 month ago
JSON representation

Simple table using Vue2

Awesome Lists containing this project

README

          

# @lassehaslev/vue-table

> Simple table and logic in Vue2

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

## Usage
Use this simple component with [Bulma](https://trello.com/b/BDC3zQvN).
```js
import { Table } from '@lassehaslev/vue-table';
export default {
template: `


{{ item }}

Remove



`,

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

methods: {
remove( index ) {
this.items.splice( index, 1 );
}
},

components: {
'vue-table': Table
},
}
```

## Extend / Build your own!
You can create you own table with the logic of [BaseTable](https://github.com/LasseHaslev/vue-table/blob/master/src/components/BaseTable.js)
``` js
import BaseTable from '@lassehaslev/vue-table';
export default {
template: `



{{ head.name }}






`,

mixins: [ BaseTable ],
}
```

## 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).