vue-tree-selector
v0.1.3
Published
a tree-select based on ElementUi
Downloads
5
Maintainers
Readme
Vue Tree Select
一个基于Element Tree的树形下拉选择
Install
npm install vue-tree-selector -S
Quick Start
1.在main.js中引入注册
import Vue from 'vue'
// 依赖ElementUI,请安装后引入注册
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Element)
import TreeSelector from 'vue-tree-selector'
Vue.use(TreeSelector)
2.使用
<tree-selector
v-model="value"
:treeData="treeData"
multiple
collapse-tags
></tree-selector>
3.Attributes 参考Element Tree
1.width:下拉框宽度,默认200px
2.treeData:对应ElementTree data
3.treeNodeKey:对应element tree node-key,默认值:'id'
4.defaultProps:对应element tree porps,默认:{children: 'children',label: 'label'}
5.defaultExpandAll:是否展开全部节点,默认false
6.multiple:是否多选,默认false
7.filter:是否筛选:默认true