a pull to refresh component for vue
npm install refreshablejs
npm i refreshable
`
1. globally
`js
import Refreshable from 'refreshable'
import 'refreshable/dist/assets/refreshable.css'
Vue.use(Refreshable)
`
2. partially
`js
import { Refreshable } from 'refreshable'
import 'refreshable/dist/assets/refreshable.css'
`
Usage
1. turn on pulldown or pullup simply
`html
// your html
`
2. custom-built for your own
`html
// your html
`
3. closure funcs
- 3.1 endpoint
`js
this.$refs.refreshable.endPullDown() // for pull down event
this.$refs.refreshable.endPullUp(hasMore: Boolean) // for pull up event
`
- 3.2 layout recalculate
`js
this.$refs.refreshable.setNeedsLayout()
`
- 3.3 auto refresh
`js
this.$refs.refreshable.autoRefresh()
`
- 3.4 resume pullUp
`js
this.$refs.refreshable.resumePullUp()
`
Notice
> your fixed component or dom element will not effects when wrapped in cause of the dependency of the lib is base on transform. therefore, your should place all fixed` elements out of the wrapper.