Skip to content

Commit 58981fb

Browse files
committed
fix: distracting and time wasting after importing smoothing scroll
Lervarage 'speedAsDuration: true' to ensure each transition only takes 400ms (Extracted from vuejs.org https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L367)
1 parent 6a47d80 commit 58981fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@vuepress/core/lib/app/root-mixins/updateLoadingState.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default {
66
this.$vuepress.$set('contentMounted', true)
77

88
this.$smoothScroll = new SmoothScroll('a[href*="#"]', {
9-
speed: 1000,
9+
speed: 400,
10+
speedAsDuration: true,
1011
easing: 'easeInOutCubic'
1112
})
1213

0 commit comments

Comments
 (0)