Browse Source
Merge branch 'main' into fix/layout-footer-position
pull/8283/head
Harold Zhang
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
0 deletions
-
packages/@core/ui-kit/shadcn-ui/src/ui/tree/tree.vue
-
packages/@core/ui-kit/shadcn-ui/src/ui/tree/types.ts
|
|
|
@ -249,6 +249,7 @@ function onSelect(item: FlattenedItem<Recordable<any>>, isSelected: boolean) { |
|
|
|
props.checkStrictly && |
|
|
|
props.multiple && |
|
|
|
props.autoCheckParent && |
|
|
|
!props.keepParentOnUncheck && |
|
|
|
!isSelected |
|
|
|
) { |
|
|
|
flattenData.value |
|
|
|
|
|
|
|
@ -27,6 +27,8 @@ export interface TreeProps { |
|
|
|
/** 自定义节点类名 */ |
|
|
|
getNodeClass?: (item: FlattenedItem<Recordable<any>>) => string; |
|
|
|
iconField?: string; |
|
|
|
/** 取消勾选子节点时保持父节点的选中状态,不级联取消父节点(默认 false:级联取消) */ |
|
|
|
keepParentOnUncheck?: boolean; |
|
|
|
/** label字段 */ |
|
|
|
labelField?: string; |
|
|
|
/** 是否多选 */ |
|
|
|
@ -58,6 +60,7 @@ export function treePropsDefaults() { |
|
|
|
multiple: false, |
|
|
|
showIcon: true, |
|
|
|
transition: true, |
|
|
|
keepParentOnUncheck: false, |
|
|
|
valueField: 'value', |
|
|
|
childrenField: 'children', |
|
|
|
}; |
|
|
|
|