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

feat(scroll-duration): add animate effect to auto scroll #11

Merged
merged 24 commits into from
Dec 3, 2019

Conversation

snowlocked
Copy link
Collaborator

@snowlocked snowlocked commented Dec 2, 2019

Why

现状:自动滚动到底部是一瞬间到底,没有过渡过程。需要添加一个滚动过渡动画

How

通过每一帧设置scrollTop到特定值来达到滚动动画效果

1

Attention

目前存在性能问题,duration 实际时间比设置时间更长

@auto-add-label auto-add-label bot added the bug Something isn't working label Dec 2, 2019
@snowlocked snowlocked changed the title fix: add an animate effect on auto scroll feat: add an animate effect on auto scroll Dec 2, 2019
@auto-add-label auto-add-label bot added enhancement New feature or request and removed bug Something isn't working labels Dec 2, 2019
@netlify
Copy link

netlify bot commented Dec 2, 2019

Deploy preview for log-viewer ready!

Built with commit cd144d7

https://deploy-preview-11--log-viewer.netlify.com

src/log-viewer.vue Outdated Show resolved Hide resolved
src/log-viewer.vue Show resolved Hide resolved
@lianghx-319
Copy link
Member

lianghx-319 commented Dec 2, 2019

在 styleguide 上可能会丢失了 docs/get.js 需要处理一下。把请求写到 md 中?

src/log-viewer.vue Outdated Show resolved Hide resolved
@levy9527 levy9527 changed the title feat: add an animate effect on auto scroll feat: add animate effect to auto scroll Dec 3, 2019
@@ -139,6 +147,42 @@ export default {
return {
props
}
},
setScrollTop(line) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像函数名可以修改为: scrollTo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像算法需要修正:demo里,使用手机秒表计算,实际滚动时间粗略估计1.6秒。。。

@levy9527 levy9527 changed the title feat: add animate effect to auto scroll feat(scroll-duration): add animate effect to auto scroll Dec 3, 2019
@levy9527 levy9527 merged commit 7691b56 into FEMessage:dev Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants