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

文件列表什么鬼! #971

Closed
jefcn opened this issue May 31, 2021 · 2 comments · Fixed by #980
Closed

文件列表什么鬼! #971

jefcn opened this issue May 31, 2021 · 2 comments · Fixed by #980

Comments

@jefcn
Copy link

jefcn commented May 31, 2021

点开一个任务的文件列表,发现里面把当前所有任务的文件列表全显示在一起了!这样好吗?

@dicarne
Copy link
Contributor

dicarne commented Jun 8, 2021

据我观察,实际上是个bug,在我这里假如存在两个项目A、B,A有10个文件,B有43个文件,若打开软件的第一次点击A的详情,有10个文件,再点B,有43个文件,再点A,有43个文件。若打开软件的第一次点击B的详情,有43个文件,再点A,有43个文件。表现很奇怪。

@dicarne
Copy link
Contributor

dicarne commented Jun 8, 2021

我发现了,在src\render\components\TaskDetail\Index.vue的170行,merge(cached.files, result)这个造成的问题。每次打开文件列表时,会把新文件列表和原有的列表合并,若原有列表更长,那么原有列表的后半部分会残留在新文件列表中。
使用cached.files.splice(result.length, cached.files.length - result.length)在合并后删除多余的原有项可以很好的解决问题。目前没有发现增加这一行代码是否会带来新的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

Successfully merging a pull request may close this issue.

2 participants