usebabelcomponents
v1.0.9
Published
现包括两个组件
Downloads
623
Readme
usebabelcomponents
现包括两个组件
use-vant-ellipsis
use-ele-tree
在原有element-plus中的tree组件中新增一些功能
<use-ele-tree
ref="treeRef"
>
</use-ele-tree>
let treeRef = ref(null)
- 缓存tree当前展开状态(saveNodeStates)
treeRef.value.saveNodeStates()
- 初始化方法 initFun
<use-ele-tree
@initFun="initFun"
>
</use-ele-tree>
- 点击方法 clickFun
<use-ele-tree
@clickFun="clickFun"
>
</use-ele-tree>
- 加载方法 loadFun
<use-ele-tree
@loadFun="loadFun"
>
</use-ele-tree>
- 获取原生tree方法(getComponetRef)
treeRef.value.getComponetRef()
- 改变某一结点的展开状态(changeTreeItemExpanded) 参数1 (data) 节点的 data 或 key 参数2 想要改变到那个true/false
treeRef.value.changeTreeItemExpanded('2222',false)