Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DragSortView 图片位置变更有回调函数吗? #15

Open
taozhixiang opened this issue Mar 14, 2023 · 1 comment
Open

DragSortView 图片位置变更有回调函数吗? #15

taozhixiang opened this issue Mar 14, 2023 · 1 comment

Comments

@taozhixiang
Copy link

图片拖动后,需要改变图片列表信息,不然发布后图片位置对应不上。

@XDJcc
Copy link

XDJcc commented Mar 27, 2023

DragSortView 的data属性 传入 List 。当图片位置发生改变后,data 绑定的List也会随之改变,DragSortView还会有一个onDragListener(event,itemWidth) 函数,监听拖动状态(0开始,1结束,2拖动)。创建一个ImageData继承 DragBean,添加imageUrl属性;当event.action == 1;结束拖动的时候,遍历 list 获取到便利后的 图片列表。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants