我怎样才能同时使用ng2-dnd进行排序和拖放

时间:2018-06-20 00:55:35

标签: sorting drag-and-drop angular6

我要在li标签上同时使用排序和拖放功能。 排序还可以,但是拖放操作无效。

如何在li标签上同时使用两者?

<ul *ngIf="content" class="tree" dnd-sortable-container [sortableData]="content.project_blocks">
   <li *ngFor="let project_block of content.project_blocks; let i = index;" dnd-sortable [sortableIndex]="i" dnd-droppable [allowDrop]="allowDropFunction(project_block)"
  (onDropSuccess)="addProject($event, project_block)" (onDragEnter)="hoverEvent($event)" (onDragLeave)="hoverLeaveEvent($event)">
   ......
   </li>
</ul>

0 个答案:

没有答案