add:新增search接口

This commit is contained in:
zlong committed 2024-12-12 18:26:52 +08:00
1 parent ed3ce8ba53
commit 668f57d9ca
3 files changed
+14 -3

No files matched your search

+7 -2
View File
@@ -18,8 +18,10 @@ const props = withDefaults(defineProps<{
total: 0,
},
})
const emit = defineEmits(['loadMore'])
const loadMoreStatus = computed(() => {
return props.pagination.size > props.pagination.total ? 'nomore' : 'more'
})
const contentText = ref<ContentText>({
contentdown: '查看更多',
contentrefresh: '加载中',
@@ -27,6 +29,9 @@ const contentText = ref<ContentText>({
})
function handleLoadMore() {
if (props.pagination.size > props.pagination.total) {
return
}
emit('loadMore')
}
</script>
@@ -50,7 +55,7 @@ function handleLoadMore() {
</view>
</view>
</view>
<uni-load-more status="more" :content-text="contentText" @click-load-more="handleLoadMore" />
<uni-load-more :status="loadMoreStatus" :content-text="contentText" @click-load-more="handleLoadMore" />
</template>
<style scoped>