Wa vue grid

Component vue-grid with vuejs

Version: 1.0.9 Updated: 02/10/2018

By: willyamalmeida License: MIT

Downloads Last 30 Days: 61

vue-grid

A vue-grid component that shows a table grid.

Build Status codecov Maintainability

Installation

npm install --save-dev wa-vue-grid

Browser

Include the script file.

<script type="text/javascript" src="node_modules/vuejs/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/wa-vue-grid/dist/vue-grid.min.js"></script>
<script type="text/javascript">
  Vue.use(VueGrid);
</script>

Module

import VueGrid from 'wa-vue-grid';

Usage

<vue-grid :config="myConfig"></vue-grid>

{
  myConfig: {
    search: "http://mydomain:port/api",  //=> format json
    pagination: {
        enabled: true,
        perPage: 10,
        rangePage: 8,
        search: {
            page: "_page", //ex: "http://mydomain:port/api?_page=1&_limit=10"
            perPage: "_limit"
        }
    },
    filter: true,
    sortProperty: "col1",
    columns: [
      { name: "col1", display: "Column 1", sort: true },
      { name: "col2", display: "Column 2" }
    ],
    rows: []
  }
}
Categories: Vue js
Tags: