vue-seamless-scroll the vertical scroll Example (nuxt.js)

Installation npm install vue-seamless-scroll --save

create

 

 

 

 

import Vue from 'vue'
import scroll from 'vue-seamless-scroll'
Vue.config.devtools = process.env.NODE_ENV === 'DEV'
Vue.use(scroll);

 

 

<div class="r-body">
                        <span class="title">人气店铺</span>
                        <vue-seamless-scroll :data="renQiShop" class="seamless-warp" :class-option="classOption">
                            <el-col :span="24"
                                    class="rot-shop"
                                    v-for="(item,index) in renQiShop"
                                    :key="index"
                                    v-if="item.shopTitle!=''&&item.shopTitle!=undefined">
                                <nuxt-link :to="'/shop/'+ item.userId">
                                    {{item.shopTitle}}
                                </nuxt-link>
                            </ EL-COL>
                        </ VUE-Scroll-Seamless> 
                    </ div> 

computed: { 
            classOption () { 
                return { 
                    direction:. 1, // 0 down 
                    step: 0.5, // scroll speed control 
                    limitMoveNum: 1 // start scrolling the data from several 
                } 
            } 
         
        }

  

 

Guess you like

Origin www.cnblogs.com/taochengyong/p/12155938.html