可分类和可删除的淘汰表 [英] Sortable and droppable knockout list

查看:102
本文介绍了可分类和可删除的淘汰表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要拖动的列表.为了简单起见,让这些项目仅是男孩"和女孩". 我还有另一个朋友"列表,您可以将男孩"和女孩"拖入其中,然后设置属性,例如姓名,年龄,身高等.此列表也需要可排序(拖放).

I have a list that needs to be draggable. For simplicity lets have the items only be "boy" and "girl". I have another list "friends" that you can drag "boy" and "girl" into then set properties such as name, age, height, etc. This list also needs to be sortable (drag and drop).

基本上,我想通过拖动男孩"或女孩"将项目添加到朋友"列表中,但是我不确定如何使用淘汰赛来使两个列表进行交互.

Basically I want to add items to the "friends" list by dragging in either a "boy" or "girl" but I'm not sure how to get the two lists to interact using knockout.

推荐答案

Ryan Niemeyer写了一篇很棒的文章,介绍了如何使用剔除进行拖放:

Ryan Niemeyer has written great article about dragging and dropping with knockout:

http://www.knockmeout.net/2011/05/dragging-dropping-and-sorting-with.html

http://www.knockmeout.net/2011/05/dragging-dropping-and-sorting-with.html

Ryan Niemeyer为此目的编写了一个Knockout插件:

Ryan Niemeyer has authored a Knockout plug-in for this purpose:

这是更新的博客条目:

这篇关于可分类和可删除的淘汰表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆