perf(image): 优化图片加载性能

- 为所有商品图片添加 loading="lazy" 属性实现懒加载
- 为所有图片元素添加 decoding="async" 属性实现异步解码
- 优化购物车页面的商品缩略图加载方式
- 改进订单中心各页面的图片加载策略
- 提升评价系统中图片的加载性能
- 优化会员中心收藏和足迹功能的图片加载
- 改善促销活动页面的图片加载体验
- 更新首页装饰组件中的图片加载属性
- 提高地址管理页面的界面展示效果
This commit is contained in:
pikachu1995@126.com
2026-10-08 14:36:22 +08:00
parent 4c232284f8
commit 1b275cf592
34 changed files with 333 additions and 92 deletions

View File

@@ -18,7 +18,7 @@
@click="goGoodsDetail(item.id)"
>
<div class="goods-show-img">
<img :src="itemThumbnail(item)" />
<img :src="itemThumbnail(item)" loading="lazy" decoding="async" />
</div>
<div class="goods-show-price">
<span>

View File

@@ -29,7 +29,7 @@
<div v-else class="goods-show-info1" v-for="(item, index) in goodsList" :key="index"
@click="goGoodsDetail(item.skuId, item.goodsId)">
<div class="goods-show-img">
<img :src="item.goodsImage" :alt="item.goodsName" />
<img :src="item.goodsImage" loading="lazy" decoding="async" :alt="item.goodsName" />
</div>
<div class="goods-show-price">
<span class="seckill-price text-danger">{{ $filters.unitPrice(item.price, "¥") }}</span>