vue-marquee-component
Demo
Install
npm install vue-marquee-component --save
Usage
The most common use case is to register the component globally.
// in your main.js or similar file Vue
Alternatively you can do this to register the components:
// HelloWorld.vue components: Marqueename: Marquee Slidename: Slide
On your page you can now use html like this:
<!-- simple marquee text --> VUE-MARQUEE-COMPONENT <!-- Set different directions --><!-- left 、 right 、 top 、bottom --> {{ i }} <!-- Hide scrollbar --> VUE-MARQUEE-COMPONENT <!-- fast duration --> 👧 ❤️ 👦 <!-- Insert any node --> <!-- The component you want to display -->
Props
Prop | Type | Default | Description |
---|---|---|---|
direction | string | left | Marquee rolling direction |
duration | Number | Total length * 30 | Move a few degrees (left right top bottom ) |
showProgress | Boolean | true | Whether to show the progress bar |
Important information for dynamic content
If you change the content you need reload the component. For this use property :key
see more
<!-- parse a unique key for reload the component --> {{ currentTrack.title }}