Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit ec2c390

Browse files
authored
feat: Merge pull request #32 from ng2tech/master
增加可选配置,是否允许子级影响父级联动,默认为允许,即nzAllowParentLinkage默认为true
2 parents 3086d0e + 36f83c7 commit ec2c390

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/components/nz-tree.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export class NzTreeComponent implements OnInit, OnChanges {
8484
@Input() nzNodes: any[];
8585
@Input() nzCheckable = false;
8686
@Input() nzAutoExpandParent: boolean | number = false;
87+
@Input() nzAllowParentLinkage = true;
8788
@Input() nzShowLine = false;
8889
@Input() nzOptions: any;
8990
@Input() nzShiftSelectedMulti = true;
@@ -183,7 +184,9 @@ export class NzTreeComponent implements OnInit, OnChanges {
183184
}
184185
parentLoop(parentNode);
185186
};
186-
parentLoop(node);
187+
if(this.nzAllowParentLinkage){
188+
parentLoop(node);
189+
}
187190
}
188191

189192
fireEvent(event: any) {

0 commit comments

Comments
 (0)