Skip to content

Commit 5a248e9

Browse files
committed
docs: about closestNode
1 parent b095a51 commit 5a248e9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/docs-site/docs/en/v2/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ Draggable component instance. The tree drag start at.
789789
790790
Draggable component instance. Drag target tree.
791791
792+
#### closestNode
793+
794+
Type: [Stat](#Stat)|null. The closest node in dragging. You can use it in [eachDroppable](#eachdroppable).
795+
792796
#### Example - dragContext
793797
794798
Use the dragContext to obtain the dragNode in [eachDroppable](#eachdroppable) and achieve the following effect: odd nodes only accept odd nodes, even nodes only accept even nodes.

packages/docs-site/docs/zh/v2/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,10 @@ Draggable 组件实例. 拖拽的起始树.
788788

789789
Draggable 组件实例. 拖拽的目标树.
790790

791+
#### closestNode
792+
793+
类型: [Stat](#Stat)|null. 拖拽时最近的节点.可以在 [eachDroppable](#eachdroppable) 中使用.
794+
791795
#### Example - dragContext
792796

793797
[eachDroppable](#eachdroppable)中通过 dragContext 获取 dragNode,达成效果:奇数节点只接收奇数节点,偶数节点只接收偶数节点。

0 commit comments

Comments
 (0)