mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-05 13:00:47 +08:00
fix(tree): drag over leaf node causes error (#203)
This commit is contained in:
parent
dbbfd41aae
commit
9d791cd56e
@ -1,5 +1,11 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix `n-tree` drag over leaf node causes error, closes [#200](https://github.com/TuSimple/naive-ui/issues/200).
|
||||
|
||||
## 2.12.2 (2021-06-19)
|
||||
|
||||
### Fixes
|
||||
|
@ -1,5 +1,11 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-tree` 拖拽悬浮叶节点报错,关闭 [#200](https://github.com/TuSimple/naive-ui/issues/200)
|
||||
|
||||
## 2.12.2 (2021-06-19)
|
||||
|
||||
### Fixes
|
||||
|
@ -521,6 +521,8 @@ export default defineComponent({
|
||||
window.clearTimeout(expandTimerId)
|
||||
expandTimerId = null
|
||||
}
|
||||
// Don't expand leaf node.
|
||||
if (node.isLeaf) return
|
||||
nodeKeyToBeExpanded = node.key
|
||||
const expand = (): void => {
|
||||
if (nodeKeyToBeExpanded !== node.key) return
|
||||
|
Loading…
Reference in New Issue
Block a user