feat(shop-product): 店铺商品列表展示平台商品图片,支持点击大图预览

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
liufumingren 2026-11-06 19:34:38 +08:00
parent 137a3ed1f3
commit 809d1e9feb

View File

@ -596,6 +596,21 @@ onBeforeUnmount(() => {
<el-table-column prop="outer_sku_id" label="规格ID" width="120">
<template #default="{ row }">{{ row.outer_sku_id || '-' }}</template>
</el-table-column>
<el-table-column label="图片" width="64" align="center">
<template #default="{ row }">
<div v-if="row.image" class="thumb-cell" @click.stop>
<el-image
:src="mediaUrl(row.image)"
:preview-src-list="[ mediaUrl(row.image) ]"
fit="cover"
class="thumb-img"
preview-teleported
hide-on-click-modal
/>
</div>
<span v-else class="muted">-</span>
</template>
</el-table-column>
<el-table-column prop="title" label="商品标题" min-width="180" show-overflow-tooltip />
<el-table-column prop="outer_code" label="商家编码" width="120">
<template #default="{ row }">{{ row.outer_code || '-' }}</template>
@ -949,6 +964,18 @@ onBeforeUnmount(() => {
color: var(--el-text-color-secondary);
}
/* 列表商品图片:点击打开大图预览,阻止冒泡避免触发行点击(操作记录面板) */
.thumb-cell {
display: inline-flex;
cursor: zoom-in;
}
.thumb-img {
width: 40px;
height: 40px;
border-radius: 4px;
background: var(--el-fill-color-light);
}
.pull-tip {
margin-bottom: 16px;
}