Commit db468fbd by 李嘉林

公告组件图片渲染优化

parent f31c9f21
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<view class="container" bindtap="onclickHandle" data-index="{{index}}" style="width: 100%;height:{{CommonHeight}}"> <view class="container" bindtap="onclickHandle" data-index="{{index}}" style="width: 100%;height:{{CommonHeight}}">
<block wx:if="{{item.imageUrl||datas.componentData.singleImage}}"> <block wx:if="{{item.imageUrl||datas.componentData.singleImage}}">
<view wx:if="{{datas.componentData.styleType===1}}"> <view wx:if="{{datas.componentData.styleType===1}}">
<image class="notice-icon" mode="widthFix" style="width:{{datas.componentData.imageWidth}}px !important;height:{{datas.componentData.imageWidth}}px;" src="{{item.imageUrl}}" /> <image class="notice-icon" mode="widthFix" style="width:{{datas.componentData.imageWidth}}px !important;" src="{{item.imageUrl}}" />
</view> </view>
<view wx:else> <view wx:else>
<image class="notice-icon" style="width:{{datas.componentData.imageWidth}}px !important;height:{{datas.componentData.imageWidth}}px;" src="{{singleImg}}" /> <image class="notice-icon" mode="widthFix" style="width:{{datas.componentData.imageWidth}}px !important;" src="{{singleImg}}" />
</view> </view>
</block> </block>
<view class="notice-content" style="font-size:{{datas.componentData.fontSize}}px;color:{{datas.componentData.fontColor}}"> <view class="notice-content" style="font-size:{{datas.componentData.fontSize}}px;color:{{datas.componentData.fontColor}}">
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
.notice { .notice {
position: relative; position: relative;
} }
.notice image {
height: auto;
}
.notice .container { .notice .container {
display: flex; display: flex;
......
/* static/nativeComponents/PhotoGallery/index.wxss */ /* static/nativeComponents/PhotoGallery/index.wxss */
@import "/static/font/common_icon.wxss"; @import "/static/font/common_icon.wxss";
image{ .photo-gallery image{
width: 100%; width: 100%;
height: auto; height: auto;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment