feat: 优化静态资源缓存策略

This commit is contained in:
Nixevol
2026-07-05 22:01:48 +08:00
parent cb202825a3
commit 3efc1ecd88
11 changed files with 265 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
@dragend="onDragEnd"
>
<video v-if="isVideo(m)" class="thumb" :src="m.url" muted preload="metadata" />
<img v-else class="thumb" :src="m.url" :alt="m.name" />
<img v-else class="thumb" :src="m.url" :alt="m.name" loading="lazy" />
<div v-if="isVideo(m)" class="play"><n-icon :component="PlayCircleOutline" :size="26" /></div>
<div class="order">{{ i + 1 }}</div>
<button class="del" type="button" :title="t('common.action.delete')" @click.stop="remove(i)">×</button>
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="media-upload" :class="{ text: listType === 'text' }">
<div v-if="listType === 'image-card'" class="image-grid">
<div v-for="(m, i) in items" :key="m.key" class="image-item previewable" @click="preview(i)">
<img v-if="isImage(m)" class="image-thumb" :src="m.url || m.key" :alt="m.name || m.key" />
<img v-if="isImage(m)" class="image-thumb" :src="m.url || m.key" :alt="m.name || m.key" loading="lazy" />
<div v-else class="file-thumb">{{ fileExt(m) }}</div>
<button class="remove" type="button" :title="t('common.action.delete')" @click.stop="remove(m.key)">×</button>
</div>