User personal page

This commit is contained in:
2024-04-02 23:17:57 +08:00
parent 1f3f4a7370
commit 031c3dee3b
12 changed files with 317 additions and 73 deletions

View File

@@ -3,7 +3,7 @@
<v-infinite-scroll :items="props.posts" :onLoad="props.loader">
<template v-for="(item, idx) in props.posts" :key="item.id">
<div class="mb-3 px-[8px]">
<v-card>
<v-card :variant="props.variant ?? 'elevated'">
<template #text>
<post-item brief :item="item" @update:item="(val) => updateItem(idx, val)" />
</template>
@@ -17,7 +17,7 @@
<script setup lang="ts">
import PostItem from "@/components/posts/PostItem.vue"
const props = defineProps<{ posts: any[]; loader: (opts: any) => Promise<any> }>()
const props = defineProps<{ variant?: string, posts: any[]; loader: (opts: any) => Promise<any> }>()
const emits = defineEmits(["update:posts"])
function updateItem(idx: number, data: any) {