Commit 47cfbfe6 by 李嘉林

图片组件间隙问题

parent 8c7b7bce
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<view class="next-btn" wx:if="{{datas.componentData.style==='across'}}"> <view class="next-btn" wx:if="{{datas.componentData.style==='across'}}">
<i class="iconfont-common common-iconyoujiantou"></i> <i class="iconfont-common common-iconyoujiantou"></i>
</view> </view>
<view style="display:{{datas.componentData.style==='tiled' ? 'flex' : ''}}" class="ul"> <view style="display:{{datas.componentData.style==='tiled' ? 'flex' : ''}}" class="ul {{datas.componentData.style==='tiled'?'isTiled':''}}">
<view bindtap="itemClick" data-item="{{item}}" wx:for="{{datas.componentData.imgList}}" wx:key="index" style="margin-right:{{index===(datas.componentData.imgList.length-1)? '' : datas.componentData.imgPadding * 2 + 'rpx'}};width:{{datas.componentData.style==='across' ? datas.componentData.acrossPer+'%' : ''}}" class="li"> <view bindtap="itemClick" data-item="{{item}}" wx:for="{{datas.componentData.imgList}}" wx:key="index" style="margin-right:{{index===(datas.componentData.imgList.length-1)? '' : datas.componentData.imgPadding * 2 + 'rpx'}};width:{{datas.componentData.style==='across' ? datas.componentData.acrossPer+'%' : ''}}" class="li">
<image src="{{item.imageUrl}}" style="width:{{datas.componentData.style==='tiled' ? imgArr[index].width : ''}}px;height:{{ datas.componentData.style==='tiled' ? imgArr[index].height : ''}}px" bindload="bindload" data-index="{{index}}" mode="{{datas.componentData.style==='across' ? 'widthFix' : ''}}"></image> <image src="{{item.imageUrl}}" style="width:{{datas.componentData.style==='tiled' ? imgArr[index].width : ''}}px;height:{{ datas.componentData.style==='tiled' ? imgArr[index].height : ''}}px" bindload="bindload" data-index="{{index}}" mode="{{datas.componentData.style==='across' ? 'widthFix' : ''}}"></image>
</view> </view>
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
display: inline-block; display: inline-block;
flex: 1; flex: 1;
} }
.isTiled{
overflow: hidden;
}
.isTiled .li{
margin: -1px;
}
.ul .li image{ .ul .li image{
vertical-align: middle; vertical-align: middle;
display: inline-block display: inline-block
......
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