Git Product home page Git Product logo

vue-tree's Introduction

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|edit Function(type, data, parent, index) -
slot 具名插槽,请看slot用法 - -

Slot

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

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

示例

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

License

MIT

vue-tree's People

Contributors

yjgeek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.