1.1.5 • Published 6 years ago

vue-infinity-scroll v1.1.5

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

vue-infinity-scroll npm

Probably the most complete Infinity Scroll component for Vue.js 2.0. (Its a Joking, that's my first npm project. I hope this helps)

NOTE:

All Versions before 1.0.5 doesn't work

Install & basic usage

npm i vue-infinity-scroll
<template>
  <div>
    <vue-infinity-scroll
      :hasNextPage="true"
      visClass="panel panel-default"
      visAllScreen="50vh"
      @scrolling="scrolling"
      buttonText="Go to Top"
      buttonClass="btn btn-primary"
      buttonIcon="fa fa-arrow-up"
    >
      // your things here
    </vue-infinity-scroll>
  </div>
</template>

<script>
import VueInfinityScroll from 'vue-infinity-scroll'

export default {
  data () {
    return {
      offset: 0,
    }
  },
  components: {
    VueInfinityScroll
  },
  methods: {
    scrolling () {
      this.offset = this.offset + 1
    }
  }
}

</script>

Options

OptionExpectDescription
:hasNextPageBooleanHere u can use to see if u request has a next page to go
@scrollingFunctionthat event is emited when the scroll down has ended
:visClassStringYour class
:btnVisibleBooleanHidden the Go to top button
:buttonTextStringWhen u scroll down your vue-infinity-scroll u'll see a button to go to top, u can change the name of button using that props
:buttonClassStringU can add yout class to button. Bootstrap example: "btn btn-sm btn-primary"
:buttonIconStringIcon to your button. Font-Awesome Example: "fa fa-arrow-up"
:visSmallScreenStringWhen u resize your screen to a small screen (less than 768px) u can choose your height (vh, px, em...)
:visMidScreenStringThe same of visSmallScreen but to mid screen (between 768px and 1000px
:visLargeScreenStringThe same of visSmallScreen but to large screen (bigger than 1000px)
:visAllScreenStringDefine only one height to all screen size
:resetScrollBooleanCan be util if u want do a new request and reset the current scroll (If u dont use, new request will jump to same before position)

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D
1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago