Realm page

This commit is contained in:
2024-03-17 22:43:31 +08:00
parent cbea87f74d
commit d954cb87e6
6 changed files with 141 additions and 35 deletions

View File

@@ -1,9 +1,5 @@
<template>
<div class="post-list">
<div v-if="props.loading" class="text-center py-8">
<v-progress-circular indeterminate />
</div>
<v-infinite-scroll :items="props.posts" :onLoad="props.loader">
<template v-for="(item, idx) in props.posts" :key="item">
<div class="mb-3 px-1">
@@ -21,7 +17,7 @@
<script setup lang="ts">
import PostItem from "@/components/posts/PostItem.vue";
const props = defineProps<{ loading: boolean, posts: any[], loader: (opts: any) => Promise<any> }>();
const props = defineProps<{ posts: any[], loader: (opts: any) => Promise<any> }>();
const emits = defineEmits(["update:posts"]);
function updateItem(idx: number, data: any) {