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
- Host: GitHub
- URL: https://github.com/lassehaslev/vue-table
- Owner: LasseHaslev
- Created: 2016-12-21T15:49:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T21:27:43.000Z (over 9 years ago)
- Last Synced: 2025-01-05T09:28:55.592Z (over 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).