vue-ztree-2.0

by lisiyizu

lisiyizu / vue-ztree-2.0
211 Stars 106 Forks Last release: Not found 47 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

vue-ztree-2.0

安装步骤:

    npm install  vue-ztree-2.0

vue-ztree-2 演示预览地址

Vue小伙伴交流群: 590688906

通过以下demo来实现

main.js 代码如下

  import Vue from 'vue'
  import App from './App'
  import router from './router'
  import vueztree from 'vue-ztree-2.0/dist/vue-ztree-2.0.umd.min.js'
  import 'vue-ztree-2.0/dist/vue-ztree-2.0.css'

Vue.use(vueztree)

/* eslint-disable no-new */ new Vue({ el: '#app', router, template: '', components: { App } })

app.vue代码如下




vue-ztree/初始化参数

参数 类型 默认值 描述
list Array - 树的结构数据源
func Function - 点击节点事件
contextmenu Function - 右击节点事件
expand Function - 点击展开/收起的方法(一般在异步加载的时候使用, 非异步加载传null)
is-open Bealoon true 是否展开树

Build Setup

# install dependencies
npm install

serve with hot reload at localhost:8080

npm run dev

build for production with minification

npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.