fix(admin): 优化商品审核待审核列表卡片高度与首图展示,防止内容被挤压形变

This commit is contained in:
yml2213
2026-09-07 14:00:07 +08:00
parent 5f0b43fe42
commit 0df5cebf5d
2 changed files with 38 additions and 17 deletions
@@ -214,6 +214,7 @@
.queue-list { .queue-list {
flex: 1; flex: 1;
min-height: 0;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -225,6 +226,8 @@
.queue-item { .queue-item {
position: relative; position: relative;
width: 100%; width: 100%;
min-height: 104px;
flex-shrink: 0;
display: flex; display: flex;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0;
border-radius: 10px; border-radius: 10px;
@@ -291,16 +294,16 @@
font-weight: 800; font-weight: 800;
} }
.queue-title-row { .queue-main-row {
display: flex; display: flex;
align-items: center; align-items: flex-start;
gap: 10px; gap: 10px;
} }
.queue-thumb { .queue-thumb {
position: relative; position: relative;
width: 44px; width: 52px;
height: 44px; height: 52px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
background: #f1f5f9; background: #f1f5f9;
@@ -312,6 +315,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
display: block;
} }
.thumb-warning-badge { .thumb-warning-badge {
@@ -327,9 +331,15 @@
line-height: 13px; line-height: 13px;
} }
.queue-title { .queue-main-info {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
display: flex;
flex-direction: column;
gap: 6px;
}
.queue-title {
color: #0f172a; color: #0f172a;
font-size: 13px; font-size: 13px;
font-weight: 700; font-weight: 700;
@@ -343,16 +353,18 @@
.queue-specs { .queue-specs {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 6px; gap: 4px;
} }
.spec-pill { .spec-pill {
padding: 2px 6px; padding: 1px 5px;
border-radius: 4px; border-radius: 4px;
background: #f1f5f9; background: #f1f5f9;
color: #475569; color: #475569;
font-size: 11px; font-size: 11px;
font-weight: 600; font-weight: 600;
line-height: 16px;
white-space: nowrap;
} }
.queue-footer { .queue-footer {
@@ -84,6 +84,13 @@ interface ChecklistItem {
const _defaultScreenshotURL = '/api/listings/default-upload-screenshot?v=webp1' const _defaultScreenshotURL = '/api/listings/default-upload-screenshot?v=webp1'
function onThumbError(e: Event) {
const target = e.target as HTMLImageElement
if (target && target.src !== _defaultScreenshotURL) {
target.src = _defaultScreenshotURL
}
}
const sortOptions = [ const sortOptions = [
{ label: '最新提交 (默认)', value: 'default' }, { label: '最新提交 (默认)', value: 'default' },
{ label: '风险优先 (封禁/默认图)', value: 'risk' }, { label: '风险优先 (封禁/默认图)', value: 'risk' },
@@ -1075,7 +1082,7 @@ async function handleScreenshotSaved(payload: { oldUrl: string; newUrl: string }
</span> </span>
</div> </div>
<div class="queue-title-row"> <div class="queue-main-row">
<div class="queue-thumb"> <div class="queue-thumb">
<img <img
:src=" :src="
@@ -1085,18 +1092,20 @@ async function handleScreenshotSaved(payload: { oldUrl: string; newUrl: string }
" "
alt="缩略图" alt="缩略图"
loading="lazy" loading="lazy"
@error="onThumbError"
/> />
<span v-if="hasDefaultScreenshot(item)" class="thumb-warning-badge">默认图</span> <span v-if="hasDefaultScreenshot(item)" class="thumb-warning-badge">默认图</span>
</div> </div>
<strong class="queue-title" :title="item.title">{{ item.title }}</strong> <div class="queue-main-info">
</div> <strong class="queue-title" :title="item.title">{{ item.title }}</strong>
<div class="queue-specs">
<div class="queue-specs"> <span class="spec-pill">{{ item.rank_level || '段位未知' }}</span>
<span class="spec-pill">{{ item.rank_level || '段位未知' }}</span> <span class="spec-pill">{{
<span class="spec-pill">{{ assetText(item, 'season_insurance') || '保险未填'
assetText(item, 'season_insurance') || '保险未填' }}</span>
}}</span> <span class="spec-pill">KD {{ assetNumberText(item, 'secret_kd') }}</span>
<span class="spec-pill">KD {{ assetNumberText(item, 'secret_kd') }}</span> </div>
</div>
</div> </div>
<div class="queue-footer"> <div class="queue-footer">