0.1.3 • Published 4 years ago

rk-tree v0.1.3

Weekly downloads
13
License
-
Repository
-
Last release
4 years ago

rk-tree

Z-tree of ES6 version.

Install

yarn add rk-tree

Usage

Usage is same to zTree Api.

<template>
  <div class="hello">
    <ul
      id="treeId"
      class="ztree"
    />
  </div>
</template>

<script>
import { rkTree ,$} from "../../rkTree/rkTree.umd";
import treeList from '../tree';
export default {
  name: 'HelloWorld',
  data(){
    return {
      setting:{
        data: {
          key: {
            name: "deviceName",
            children: "childList"
          }
        },
        check : {
          enable : true,
          chkStyle : "checkbox"
        },
      }
    }
  },
  methods:{
  },
  mounted() {
    rkTree
      .init($('#treeId'), this.setting, treeList.result)
      .expandAll(true);
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  @import "../../rkTree/zTreeStyle/zTreeStyle.css";
</style>
0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago