From d1ffd1156292cf385d0a5a6e60373c5562197e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=AE=87=E8=BE=89?= Date: Mon, 18 Feb 2019 17:24:43 +0800 Subject: [PATCH] fix(module:tree): word misspelling(destory -> destroy) --- components/tree/nz-tree-node.component.ts | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/components/tree/nz-tree-node.component.ts b/components/tree/nz-tree-node.component.ts index 3a12503d239..f34998302be 100644 --- a/components/tree/nz-tree-node.component.ts +++ b/components/tree/nz-tree-node.component.ts @@ -160,7 +160,7 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { /** * drag var */ - destory$ = new Subject(); + destroy$ = new Subject(); dragPos = 2; dragPosClass: object = { '0' : 'drag-over', @@ -411,16 +411,16 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { handDragEvent(): void { this.ngZone.runOutsideAngular(() => { if (this.nzDraggable) { - this.destory$ = new Subject(); - fromEvent(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragStart(e)); - fromEvent(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnter(e)); - fromEvent(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragOver(e)); - fromEvent(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragLeave(e)); - fromEvent(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragDrop(e)); - fromEvent(this.elRef.nativeElement, 'dragend').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnd(e)); + this.destroy$ = new Subject(); + fromEvent(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragStart(e)); + fromEvent(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragEnter(e)); + fromEvent(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragOver(e)); + fromEvent(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragLeave(e)); + fromEvent(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragDrop(e)); + fromEvent(this.elRef.nativeElement, 'dragend').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragEnd(e)); } else { - this.destory$.next(); - this.destory$.complete(); + this.destroy$.next(); + this.destroy$.complete(); } }); } @@ -437,7 +437,7 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { } ngOnDestroy(): void { - this.destory$.next(); - this.destory$.complete(); + this.destroy$.next(); + this.destroy$.complete(); } }