1.0.6 • Published 6 years ago

v2-tree v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

vue-tree

先来看下效果图

vue树形结构展示插件

安装

$ npm install v2-tree

引入方式

import Tree from "v2-tree"

const Tree = require("v2-tree");

<script src="./dist/tree.js"></script>

API

属性说明类型默认值
sources数据结构Array[]
handleClick单击节点的回调函数Function(data,parent,index)-
handleDblclick双击节点的回调函数Function(data,parent,index)-
handleAdd添加节点的回调函数,注意如果是自定义弹框(showModal),此回调无效Function({params, obj, closeModalCallback})-
handleEdit更改节点的回调函数,注意如果是自定义弹框(showModal),此回调无效Function({params, obj, closeModalCallback})-
handleRemove删除节点的回调函数Function(data, parent, index)-
handleShowModal显示自定义添加节点弹框回调函数,必须要有具名插槽slot="modal", type=add|editFunction(type, data, parent, index)-
slot具名插槽,请看slot用法--

Slot

适用于自定义添加弹框节点

名称说明
modal自定义添加弹框

示例

点击跳转到我的博客查看吧

License

MIT

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago