Commit c30e6a31 by 李伟康

feat(build): 更新图片资源处理配置支持WebP格式

- 在vue.config.js中为spritesmith添加对jpeg和webp格式的支持
- 将图片间距从30调整为10以优化布局
- 将排行榜背景图片从PNG格式替换为WebP格式以提升加载性能
- 将完成课程组件中的成功图标从PNG格式替换为WebP格式以优化图像质量
- 确保所有新添加的WebP格式图片文件被正确引入和使用
1 parent 8b39a87a
No preview for this file type
No preview for this file type

24.7 KB | W: | H:

9.49 KB | W: | H:

assets/spritesmith/active-msg.png
assets/spritesmith/active-msg.png
assets/spritesmith/active-msg.png
assets/spritesmith/active-msg.png
  • 2-up
  • Swipe
  • Onion skin

46.7 KB | W: | H:

22.3 KB | W: | H:

assets/spritesmith/ai-bazaar.png
assets/spritesmith/ai-bazaar.png
assets/spritesmith/ai-bazaar.png
assets/spritesmith/ai-bazaar.png
  • 2-up
  • Swipe
  • Onion skin

50.3 KB | W: | H:

25.7 KB | W: | H:

assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
  • 2-up
  • Swipe
  • Onion skin

121 KB | W: | H:

49.6 KB | W: | H:

assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
  • 2-up
  • Swipe
  • Onion skin

24.6 KB | W: | H:

10.5 KB | W: | H:

assets/spritesmith/info-icon.png
assets/spritesmith/info-icon.png
assets/spritesmith/info-icon.png
assets/spritesmith/info-icon.png
  • 2-up
  • Swipe
  • Onion skin

36.9 KB | W: | H:

20.1 KB | W: | H:

assets/spritesmith/learn-bg.png
assets/spritesmith/learn-bg.png
assets/spritesmith/learn-bg.png
assets/spritesmith/learn-bg.png
  • 2-up
  • Swipe
  • Onion skin

362 KB | W: | H:

168 KB | W: | H:

assets/spritesmith/locker-icon.png
assets/spritesmith/locker-icon.png
assets/spritesmith/locker-icon.png
assets/spritesmith/locker-icon.png
  • 2-up
  • Swipe
  • Onion skin

74.9 KB | W: | H:

35.6 KB | W: | H:

assets/spritesmith/no-insurance-data.png
assets/spritesmith/no-insurance-data.png
assets/spritesmith/no-insurance-data.png
assets/spritesmith/no-insurance-data.png
  • 2-up
  • Swipe
  • Onion skin

80.4 KB | W: | H:

51.9 KB | W: | H:

assets/spritesmith/prompt.png
assets/spritesmith/prompt.png
assets/spritesmith/prompt.png
assets/spritesmith/prompt.png
  • 2-up
  • Swipe
  • Onion skin

57.2 KB | W: | H:

21 KB | W: | H:

assets/spritesmith/scene-0.png
assets/spritesmith/scene-0.png
assets/spritesmith/scene-0.png
assets/spritesmith/scene-0.png
  • 2-up
  • Swipe
  • Onion skin

47.5 KB | W: | H:

16.3 KB | W: | H:

assets/spritesmith/scene-1.png
assets/spritesmith/scene-1.png
assets/spritesmith/scene-1.png
assets/spritesmith/scene-1.png
  • 2-up
  • Swipe
  • Onion skin

76.9 KB | W: | H:

24.9 KB | W: | H:

assets/spritesmith/scene-7.png
assets/spritesmith/scene-7.png
assets/spritesmith/scene-7.png
assets/spritesmith/scene-7.png
  • 2-up
  • Swipe
  • Onion skin

31.7 KB | W: | H:

17.5 KB | W: | H:

assets/spritesmith/short-course-learn-room.png
assets/spritesmith/short-course-learn-room.png
assets/spritesmith/short-course-learn-room.png
assets/spritesmith/short-course-learn-room.png
  • 2-up
  • Swipe
  • Onion skin

58 KB | W: | H:

16.9 KB | W: | H:

assets/spritesmith/topTipsRightIcon.png
assets/spritesmith/topTipsRightIcon.png
assets/spritesmith/topTipsRightIcon.png
assets/spritesmith/topTipsRightIcon.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
<!-- 成功图片 --> <!-- 成功图片 -->
<image class="success-icon" :src="require('@/assets/images/studyCenter/success.png')" mode="aspectFit" /> <image class="success-icon" :src="require('@/assets/images/studyCenter/success.webp')" mode="aspectFit" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- 左侧排行榜 --> <!-- 左侧排行榜 -->
<view class="left-panel"> <view class="left-panel">
<view class="top-image-wrapper"> <view class="top-image-wrapper">
<image class="panel-image" :src="require('@/assets/images/studyCenter/Leaderboard-bg.png')" <image class="panel-image" :src="require('@/assets/images/studyCenter/Leaderboard-bg.webp')"
mode="scaleToFill" /> mode="scaleToFill" />
</view> </view>
......
...@@ -93,7 +93,7 @@ module.exports = { ...@@ -93,7 +93,7 @@ module.exports = {
// 引入图片文件夹 // 引入图片文件夹
src: { src: {
cwd: path.resolve(__dirname, './assets/spritesmith'), cwd: path.resolve(__dirname, './assets/spritesmith'),
glob: ['*.png', '*.jpg'] glob: ['*.png', '*.jpg', '*.jpeg','*.webp']
}, },
// 生成图片的路径 // 生成图片的路径
target: { target: {
...@@ -117,7 +117,7 @@ module.exports = { ...@@ -117,7 +117,7 @@ module.exports = {
}, },
// 每个图片间距 // 每个图片间距
spritesmithOptions: { spritesmithOptions: {
padding: 30 padding: 10
} }
}) })
] ]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!