优化首页账号展示体验

This commit is contained in:
yml2213
2026-06-04 12:57:34 +08:00
parent 75e849a91a
commit e41d3a923a
6 changed files with 157 additions and 23 deletions
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { computed } from 'vue'
import { RouterLink } from 'vue-router'
import type { Listing } from '@/features/listings'
import {
@@ -24,18 +25,19 @@ interface Props {
}
const props = defineProps<Props>()
const coverURL = computed(() => props.listing.cover_url || props.listing.screenshot_urls?.[0] || '')
</script>
<template>
<RouterLink class="listing-card-v2" :to="`/listings/${listing.id}`">
<div class="card-cover">
<img
v-if="listing.cover_url"
:data-src="listing.cover_url"
v-if="coverURL"
:src="coverURL"
:alt="getListingTitle(listing)"
loading="lazy"
decoding="async"
class="lazy-image"
/>
<div v-else class="empty-cover">HFB</div>
<div class="cover-badges">