hookehuyr

自适应模式下产品图片宽高优化显示

<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-28 11:44:26
* @LastEditTime: 2024-10-28 17:57:14
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
......@@ -35,7 +35,7 @@
<div class="product-sub" style="margin: 1rem 0 2rem;" v-html="info.post_excerpt"></div>
</div>
<div v-for="(item, index) in info_images" :key="index" class="product-item-img">
<el-image style="height: 14rem;" :src="item" fit="cover"></el-image>
<el-image style="height: auto; width: 50vw;" :src="item" fit="cover"></el-image>
</div>
</div>
</hager-box>
......
<!--
* @Date: 2024-09-27 16:53:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-28 15:03:09
* @LastEditTime: 2024-10-28 17:58:59
* @FilePath: /hager/src/views/product/index.vue
* @Description: 文件描述
-->
......@@ -44,7 +44,7 @@
<div v-else class="product-list">
<div class="product-item xs" v-for="(item, index) in product_list" :key="index">
<div @click="goToDetail(item)" class="product-item-img xs">
<img style="width: 100%; height: auto;" :src="item.product_status === 'publish' ? item.cover : no_product_img">
<img style="width: 35vw; height: auto;" :src="item.product_status === 'publish' ? item.cover : no_product_img">
</div>
<p @click="goToDetail(item)" class="product-item-title">{{ item.product_name }}</p>
</div>
......