mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
refactor: set global defaults of vue-scrollto
This commit is contained in:
parent
db1bcdd3d2
commit
08e73747bd
@ -145,7 +145,7 @@ describe('Comment.vue', () => {
|
||||
it('calls $scrollTo', () => {
|
||||
wrapper = Wrapper()
|
||||
jest.runAllTimers()
|
||||
expect(mocks.$scrollTo).toHaveBeenCalledWith('#commentId-2', 1000)
|
||||
expect(mocks.$scrollTo).toHaveBeenCalledWith('#commentId-2')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -103,7 +103,7 @@ describe('CommentList.vue', () => {
|
||||
it('calls $scrollTo', () => {
|
||||
wrapper = Wrapper()
|
||||
jest.runAllTimers()
|
||||
expect(mocks.$scrollTo).toHaveBeenCalledWith('#comments', 1000)
|
||||
expect(mocks.$scrollTo).toHaveBeenCalledWith('#comments')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -5,7 +5,7 @@ function scrollToAnchor(anchor, { checkAnchor, $scrollTo }) {
|
||||
)
|
||||
if (!checkAnchor(anchor)) return
|
||||
setTimeout(() => {
|
||||
$scrollTo(anchor, 1000)
|
||||
$scrollTo(anchor)
|
||||
}, 250)
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,13 @@ export default {
|
||||
keys: envWhitelist,
|
||||
},
|
||||
],
|
||||
'vue-scrollto/nuxt',
|
||||
[
|
||||
'vue-scrollto/nuxt',
|
||||
{
|
||||
offset: -100, // to compensate fixed navbar height
|
||||
duration: 1000,
|
||||
},
|
||||
],
|
||||
'cookie-universal-nuxt',
|
||||
'@nuxtjs/apollo',
|
||||
'@nuxtjs/axios',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user