feat: 优化生产面板并增加图片网格加载
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { NImage } from 'naive-ui'
|
||||
import { Box, MapPin, UserRound } from '@lucide/vue'
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { referenceImageUrl } from '../../../lib/assets'
|
||||
import { subjectIdentityApi } from '../api'
|
||||
import { currentAnchor } from '../model'
|
||||
import RevealImage from '../../../components/ui/RevealImage.vue'
|
||||
|
||||
/** source 为 undefined 时按需查询;null 表示上层已确认没有母版,不能用候选或形态图替代。 */
|
||||
const props = defineProps<{
|
||||
@@ -89,16 +89,7 @@ watch(
|
||||
|
||||
<template>
|
||||
<span ref="target" class="identity-thumbnail" :title="label">
|
||||
<NImage
|
||||
v-if="url && !imageFailed"
|
||||
:src="url"
|
||||
:alt="label"
|
||||
object-fit="cover"
|
||||
preview-disabled
|
||||
lazy
|
||||
:img-props="{ referrerpolicy: 'no-referrer' }"
|
||||
@error="imageFailed = true"
|
||||
/>
|
||||
<RevealImage v-if="url && !imageFailed" :src="url" :alt="label" @error="imageFailed = true" />
|
||||
<span v-else class="identity-thumbnail-placeholder" role="img" :aria-label="label">
|
||||
<component :is="icon" :size="22" :stroke-width="1.4" aria-hidden="true" />
|
||||
<span aria-hidden="true">{{ kind }}</span>
|
||||
@@ -113,7 +104,8 @@ watch(
|
||||
@apply flex w-12 h-[64px] overflow-hidden bg-(--app-subtle);
|
||||
}
|
||||
.identity-thumbnail .n-image,
|
||||
.identity-thumbnail .n-image img {
|
||||
.identity-thumbnail .n-image img,
|
||||
.identity-thumbnail .reveal-image {
|
||||
@apply w-full h-full;
|
||||
}
|
||||
.identity-thumbnail-placeholder {
|
||||
|
||||
Reference in New Issue
Block a user