ant-design-vue
ant-design-vue copied to clipboard
Components.Tree:Document sample judgment error @drop=ondrop
trafficstars
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.3.0-beta.2
Environment
chrome
Reproduction link
https://www.antdv.com/components/tree-cn#components-tree-demo-draggable
Steps to reproduce
文档的“Tree 树形控件”参考案例中拖动示例代码
const onDrop = info => {
...
if (!info.dropToGap) {
...
} else if (
(info.node.children || []).length > 0 && // Has children
info.node.expanded && // Is expanded
dropPosition === 1 // On the bottom gap
) {
...
} else {
...
}
...
}
其中info.node.children判断是否有误?
@drop的回调参数{event, node, dragNode, dragNodesKeys}中node下面没有children,只有一个dataRef且会包含children
What is expected?
能否解释一下else if的逻辑作用
What is actually happening?
@drop=onDrop 的回调参数info, info.node下并无children
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.