Commit 78f973bc by 李嘉林

图片画廊设置左右间距减掉

parent 4565b069
......@@ -42,7 +42,7 @@ Component({
getPaddingList: this.data.datas.componentData.paddingList
})
}
console.log(this.data.getPaddingList[2],this.data.getPaddingList[3],'--------------------45')
if(this.data.datas.componentData.style == 'waterfall'){
console.log(this.data.datas.componentData,'图片画廊waterfall')
let list = this.data.datas.componentData.imgList
......@@ -117,15 +117,17 @@ Component({
const res = wx.getSystemInfoSync()
let b = countWidth / res.windowWidth
let getPaddingListLeft = this.data.getPaddingList[2].value;
let getPaddingListRight = this.data.getPaddingList[3].value;
console.log(getPaddingListLeft,getPaddingListRight,'---getPaddingListRight')
let b = countWidth / (res.windowWidth - getPaddingListLeft - getPaddingListRight)
console.log(b,'nnnnn')
this.data.imgArr.forEach((it,ii) => {
this.setData({
['imgArr[' + ii + '].width']: it.width / b ,
['imgArr[' + ii + '].height']: it.height /b
['imgArr[' + ii + '].width']: Math.ceil(it.width / b) ,
['imgArr[' + ii + '].height']: Math.ceil(it.height /b)
})
})
}
......
......@@ -28,7 +28,7 @@
}
.ul .li{
display: inline-block;
flex: 1;
/* flex: 1; */
}
.isTiled{
overflow: hidden;
......
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