diff --git a/components-diy/diy-goods-list.vue b/components-diy/diy-goods-list.vue index e94964f..c7c60dc 100644 --- a/components-diy/diy-goods-list.vue +++ b/components-diy/diy-goods-list.vue @@ -7,7 +7,7 @@ @@ -117,7 +117,7 @@ :class="[goodsValue.ornament.type]" :style="goodsItemCss"> @@ -184,7 +184,7 @@ :class="[goodsValue.ornament.type]" :style="goodsItemCss"> @@ -302,6 +302,19 @@ export default { } }, computed: { + // 商品图 image 的 mode 模式: + // - 大图模式(large-mode):容器高度由图片决定,固定使用 widthFix 保持原比例 + // - 鸿蒙元服务:其他模板下 image 的 widthFix 模式异常(图片被裁剪/显示不全),改用 aspectFill 填满固定容器 + // - H5、微信小程序等其他环境:保持 widthFix 行为不变 + imgMode() { + if (this.goodsValue.template == 'large-mode') return 'widthFix'; + // #ifdef MP-HARMONY + return 'aspectFill'; + // #endif + // #ifndef MP-HARMONY + return 'widthFix'; + // #endif + }, goodsListWarpCss() { var obj = ''; obj += 'background-color:' + this.goodsValue.componentBgColor + ';';