An infinite scroll plugin for Vue.js.
MIT License
Bot releases are hidden (Show)
querySelector
bug for forceUseInfiniteWrapper
propertyPluginFunction
typePublished by PeachScript over 5 years ago
install
method declaration in the TypeScript definition filePublished by PeachScript almost 6 years ago
Published by PeachScript almost 6 years ago
Published by PeachScript almost 6 years ago
infinite
event when reseting plugin #189Published by PeachScript almost 6 years ago
This version contains some notable changes and a lot of new features, you may need to spend some time reading them, I believe these changes can help you build application more easily :)
$InfiniteLoading:reset
event, use identifier
property instead, because it is not a elegant way that getting the instance and communicate via event. Since this verison, the InfiniteLoading
component will be reset whenever the identifier
property is changed, so you can change your reset logic like this:<template>
<!-- ... -->
<infinite-loading :identifier="infiniteId"></infinite-loading>
<!-- ... -->
</template>
<script>
export default {
data() {
return { identifier: +new Date() };
},
methods: {
reset() {
this.identifier += 1; // or any expression can change identifier value
},
},
};
</script>
top
, it means we can create a top-direction infinite scroll list out of the box!props
, default contents of slots
and default system settings via the plugin API, read more
error
to control message display when loading error, read more
Published by PeachScript about 6 years ago
forceUseInfiniteWrapper
prop support to pass a CSS selector, contributed by @snowyu through #187Published by PeachScript about 6 years ago
Published by PeachScript about 6 years ago
Published by PeachScript over 6 years ago
Published by PeachScript almost 7 years ago
body
as the scroll element #111 , contributed by @damienbeaufilsPublished by PeachScript almost 7 years ago
force-use-infinite-wrapper
property #102Published by PeachScript about 7 years ago
Runtime-only
version of Vue.js
#83Published by PeachScript about 7 years ago
This version contains notable changes, so you may need spend some time to update your application through the list below. If you have any suggestion, please join the issues and discuss with us!
Thanks to all contributors and participants of the related issues to help this component become better:
@syn-zeta @DaveSanders @Akari1987 @PenAndPapers @rodwin @mcmillion @vbabenko @adamyarger @duyhung85 @JefferyHus @tengqingya @emkman @feinimoshu753 @jkiimm @zzmm1 @xuyukuan @vgladimir @jun9358 @vlahde
on-infinite
property, and recommend to use infinite
event instead, #75 , doc:<infinite-loading v-on:infinite="infiniteHandler"></infinite-loading>
<!-- or -->
<infinite-loading @infinite="infiniteHandler"></infinite-loading>
$InfiniteLoading:loaded
and $InfiniteLoading:complete
event, and recommend to use the $state
special event argument instead, #57 , doc:...
methods: {
infiniteHandler($state) {
ajax('https://www.example.com/api/news')
.then((res) => {
if (res.data) {
$state.loaded();
} else {
$state.complete();
}
})
},
},
...
force-use-infinite-wrapper
attribute support to prevent be in a infinite loop, #55 :<div infinite-wrapper> <!--this div will become the real scroll wrapper -->
<div style="overflow: auto;">
<infinite-loading force-use-infinite-wrapper="true"></infinite-loading>
</div>
</div>
extends
feature #64Published by PeachScript over 7 years ago
infinite-wrapper
attribute when you using 3rd-party scroll plugin like perfect-scrollbar
, see usage, #44Published by PeachScript over 7 years ago
keep-alive
feature #40Published by PeachScript over 7 years ago
Published by PeachScript over 7 years ago