feat: 优化生产面板并增加图片网格加载

This commit is contained in:
GouJ committed 2026-09-21 10:21:22 +08:00
1 parent 01f274cd8e
commit a253711435
9 files changed
+501 -276

No files matched your search

+5 -7
View File
@@ -1,8 +1,9 @@
<script setup lang="ts">
import { NButton, NImage } from 'naive-ui'
import { NButton } from 'naive-ui'
import { computed, ref, watch } from 'vue'
import { ImageOff } from '@lucide/vue'
import { referenceImageUrl } from '../../lib/assets'
import RevealImage from './RevealImage.vue'
/** 图片统一铺满容器;原图预览按场景开启,历史选择按钮不触发预览。 */
const props = withDefaults(
@@ -28,16 +29,12 @@ watch(
<template>
<div class="asset-image">
<NImage
<RevealImage
v-if="url && !failed"
:src="url"
:preview-src="url"
:alt="alt"
lazy
:preview-disabled="!preview"
:preview="preview"
:object-fit="objectFit"
:img-props="{ referrerpolicy: 'no-referrer' }"
:previewed-img-props="{ alt, referrerpolicy: 'no-referrer' }"
@error="failed = true"
/>
<span v-else class="asset-image-empty"
@@ -63,6 +60,7 @@ watch(
.asset-image-empty {
@apply flex items-center justify-center flex-col gap-2.5 p-5 text-muted text-[11px] text-center;
}
.asset-image .reveal-image,
.asset-image .n-image {
@apply w-full h-full min-h-0 min-w-0 flex justify-center;
}