即时通讯工作与一些library for drag-and-drop ng2-dnd(角度2库),和一个列表其工作Wonderfull对我来说,它的一个非常简单的实现,它看起来像这样:未能通过拖放库使用多个可排序列表
<md-content>
<h1 align="center">{{title}}</h1>
<div *ngIf="showingListOne">
<div dnd-sortable-container [sortableData]="listOneToDisplay | async">
<div class="list-bg" *ngFor="#item of listOneToDisplay | async; #i = index" dnd-sortable [sortableIndex]="i">
ID: {{item.id}} <p></p> name: {{item.name}}
</div>
</div><br><br>
<div class="list-bg">Current Matcher {{matcherBulksToDisplay | async | json}}</div>
</div>
<div *ngIf="showingListTwo">
<div dnd-sortable-container [sortableData]="listTwoToDisplay | async">
<div class="list-bg" *ngFor="#item of listTwoToDisplay | async; #i = index" dnd-sortable [sortableIndex]="i">
ID: {{item.id}} <p></p> age: {{item.age}}
</div>
</div>
<div>Current Expedite {{expediteBulksToDisplay | async | json}}</div>
</div>
<div *ngIf="showingListThree">
<div dnd-sortable-container [sortableData]="listThreeToDisplay | async">
<div class="list-bg" *ngFor="#item of listThreeToDisplay | async; #i = index" dnd-sortable [sortableIndex]="i">
ID: {{item.id}} <p></p> age: {{item.age}}
</div>
</div>
<div>Current Cropping {{croppingBulksToDisplay | async | json}}</div>
</div>
</md-content>
我有3个按钮,同一组件上呈现3个不同的列表,但是每个在其时间。
没有人知道为什么会只使用第一个列表? 唯一的区别是在第二个和第三个列表中我拉age
而不是名称。
其驱使我疯狂导致其相同的代码,但只有第一个列表是可排序的,而另一个不是,也许是它与图书馆的东西?
请帮助:/
数据在所有三个列表中正确呈现,但是您无法对第二个或第三个列表重新排序? – wolfhoundjesse
@wolfhoundjesse恰好好友! – Joe
@wolfhoundjesseif你可以找到我的问题我将如此thankfullllll – Joe