引用 cdkDropListConnectedTo 中的拖放区
<div class="board">
<div class="lane lane-1"
cdkDropList
#todo="cdkDropList"
[cdkDropListData]="toDoList"
[cdkDropListConnectedTo]="[inProgress, done]"
(cdkDropListDropped)="drop($event)"
>
<div class="heading todo">To Do</div>
<div *ngFor="let item of toDoList" class="task"
cdkDrag>{{item}}</div>
</div>
<div class="lane lane-2"
cdkDropList
#inProgress="cdkDropList"
[cdkDropListData]="inProgressList"
[cdkDropListConnectedTo]="[done,todo]"
(cdkDropListDropped)="drop($event)"
>
<div class="heading doing">In Progress</div>
<div *ngFor="let item of inProgressList" class="task" cdkDrag>{{item}}</div>
</div>
<div class="lane lane-2"
cdkDropList
#done="cdkDropList"
[cdkDropListData]="doneList"
[cdkDropListConnectedTo]="[todo,inProgress]"
(cdkDropListDropped)="drop($event)"
>
<div class="heading done">Done</div>
<div *ngFor="let item of doneList" class="task" cdkDrag>{{item}}</div>
</div>