mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
fix(docs): [infinite-scroll] fix error when use directive (#7855)
This commit is contained in:
parent
49117b6b03
commit
437f10abae
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user