zoukankan      html  css  js  c++  java
  • vue-seamless-scroll 竖向滚动使用实例(nuxt.js)

    安装  npm install vue-seamless-scroll --save

    创建

    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-seamless-scroll>
                        </div>
    
    computed: {
                classOption () {
                    return {
                        direction: 1,  // 0 向下
                        step:0.5, // 滚动速度控制
                        limitMoveNum: 1 // 从几条数据开始滚动
                    }
                }
             
            }
    

      

  • 相关阅读:
    细菌 状态压缩
    素数
    骑士问题(knight)
    魔法石的诱惑
    平面上的最接近点对
    救援行动(save)
    优先队列
    leetcode 92. 反转链表 II
    leetcode 91. 解码方法
    leetcode 39. 组合总和
  • 原文地址:https://www.cnblogs.com/taochengyong/p/12155938.html
Copyright © 2011-2022 走看看