fix(tree): replace leafOnly prop to checkStrategy prop in select handler (#1207)

Co-authored-by: unknown <liyang@xiaoyouzi.com>
This commit is contained in:
小魔王 2021-09-21 00:27:31 +08:00 committed by GitHub
parent ee1c1e893c
commit e80ccf05b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@
### Fixes
- Fix `DialogReactive` props are readonly.
- Fix `n-tree` replace `leafOnly` prop to `checkStrategy` prop in single check.
## 2.19.0 (2021-09-19)

View File

@ -5,6 +5,7 @@
### Fixes
- 修复 `DialogReactive` 属性只读。
- 修复 `n-tree``checkStrategy` 属性单选替换 `leafOnly` 属性
## 2.19.0 (2021-09-19)

View File

@ -626,6 +626,8 @@ export default defineComponent({
props.disabled ||
node.disabled ||
!props.selectable ||
(props.checkStrategy === 'child' && !node.isLeaf) ||
(props.checkStrategy === 'parent' && node.isLeaf) ||
(props.leafOnly && !node.isLeaf)
) {
return