Open xerosanyam opened 6 years ago
I think by the time we are able to render "Loading" it will actually render the items.
I think, time to render the items will depend on:
time to render "Loading" should be far lesser than time to render nested element.
Drawing a frame isn't selective, everything will be rendered.
Hey!
I added a loading indicator like this:
Template:
<div class="loader" v-show="isLoading">Some Styled loading Gif...</div>
<RecycleScroller :items="XXX"
:emit-update="true"
@update="handleLoadingIndicator"
@scroll-start="isLoading=false"
@scroll-end="isLoading=false"
:buffer="0">
<template slot-scope="{ item, index }">
<Item>...</Item>
</template>
</RecycleScroller>
JS (Vue):
data() {
return {
isLoading: false,
};
},
/* ... */
mounted() {
this.debounceLoadingCancel = debounce(() => {
this.isLoading = false;
}, 500);
},
/* ... */
methods: {
handleLoadingIndicator() {
if (!this.isLoading) {
this.isLoading = true;
}
this.debounceLoadingCancel();
},
}
Its useless, What a pity! As long as it is loaded, it will load.
https://github.com/zrj570543941/custome-scroll This project can slow down scrolling. Can you learn from it? Check the source code, I don't know where to start.
if we scroll the screen fast, we get to see a blank screen. is it possible to show Loading.. somehow?