{"id":19258932,"url":"https://github.com/lassehaslev/vue-table","last_synced_at":"2026-06-12T01:31:05.699Z","repository":{"id":89976183,"uuid":"77064939","full_name":"LasseHaslev/vue-table","owner":"LasseHaslev","description":"Simple table using Vue2","archived":false,"fork":false,"pushed_at":"2017-02-17T21:27:43.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T09:28:55.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LasseHaslev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-21T15:49:15.000Z","updated_at":"2016-12-21T15:49:25.000Z","dependencies_parsed_at":"2023-05-30T18:00:38.792Z","dependency_job_id":null,"html_url":"https://github.com/LasseHaslev/vue-table","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LasseHaslev","download_url":"https://codeload.github.com/LasseHaslev/vue-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356192,"owners_count":19788513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:14:49.797Z","updated_at":"2026-06-12T01:31:05.648Z","avatar_url":"https://github.com/LasseHaslev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @lassehaslev/vue-table\n\n\u003e Simple table and logic in Vue2\n\n# Installation\nRun ```npm install @lassehaslev/vue-table --save``` in your project folder\n\n## Usage\nUse this simple component with [Bulma](https://trello.com/b/BDC3zQvN).\n```js\nimport { Table } from '@lassehaslev/vue-table';\nexport default {\n    template: `\n        \u003cvue-table :heads=\"[ 'Name', { name: 'Actions', style: { 'text-align':'right' } } ]\"\u003e\n        \u003ctr v-for=\"( item, index ) in items\"\u003e\n            \u003ctd\u003e{{ item }}\u003c/td\u003e\n            \u003ctd\u003e\n                \u003cbutton class=\"button is-danger\" @click=\"remove( index )\"\u003eRemove\u003c/button\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003c/vue-table\u003e\n    `,\n\n    data() {\n        return {\n            items: [\n                'Javascript.',\n                'Html.',\n                'Css.',\n            ],\n        }\n    },\n\n    methods: {\n        remove( index ) {\n            this.items.splice( index, 1 );\n        }\n    },\n\n    components: {\n        'vue-table': Table\n    },\n}\n```\n\n## Extend / Build your own!\nYou can create you own table with the logic of [BaseTable](https://github.com/LasseHaslev/vue-table/blob/master/src/components/BaseTable.js)\n``` js\nimport BaseTable from '@lassehaslev/vue-table';\nexport default {\n    template: `\n    \u003ctable class=\"table\"\u003e\n        \u003cthead\u003e\n            \u003ctr\u003e\n                \u003cth v-for=\"head in heads\" :style=\"head.style\" :class=\"head.class\"\u003e{{ head.name }}\u003c/th\u003e\n            \u003c/tr\u003e\n        \u003c/thead\u003e\n        \u003ctbody\u003e\n            \u003cslot\u003e\u003c/slot\u003e\n        \u003c/tbody\u003e\n    \u003c/table\u003e\n    `,\n\n    mixins: [ BaseTable ],\n}\n```\n\n## Development\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build for production with minification\nnpm run build\n```\n\nFor detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Fvue-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flassehaslev%2Fvue-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Fvue-table/lists"}