Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: virtualPhantomHeight #403

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

Merged
huangshuwei merged 2 commits into Happy-Coding-Clans:master from zhangjiayu1215:master
Sep 26, 2021

Conversation

Copy link
Contributor

@zhangjiayu1215 zhangjiayu1215 commented Sep 26, 2021

change virtualPhantomHeight when data is empty

change virtualPhantomHeight when data is empty
Copy link
Collaborator

首先感谢你的PR。

你的代码的确修复了这个bug。如果修改为下面的方式是不是更简洁一点:

 setVirtualPhantomHeight() {
 let totalHeight = 0;
 if (this.virtualScrollPositions.length) {
 totalHeight =
 this.virtualScrollPositions[
 this.virtualScrollPositions.length - 1
 ].bottom;
 }
 this.$refs[this.virtualPhantomRef].style.height =
 totalHeight + "px";
 },

如果你也同意,希望你再修改下,然后我会合并进来。谢谢

Copy link
Contributor Author

ok

@huangshuwei huangshuwei merged commit 5f17983 into Happy-Coding-Clans:master Sep 26, 2021
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /