1.2.6 • Published 5 years ago

fxft-tree-select v1.2.6

Weekly downloads
58
License
-
Repository
-
Last release
5 years ago

el-select-tree组件使用说明

安装
npm install fxft-tree-select -s

使用

import treeSelect from 'fxft-tree-select';
Vue.use(treeSelect);
Attributes
参数说明类型可选值默认值
value / v-model绑定值string/number/array
disabled是否禁用booleanfalse
size输入框尺寸stringmedium/small/minimini
clearable是否可以清空选项booleanfalse
placeholder占位符string请选择
filterable是否可搜索booleanfalse
popper-append-to-body是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 falseboolean--false
data展示数据array
node-key用于设置绑定值属性Stringid
props配置选项,具体看下表object
default-expand-all是否默认展开所有节点booleanfalse
default-expanded-keys默认展开的节点的 key 的数组array
show-checkbox显示复选框,即多选节点是否可被选择false
check-strictly在显示复选框的情况下,是否严格的遵循父子不互相关联的做法(不相关联:父的选择影响子,子的选择不影响父),默认为 falsebooleanfalse
checkHalf在check-strictly为true下起作用,选择子节点后将其所有关联的父节点直到顶部全部选中,默认为 falsebooleanfalse
props
参数说明类型可选值默认值
label指定节点标签为节点对象的某个属性值stringtext
children指定子树为节点对象的某个属性值stringchildren
disabled指定节点选择框是否禁用为节点对象的某个属性值stringdisabled
pid当check-strictly值为true时,必须指定当前数据对象的父级idstringpid
方法
方法名说明参数
getCheckedNodes若节点可被选择(即 show-checkbox 为 true),则返回目前被选中的节点所组成的数组
getCheckedKeys若节点可被选择(即 show-checkbox 为 true),则返回目前被选中的节点的 key 所组成的数组
getCurrentKeyshow-checkbox为false,获取当前被选中节点的 key,使用此方法必须设置 node-key 属性,若没有节点被选中则返回 null
getCurrentNodeshow-checkbox为false,获取当前被选中节点的 data,若没有节点被选中则返回 null
Events
事件名称说明回调参数
node-click节点被点击时的回调共三个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、节点对应的 Node、节点组件本身。
1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago