feat(special-zone): 走压缩URL处理专区商品图片

- 将专区商品抽屉已关联商品列表的图片src改为压缩URL,减少缩略图体积
- 调整banner图片压缩宽度为300,保证清晰度与加载速度平衡
- 统一调用getCompressedImageUrl方法,无需额外引入
- 优化图片加载性能,提升用户体验
This commit is contained in:
2026-08-17 16:47:37 +08:00
parent 65926a35b6
commit bec3a6f1b8
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -25,3 +25,8 @@
- `:pagination="goodsPagination"`
- `onChange``loadGoods(currentSectionId.value)` 修正为 `.value`
- 验证:`vite build` 通过(exit 0)。
## 专区商品图片走压缩 URL
- 文件:`src/views/special/zone/index.vue`
- 改动:专区商品抽屉的已关联商品列表「图片」列,从直接 `:src="text"` 改为 `:src="getCompressedImageUrl(text, { width: 120 })"`,缩小缩略图体积并统一走 OSS 图片处理。
- 说明:`getCompressedImageUrl` 已导入,无需额外引入。
+2 -2
View File
@@ -42,7 +42,7 @@
<template v-if="column.key === 'banner'">
<img
v-if="record.banner"
:src="getCompressedImageUrl(record.banner, { width: 96, quality: 85 })"
:src="getCompressedImageUrl(record.banner, { width: 300, quality: 85 })"
style="max-width: 80px; height: 32px; object-fit: cover; border-radius: 4px;"
/>
<span v-else>-</span>
@@ -161,7 +161,7 @@
<template v-if="column.key === 'image'">
<img
v-if="text"
:src="text"
:src="getCompressedImageUrl(text, { width: 120 })"
style="width: 40px; height: 40px; object-fit: cover; border-radius: 4px;"
/>
<span v-else>-</span>