从父组件拖到一些子组件(多个相同类型的子组件)我(cdkDropListDropped)="drop($event)"
用来指向:
drop(event: CdkDragDrop<string[]>) {
console.log(event);// how can i get the instance of target component
}
<app-parent>
<div cdkDropList [cdkDropListData]="Data" (cdkDropListDropped)="drop($event)"></div>
<app-child cdkDropList></app-child>
<app-child cdkDropList></app-child>
<app-child cdkDropList></app-child>
</app-parent>
但我无法从event
目标组件中获取;