feat(shop): 列表商品图片改用 OSS 压缩函数
- src/views/shop/shopGoodsBrowse/index.vue 中引入 getCompressedImageUrl - 商品图片 :src 改为使用 getCompressedImageUrl(record.goodsImage) - 统一默认宽度 240px,质量 90,自动补全 OSS 域名 - 跳过已含 x-oss-process 的 URL 保持预览行为不变
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<template v-if="column.key === 'goodsImage'">
|
||||
<a-image
|
||||
v-if="record.goodsImage"
|
||||
:src="record.goodsImage"
|
||||
:src="getCompressedImageUrl(record.goodsImage)"
|
||||
:width="50"
|
||||
:height="50"
|
||||
style="border-radius: 4px; object-fit: cover"
|
||||
@@ -57,6 +57,7 @@
|
||||
import { message } from 'ant-design-vue';
|
||||
import type { EleProTable } from 'ele-admin-pro';
|
||||
import { toDateString } from 'ele-admin-pro';
|
||||
import { getCompressedImageUrl } from '@/utils/image';
|
||||
import type {
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
|
||||
Reference in New Issue
Block a user