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

多表格相互推拽有个BUG #10

Open
doushabao188 opened this issue Sep 29, 2022 · 1 comment
Open

多表格相互推拽有个BUG #10

doushabao188 opened this issue Sep 29, 2022 · 1 comment

Comments

@doushabao188
Copy link

多表格相互推拽,如果一个表格超过2条数据,从另一个表格拖拽数据到该表格最后一行,数据会直接跳到第一行去,能否解决一下

@wl1532502541
Copy link

https://github.com/mizuka-wu/el-table-draggable/blob/master/src/utils/options/row.js#L203C49-L203C49
这一行获取交换行的dom toDomInfo 因为最后一行的索引比存储的map的长度大,没有命中,最后取到了table的dom,而table的index是0,所以数据通过exchange方法去到了第1行。
作者又在下面在列表长度<=2的时候修复了,所以不超过2条数据没问题
https://github.com/mizuka-wu/el-table-draggable/blob/master/src/utils/options/row.js#L217
把小于等于2这个条件删了就正常了,但加这行可能是为了解决别的bug...

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