可排序和可丢弃的淘汰名单 [英] Sortable and droppable knockout list

查看:16
本文介绍了可排序和可丢弃的淘汰名单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

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

这是更新的博客条目:

这篇关于可排序和可丢弃的淘汰名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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