找回密码
 立即注册
收起左侧

树的之间拖动成兄弟项的问题

2
回复
6904
查看
[复制链接]
累计签到:3 天
连续签到:1 天
来源: 2013-8-8 18:07:06 显示全部楼层 |阅读模式
1Qter豆
比如把“xte001”拖到“xte110”的下面,他们还是同级的,我重载了dragevent事件,但是会出现把它拖成了子树,不是同级的效果

拖动应该是两种效果的,一种是变成子项,一种还是兄弟项。但是只想成为它的兄弟项而已,怎么实现?谢谢!
附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

Different types of model tend to handle dropped data in different ways. Tree models are often able to add child items containing new data to their underlying data stores, and will therefore behave more predictably as far as the user is concerned. 默认放到拖放到一项上面就是添加该项的子项,而,拖放到该项的下面,出现一条横线的时候放下,就是和该项为兄弟项。这是操作问题,不用更改的。 ...
回复

使用道具 举报

累计签到:1569 天
连续签到:1 天
2013-8-8 18:07:07 显示全部楼层
Different types of model tend to handle dropped data in different ways. Tree models are often able to add child items containing new data to their underlying data stores, and will therefore behave more predictably as far as the user is concerned.

默认放到拖放到一项上面就是添加该项的子项,而,拖放到该项的下面,出现一条横线的时候放下,就是和该项为兄弟项。这是操作问题,不用更改的。
回复

使用道具 举报

累计签到:3 天
连续签到:1 天
2013-8-10 07:40:44 显示全部楼层
但是,如果只给拖成兄弟项,不要给子项,可以怎样实现?谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了