Skip to content

treegrid 0.0.7

Install from the command line:
Learn more about npm packages
$ npm install @ks-labs/treegrid@0.0.7
Install via package.json:
"@ks-labs/treegrid": "0.0.7"

About this version

Vue Treegrid

Deploy Teste

How to install

  1. Install npm module
npm i @ks-labs/treegrid
  1. Import module
// main.js
import Vue from "vue";
import TreeGrid from "@ks-labs/treegrid";
import "@ks-labs/treegrid/src/assets/css/jquery.treegrid.css";

Vue.use(TreeGrid);

How to use

<template>
  <div>
    <treegrid
      class="table table-bordered"
      :rows="rows"
      :columns="columns"
      :options="options"
      @row="clickRow"
    >
      <template slot="name" slot-scope="{ name }">{{ name }}</template>
      // name = { name: "Root", id: 1, pid: null, }
    </treegrid>
  </div>
</template>

<script>
  export default {
    name: "app",
    data() {
      return {
        columns: [{ name: "Nome", field: "name" }],
        rows: [
          {
            name: "Root",
            id: 1,
            pid: null,
          },
          {
            name: "Root 1",
            id: 2,
            pid: 1,
          },
          {
            name: "Root 1",
            id: 3,
            pid: 1,
          },
          {
            name: "Root 1",
            id: 4,
            pid: 1,
          },
          {
            name: "Root 1",
            id: 5,
            pid: 4,
          },
          {
            name: "Root 1",
            id: 6,
            pid: null,
          },
          {
            name: "Root 7",
            id: 7,
            pid: 6,
          },
          {
            name: "Root 7 - 1",
            id: 8,
            pid: 7,
          },
          {
            name: "Root 1",
            id: 9,
            pid: 6,
          },
          {
            name: "Root 1",
            id: 10,
            pid: 6,
          },
        ],
        options: {},
      };
    },
  };
</script>

Details


Assets

  • treegrid-0.0.7.tgz

Download activity

  • Total downloads 1
  • Last 30 days 0
  • Last week 0
  • Today 0