[bugfix] List: should not trigger load event when hidden (#751)

This commit is contained in:
neverland
2018-03-22 13:18:38 +08:00
committed by GitHub
parent 70fbdea35d
commit ddbe338919
3 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
<demo-block :title="$t('basicUsage')">
<p class="page-desc">{{ $t('text') }}</p>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
<van-list
v-model="loading"
:finished="finished"
@load="onLoad"
@@ -39,7 +39,7 @@ export default {
onLoad() {
setTimeout(() => {
for (let i = 0; i < 10; i++) {
let text = this.list.length + 1;
const text = this.list.length + 1;
this.list.push(text < 10 ? '0' + text : text);
}
this.loading = false;