-
Notifications
You must be signed in to change notification settings - Fork 144
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
二次赋值后的拖拽问题 #10
Comments
大佬我也遇到这个问题了,不能进行重新赋值,请问你解决了吗?@luguosheng1314 |
解决了 |
我这个问题是出现在对一个排序列表进行动态添加数据后,排序功能会出问题,所以我用了v-if 来控制列表的重新渲染,每次添加新数据进来后,先把渲染列表的数组清空,然后重新赋值。这样就不会有问题了。 |
@luguosheng1314 的思路确实可以,可以用v-if控制数据改变后v-for重新渲染,就可以多次拖拽了。谢谢🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第一次帮定数据 arr = [obj1,obj2] 然后通过js修改成 arr=[obj3,obj4] 然后拖拽就失效了,调试发现第二次拖拽的时候 arr变成了 arr : [obj3,obj4,undefined]
The text was updated successfully, but these errors were encountered: