Bug Type: Component
Environment
- Vue Version:
3.2.45
- Element Plus Version:
2.2.28
- Browser / OS:
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
- Build Tool:
Vite
Reproduction
Related Component
el-tree
Reproduction Link
Element Plus Playground
Steps to reproduce
拖动 Level three 2-2-1 到 Level two 2-2 到 Level three 2-1-1 触发了 node-drag-leave 事件,node-drag-leave 事件返回值不正确
What is Expected?
具体看图
What is actually happening?
具体看图
Additional comments
(empty)
3条答案
按热度按时间acruukt91#
错误的触发顺序
因为拖动并没有离开 Level one 2 但是 node-drag-leave 的 dropNode 返回值 返回了 Level one 2
z9ju0rcb2#
正确的触发顺序
f8rj6qna3#
关于改动
修改 oldDropNode 判断 通过 新的DropNode 和 旧的 oldDropNode key对比是否离开当前节点才触发