Neverending Perpetual Motion

    vue-mercury-better-scroll

    1.0.2 • Public • Published

    vue-mercury-better-scroll

    基于 [better-scroll] thanks to vue-slim-better-scroll(https://github.com/ustbhuangyi/better-scroll)

    安装

    npm i -S vue-mercury-better-scroll

    引入

    • 插件形式全局引入
    // 入口文件 main.js 中
    import Scroll from 'vue-mercury-better-scroll'
    Vue.use(Scroll)
    • 组件形式引入
    // *.vue 中
    import Scroll from 'vue-mercury-better-scroll'
    export default {
      /* ... */
      components: {
        Scroll,
      },
      /* ... */
    }

    使用

    <!-- 简单场景 -->
    <Scroll
      ref="scroll"
      :autoUpdate="true"
      @pullingDown="loadRefresh"
      @pullingUp="loadMore">
        <!-- 滚动的内容 -->
    </Scroll>
     
    <!-- 复杂场景 -->
    <Scroll
      ref="scroll"
      :updateData="[data]"
      :refreshData="[]"
      @pullingDown="loadRefresh"
      @pullingUp="loadMore">
        <!-- 滚动的内容 -->
    </Scroll>

    设置

    <!-- 较 vue-slim-better-scroll 增加 loading 动画插槽 -->
    <div slot="pullupLoading">pull up loading</div>
    <div slot="pulldownLoading">pull down loading</div>

    License

    Install

    npm i vue-mercury-better-scroll

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    999 kB

    Total Files

    25

    Last publish

    Collaborators

    • xushu198912