Answer the question
In order to leave comments, you need to log in
How to make settings in the 'vue-smooth-scroll' nuxt.js plugin?
Installed the ' vue-smooth-scroll ' plugin in my project.
The plugin installed as written in the docs (Vue Plugins, ES6 plugins )
Created a file in the plugins folder, wrote in the file
import Vue from 'vue'
import vueSmoothScroll from 'vue-smooth-scroll'
Vue.use(vueSmoothScroll)
<a href="#div-id" v-smooth-scroll="{ duration: 1000, offset: -50 }">Anchor</a>
import Vue from 'vue'
import vueSmoothScroll from 'vue-smooth-scroll'
Vue.use(vueSmoothScroll, {
duration: 1000,
offset: -50
})
Answer the question
In order to leave comments, you need to log in
Why not a new version ?
In the new version, everything is done the way you want
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question