当后面文本自动换行时,前面图片被压缩?
<block wx:for='{{news_datas}}'>
<view class='news_content'>
<image class="news_content_image" src="{{item.imgurl}}" />
<view class='news_content_right_box'>
<navigator url='../newsdetail/newsdetail?url={{item.url}}'>{{item.title}}</navigator>
<view class='news_content_foot'>
<label class='news_content_foot_lbl'>{{item.date}}</label>
<label class='news_content_foot_lbl'>{{item.dept}}</label>
</view>
</view>
</view>
</block>
.news_content{
display: flex;
width: 100%;
flex-direction: row;
background-color: white;
padding: 10rpx;
margin-top: 10rpx;
}
.news_content_image{
height: 140rpx;
width: 140rpx;
}
.news_content_right_box
{
display: flex;
flex-direction: column;
flex-grow:1;
padding: 10rpx;
margin-left: 10rpx;
background-color: white;
}
.news_content_foot{
display: flex;
flex-direction: row-reverse;
margin-top: 20rpx;
}
.news_content_foot_lbl{
margin-right: 20rpx;
font-size: 30rpx;
color: #3b3b3b;
}
给图片设置css flex-shrink: 0;
给news_content_image 加css属性 flex-shrink:0就可以了