Litor / ztree-vue

vue tree component based on ztree
12 stars 12 forks source link

ztree-vue

A element tree component for Vue.js used ztree.

Installation

npm i ztree-vue --save

Usage

<ztree :setting="{
        data: {
            key: {
                name: 'label'
            }
        }
    }"
    :extraSetting="{
        url:'./test.php'
        params:{a:3}
    }"
>

</ztree>

Attributes

参数 说明 类型 默认值 备注
setting ztree origin setting Object 参考 http://www.treejs.cn/v3/api.php
extraSetting new setting for lazy loading Object 该配置和setting中的url配置二选一, 优先使用extraSetting;
extraSetting.url [String] 获取节点数据的接口;
extraSetting.dataFilter [Function] 对接口返回数据的处理函数;
extraSetting.params [Object] 调用接口时传的参数
data localdata Array