搜索结果列表页面开发
This commit is contained in:
19
src/components/LoadingMore/index.vue
Normal file
19
src/components/LoadingMore/index.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="text-center my-4">
|
||||
<span v-if="end" class="leading-4">没有更多了</span>
|
||||
<d-button variant="text" v-else-if="error" @click="$emit('click')">加载失败,重新加载</d-button>
|
||||
<d-button :loading="loading" variant="text" v-else @click="!loading && $emit('click')">
|
||||
{{ loading ? '加载中…' : '点击加载更多' }}
|
||||
</d-button>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {} from 'vue';
|
||||
defineOptions({ name: 'LoadingMore' });
|
||||
defineProps<{
|
||||
loading: boolean;
|
||||
error?: boolean | undefined;
|
||||
end?: boolean;
|
||||
}>();
|
||||
defineEmits(['click']);
|
||||
</script>
|
||||
Reference in New Issue
Block a user