vuejs react_基于vuejs 2的React式虚拟滚动条

vuejs react

可视滚动 (vuescroll)

vuescroll is a virtual scrollbar based on vue.js 2.X which can both support PC and mobile phone.You can customize the scrollbar how you like instead of using native in browser.

vuescroll是基于vue.js 2.X的虚拟滚动条,可同时支持PC和手机。您可以按自己的喜好自定义滚动条,而不必在浏览器中使用本机。

特征 (Features)

Full features of scrollor. Ability to customize scrollbar by powerful configurations. Ability to detect size change of content and automatically update. smooth-scroll Integration. Vue-Powered.

滚动条的全部功能。 能够通过强大的配置自定义滚动条。 能够检测内容的大小变化并自动更新。 平滑滚动集成。 Vue供电。

开始使用 (Get Started)

安装 (Installation)

直接下载/ CDN (Direct Download / CDN)
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vuescroll"></script>
使用npm或yarn (Use npm or yarn)
npm install vuescroll -S
# yarn add vuescroll

app.js (app.js)

// In module system, you need to manully install
// and in browser environment need not.
import Vue from 'vue'
import vuescroll from 'vuescroll'

Vue.use(vuescroll)

// declare Vue instance and bind your options.
const vm = new Vue({
    el: "#app",
    data: {
        ops: {
            // write your own options in ops
            vuescroll: {

            },
            scrollPanel: {
                
            }
            // ...
        }
    }
})

index.html (index.html)

<div id="app" >
    <!-- bind ops -->
    <vue-scroll :ops="ops">
        <!-- the content you want to scroll -->
        <div 
        class="content"
        v-for= "item in 100"
        :key="item"
        >
        <span>{{item}}</span>
        </div>
    </vue-scroll>
</div>

预习 (Preview)

在两种模式之间切换 (Toggle between two modes)

平滑滚动 (Smooth scroll)

BTW,
Here are many scroll animations you can choose.

这里有很多滚动动画可供选择。

拉动刷新和推入负载 (Pull-Refresh and Push-Load)

翻译自: https://vuejsexamples.com/a-reactive-virtual-scrollbar-based-on-vue-js-2/

vuejs react

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值