fix(docs): [infinite-scroll] fix error when use directive (#7855)

This commit is contained in:
赵朋朋Eddie 2022-05-24 09:48:08 +08:00 committed by GitHub
parent 49117b6b03
commit 437f10abae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
<ul
v-infinite-scroll="load"
class="list"
infinite-scroll-disabled="disabled"
:infinite-scroll-disabled="disabled"
>
<li v-for="i in count" :key="i" class="list-item">{{ i }}</li>
</ul>
@ -18,6 +18,7 @@ import { computed, ref } from 'vue'
const count = ref(10)
const loading = ref(false)
const noMore = computed(() => count.value >= 20)
const disabled = computed(() => loading.value || noMore.value)
const load = () => {
loading.value = true
setTimeout(() => {