我启用了 dragzone 属性,添加的芯片现在可以拖动了。那么拖动之后,我们如何得到当前的筹码顺序呢?
问问题
326 次
1 回答
1
与 Angular 一样,您可以使用两种方式绑定。实际上,您可以从绑定的ngmodel值中获取订单。
在输入中拖放的示例:
<div>
<h3>Drag and drop</h3>
<tag-input [(ngModel)]="dragAndDropExample"
[modelAsStrings]="true"
[dragZone]="'zone1'"
[editable]="true">
</tag-input>
</div>
在输入之间拖放的示例代码:
<div>
<h3>Drag and drop (as string) can be moved to another tag-input (to the next)</h3>
<tag-input [(ngModel)]="dragAndDropStrings"
[modelAsStrings]="true"
[dragZone]="'zone1'"
[editable]="true">
</tag-input>
</div>
<div>
<h3>Drag and drop (as object) can be moved to another tag-input (to the previous)</h3>
<tag-input [(ngModel)]="dragAndDropObjects"
[dragZone]="'zone1'"
[editable]="true">
</tag-input>
</div>
于 2019-09-17T15:23:52.060 回答