Vue.js component [scroll to top] from BixBite.
Download library or can be installed as npm
package:
npm i bxb-scroll-to-top --save-dev
To start using bxb-scroll-to-top
, you need to do is plugin installation. Somewhere in your main app.js file:
// Import components to Vue application as plugins.
import ScrollToTop from 'bxb-scroll-to-top';
// Install plugins to Vue application.
Vue.use(ScrollToTop);
// Create a fresh Vue application instance and attach it to the page.
const app = new Vue({
el: '#app'
});
// Make some vue plugins methods to global.
window.ScrollToTop = app.$scrolling;
There are one methods for calling show:
// If necessary, activate the components immediately.
window.ScrollToTop.show({active: true});
bxb-scroll-to-top - программное обеспечение с открытым исходным кодом, распространяющееся по лицензии MIT license.